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

; 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.SelectDest = type { i8, ptr, i32, i32, 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.sqlite3 = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i64, i32, i32, i32, i32, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, [12 x i32], i32, %struct.sqlite3InitInfo, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %union.anon, %struct.Lookaside, ptr, ptr, ptr, ptr, i32, i32, %struct.Hash, ptr, ptr, ptr, %struct.Hash, %struct.Hash, %struct.BusyHandler, [2 x %struct.Db], ptr, i32, i32, i32, i64, i64, ptr }
%struct.sqlite3InitInfo = type { i32, i8, i8, i8, i8 }
%union.anon = type { double }
%struct.Lookaside = type { i32, i16, i8, i32, i32, [3 x i32], ptr, ptr, ptr }
%struct.Hash = type { i32, i32, ptr, ptr }
%struct.BusyHandler = type { ptr, ptr, i32 }
%struct.Db = type { ptr, ptr, i8, i8, ptr }
%struct.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.Index = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i16, i16, i16, i8, i8 }
%struct.Schema = type { i32, i32, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Hash, ptr, i8, i8, i16, i32 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [34 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 void @sqlite3OomFault(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 ptr @sqlite3GetVdbe(ptr noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3NestedParse(ptr noundef, ptr noundef, ...) #2

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

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

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

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

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

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

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

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

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

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

39:                                               ; preds = %5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store i32 1, ptr %15, align 4
  br label %434

43:                                               ; preds = %39, %5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.Parse, ptr %44, i32 0, i32 61
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  store ptr %46, ptr %11, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  store i32 1, ptr %15, align 4
  br label %434

50:                                               ; preds = %43
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.sqlite3, ptr %51, i32 0, i32 33
  %53 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %52, i32 0, i32 2
  %54 = load i8, ptr %53, align 1, !tbaa !16
  %55 = icmp ne i8 %54, 0
  br i1 %55, label %56, label %73

56:                                               ; preds = %50
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.sqlite3, ptr %57, i32 0, i32 33
  %59 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !23
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.Table, ptr %61, i32 0, i32 7
  store i32 %60, ptr %62, align 8, !tbaa !24
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.Table, ptr %63, i32 0, i32 7
  %65 = load i32, ptr %64, align 8, !tbaa !24
  %66 = icmp eq i32 %65, 1
  br i1 %66, label %67, label %72

67:                                               ; preds = %56
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.Table, ptr %68, i32 0, i32 9
  %70 = load i32, ptr %69, align 8, !tbaa !26
  %71 = or i32 %70, 1
  store i32 %71, ptr %69, align 8, !tbaa !26
  br label %72

72:                                               ; preds = %67, %56
  br label %73

73:                                               ; preds = %72, %50
  %74 = load i8, ptr %9, align 1, !tbaa !9
  %75 = zext i8 %74 to i32
  %76 = and i32 %75, 32
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %105

78:                                               ; preds = %73
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.Table, ptr %79, i32 0, i32 9
  %81 = load i32, ptr %80, align 8, !tbaa !26
  %82 = and i32 %81, 8
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %86

84:                                               ; preds = %78
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %85, ptr noundef @.str.23)
  store i32 1, ptr %15, align 4
  br label %434

86:                                               ; preds = %78
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.Table, ptr %87, i32 0, i32 9
  %89 = load i32, ptr %88, align 8, !tbaa !26
  %90 = and i32 %89, 4
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %92, label %97

92:                                               ; preds = %86
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.Table, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !27
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %93, ptr noundef @.str.24, ptr noundef %96)
  br label %104

97:                                               ; preds = %86
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Table, ptr %98, i32 0, i32 9
  %100 = load i32, ptr %99, align 8, !tbaa !26
  %101 = or i32 %100, 96
  store i32 %101, ptr %99, align 8, !tbaa !26
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  call void @convertToWithoutRowidTable(ptr noundef %102, ptr noundef %103)
  br label %104

104:                                              ; preds = %97, %92
  br label %105

105:                                              ; preds = %104, %73
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.Table, ptr %107, i32 0, i32 20
  %109 = load ptr, ptr %108, align 8, !tbaa !28
  %110 = call i32 @sqlite3SchemaToIndex(ptr noundef %106, ptr noundef %109)
  store i32 %110, ptr %13, align 4, !tbaa !29
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Table, ptr %111, i32 0, i32 6
  %113 = load ptr, ptr %112, align 8, !tbaa !30
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %121

115:                                              ; preds = %105
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.Table, ptr %118, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !30
  call void @sqlite3ResolveSelfReference(ptr noundef %116, ptr noundef %117, i32 noundef 4, ptr noundef null, ptr noundef %120)
  br label %121

121:                                              ; preds = %115, %105
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  call void @estimateTableWidth(ptr noundef %122)
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.Table, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !31
  store ptr %125, ptr %14, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %131, %121
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %135

129:                                              ; preds = %126
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  call void @estimateIndexWidth(ptr noundef %130)
  br label %131

131:                                              ; preds = %129
  %132 = load ptr, ptr %14, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.Index, ptr %132, i32 0, i32 5
  %134 = load ptr, ptr %133, align 8, !tbaa !32
  store ptr %134, ptr %14, align 8, !tbaa !5
  br label %126, !llvm.loop !34

135:                                              ; preds = %126
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.sqlite3, ptr %136, i32 0, i32 33
  %138 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %137, i32 0, i32 2
  %139 = load i8, ptr %138, align 1, !tbaa !16
  %140 = icmp ne i8 %139, 0
  br i1 %140, label %371, label %141

141:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = call ptr @sqlite3GetVdbe(ptr noundef %142)
  store ptr %143, ptr %17, align 8, !tbaa !5
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = icmp eq ptr %144, null
  br i1 %145, label %146, label %147

146:                                              ; preds = %141
  store i32 1, ptr %15, align 4
  br label %368

147:                                              ; preds = %141
  %148 = load ptr, ptr %17, align 8, !tbaa !5
  %149 = call i32 @sqlite3VdbeAddOp1(ptr noundef %148, i32 noundef 112, i32 noundef 0)
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.Table, ptr %150, i32 0, i32 3
  %152 = load ptr, ptr %151, align 8, !tbaa !36
  %153 = icmp eq ptr %152, null
  br i1 %153, label %154, label %155

154:                                              ; preds = %147
  store ptr @.str.25, ptr %18, align 8, !tbaa !5
  store ptr @.str.26, ptr %19, align 8, !tbaa !5
  br label %156

155:                                              ; preds = %147
  store ptr @.str.27, ptr %18, align 8, !tbaa !5
  store ptr @.str.28, ptr %19, align 8, !tbaa !5
  br label %156

156:                                              ; preds = %155, %154
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %257

159:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.Parse, ptr %160, i32 0, i32 18
  %162 = load i32, ptr %161, align 8, !tbaa !37
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %161, align 8, !tbaa !37
  store i32 %163, ptr %22, align 4, !tbaa !29
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.Parse, ptr %164, i32 0, i32 18
  %166 = load i32, ptr %165, align 8, !tbaa !37
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %165, align 8, !tbaa !37
  store i32 %167, ptr %24, align 4, !tbaa !29
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.Parse, ptr %168, i32 0, i32 18
  %170 = load i32, ptr %169, align 8, !tbaa !37
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %169, align 8, !tbaa !37
  store i32 %171, ptr %25, align 4, !tbaa !29
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sqlite3MayAbort(ptr noundef %172)
  %173 = load ptr, ptr %17, align 8, !tbaa !5
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.Parse, ptr %174, i32 0, i32 32
  %176 = load i32, ptr %175, align 4, !tbaa !38
  %177 = load i32, ptr %13, align 4, !tbaa !29
  %178 = call i32 @sqlite3VdbeAddOp3(ptr noundef %173, i32 noundef 106, i32 noundef 1, i32 noundef %176, i32 noundef %177)
  %179 = load ptr, ptr %17, align 8, !tbaa !5
  call void @sqlite3VdbeChangeP5(ptr noundef %179, i16 noundef zeroext 16)
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.Parse, ptr %180, i32 0, i32 17
  store i32 2, ptr %181, align 4, !tbaa !39
  %182 = load ptr, ptr %17, align 8, !tbaa !5
  %183 = call i32 @sqlite3VdbeCurrentAddr(ptr noundef %182)
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %23, align 4, !tbaa !29
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = load i32, ptr %22, align 4, !tbaa !29
  %187 = load i32, ptr %23, align 4, !tbaa !29
  %188 = call i32 @sqlite3VdbeAddOp3(ptr noundef %185, i32 noundef 15, i32 noundef %186, i32 noundef 0, i32 noundef %187)
  %189 = load i32, ptr %22, align 4, !tbaa !29
  call void @sqlite3SelectDestInit(ptr noundef %21, i32 noundef 13, i32 noundef %189)
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = call i32 @sqlite3Select(ptr noundef %190, ptr noundef %191, ptr noundef %21)
  %193 = load ptr, ptr %17, align 8, !tbaa !5
  %194 = load i32, ptr %22, align 4, !tbaa !29
  call void @sqlite3VdbeEndCoroutine(ptr noundef %193, i32 noundef %194)
  %195 = load ptr, ptr %17, align 8, !tbaa !5
  %196 = load i32, ptr %23, align 4, !tbaa !29
  %197 = sub nsw i32 %196, 1
  call void @sqlite3VdbeJumpHere(ptr noundef %195, i32 noundef %197)
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.Parse, ptr %198, i32 0, i32 16
  %200 = load i32, ptr %199, align 8, !tbaa !40
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %202, label %203

202:                                              ; preds = %159
  store i32 1, ptr %15, align 4
  br label %254

203:                                              ; preds = %159
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = call ptr @sqlite3ResultSetOfSelect(ptr noundef %204, ptr noundef %205)
  store ptr %206, ptr %27, align 8, !tbaa !5
  %207 = load ptr, ptr %27, align 8, !tbaa !5
  %208 = icmp eq ptr %207, null
  br i1 %208, label %209, label %210

209:                                              ; preds = %203
  store i32 1, ptr %15, align 4
  br label %254

210:                                              ; preds = %203
  %211 = load ptr, ptr %27, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.Table, ptr %211, i32 0, i32 11
  %213 = load i16, ptr %212, align 2, !tbaa !41
  %214 = load ptr, ptr %11, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.Table, ptr %214, i32 0, i32 11
  store i16 %213, ptr %215, align 2, !tbaa !41
  %216 = load ptr, ptr %27, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.Table, ptr %216, i32 0, i32 1
  %218 = load ptr, ptr %217, align 8, !tbaa !42
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.Table, ptr %219, i32 0, i32 1
  store ptr %218, ptr %220, align 8, !tbaa !42
  %221 = load ptr, ptr %27, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.Table, ptr %221, i32 0, i32 11
  store i16 0, ptr %222, align 2, !tbaa !41
  %223 = load ptr, ptr %27, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.Table, ptr %223, i32 0, i32 1
  store ptr null, ptr %224, align 8, !tbaa !42
  %225 = load ptr, ptr %12, align 8, !tbaa !5
  %226 = load ptr, ptr %27, align 8, !tbaa !5
  call void @sqlite3DeleteTable(ptr noundef %225, ptr noundef %226)
  %227 = load ptr, ptr %17, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.SelectDest, ptr %21, i32 0, i32 2
  %229 = load i32, ptr %228, align 8, !tbaa !43
  %230 = call i32 @sqlite3VdbeAddOp1(ptr noundef %227, i32 noundef 16, i32 noundef %229)
  store i32 %230, ptr %26, align 4, !tbaa !29
  %231 = load ptr, ptr %17, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.SelectDest, ptr %21, i32 0, i32 3
  %233 = load i32, ptr %232, align 4, !tbaa !45
  %234 = getelementptr inbounds %struct.SelectDest, ptr %21, i32 0, i32 4
  %235 = load i32, ptr %234, align 8, !tbaa !46
  %236 = load i32, ptr %24, align 4, !tbaa !29
  %237 = call i32 @sqlite3VdbeAddOp3(ptr noundef %231, i32 noundef 100, i32 noundef %233, i32 noundef %235, i32 noundef %236)
  %238 = load ptr, ptr %17, align 8, !tbaa !5
  %239 = load ptr, ptr %11, align 8, !tbaa !5
  call void @sqlite3TableAffinity(ptr noundef %238, ptr noundef %239, i32 noundef 0)
  %240 = load ptr, ptr %17, align 8, !tbaa !5
  %241 = load i32, ptr %25, align 4, !tbaa !29
  %242 = call i32 @sqlite3VdbeAddOp2(ptr noundef %240, i32 noundef 115, i32 noundef 1, i32 noundef %241)
  %243 = load ptr, ptr %17, align 8, !tbaa !5
  %244 = load i32, ptr %24, align 4, !tbaa !29
  %245 = load i32, ptr %25, align 4, !tbaa !29
  %246 = call i32 @sqlite3VdbeAddOp3(ptr noundef %243, i32 noundef 116, i32 noundef 1, i32 noundef %244, i32 noundef %245)
  %247 = load ptr, ptr %17, align 8, !tbaa !5
  %248 = load i32, ptr %26, align 4, !tbaa !29
  %249 = call i32 @sqlite3VdbeGoto(ptr noundef %247, i32 noundef %248)
  %250 = load ptr, ptr %17, align 8, !tbaa !5
  %251 = load i32, ptr %26, align 4, !tbaa !29
  call void @sqlite3VdbeJumpHere(ptr noundef %250, i32 noundef %251)
  %252 = load ptr, ptr %17, align 8, !tbaa !5
  %253 = call i32 @sqlite3VdbeAddOp1(ptr noundef %252, i32 noundef 112, i32 noundef 1)
  store i32 0, ptr %15, align 4
  br label %254

254:                                              ; preds = %210, %209, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #3
  %255 = load i32, ptr %15, align 4
  switch i32 %255, label %368 [
    i32 0, label %256
  ]

256:                                              ; preds = %254
  br label %257

257:                                              ; preds = %256, %156
  %258 = load ptr, ptr %10, align 8, !tbaa !5
  %259 = icmp ne ptr %258, null
  br i1 %259, label %260, label %264

260:                                              ; preds = %257
  %261 = load ptr, ptr %12, align 8, !tbaa !5
  %262 = load ptr, ptr %11, align 8, !tbaa !5
  %263 = call ptr @createTableStmt(ptr noundef %261, ptr noundef %262)
  store ptr %263, ptr %20, align 8, !tbaa !5
  br label %308

264:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %265 = load i8, ptr %9, align 1, !tbaa !9
  %266 = zext i8 %265 to i32
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %268, label %271

268:                                              ; preds = %264
  %269 = load ptr, ptr %6, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.Parse, ptr %269, i32 0, i32 49
  br label %273

271:                                              ; preds = %264
  %272 = load ptr, ptr %8, align 8, !tbaa !5
  br label %273

273:                                              ; preds = %271, %268
  %274 = phi ptr [ %270, %268 ], [ %272, %271 ]
  store ptr %274, ptr %28, align 8, !tbaa !5
  %275 = load ptr, ptr %28, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.Token, ptr %275, i32 0, i32 0
  %277 = load ptr, ptr %276, align 8, !tbaa !47
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.Parse, ptr %278, i32 0, i32 48
  %280 = getelementptr inbounds %struct.Token, ptr %279, i32 0, i32 0
  %281 = load ptr, ptr %280, align 8, !tbaa !48
  %282 = ptrtoint ptr %277 to i64
  %283 = ptrtoint ptr %281 to i64
  %284 = sub i64 %282, %283
  %285 = trunc i64 %284 to i32
  store i32 %285, ptr %16, align 4, !tbaa !29
  %286 = load ptr, ptr %28, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.Token, ptr %286, i32 0, i32 0
  %288 = load ptr, ptr %287, align 8, !tbaa !47
  %289 = getelementptr inbounds i8, ptr %288, i64 0
  %290 = load i8, ptr %289, align 1, !tbaa !9
  %291 = sext i8 %290 to i32
  %292 = icmp ne i32 %291, 59
  br i1 %292, label %293, label %299

293:                                              ; preds = %273
  %294 = load ptr, ptr %28, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.Token, ptr %294, i32 0, i32 1
  %296 = load i32, ptr %295, align 8, !tbaa !49
  %297 = load i32, ptr %16, align 4, !tbaa !29
  %298 = add i32 %297, %296
  store i32 %298, ptr %16, align 4, !tbaa !29
  br label %299

299:                                              ; preds = %293, %273
  %300 = load ptr, ptr %12, align 8, !tbaa !5
  %301 = load ptr, ptr %19, align 8, !tbaa !5
  %302 = load i32, ptr %16, align 4, !tbaa !29
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.Parse, ptr %303, i32 0, i32 48
  %305 = getelementptr inbounds %struct.Token, ptr %304, i32 0, i32 0
  %306 = load ptr, ptr %305, align 8, !tbaa !48
  %307 = call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef %300, ptr noundef @.str.29, ptr noundef %301, i32 noundef %302, ptr noundef %306)
  store ptr %307, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  br label %308

308:                                              ; preds = %299, %260
  %309 = load ptr, ptr %6, align 8, !tbaa !5
  %310 = load ptr, ptr %12, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.sqlite3, ptr %310, i32 0, i32 4
  %312 = load ptr, ptr %311, align 8, !tbaa !50
  %313 = load i32, ptr %13, align 4, !tbaa !29
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds %struct.Db, ptr %312, i64 %314
  %316 = getelementptr inbounds %struct.Db, ptr %315, i32 0, i32 0
  %317 = load ptr, ptr %316, align 8, !tbaa !51
  %318 = load ptr, ptr %18, align 8, !tbaa !5
  %319 = load ptr, ptr %11, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.Table, ptr %319, i32 0, i32 0
  %321 = load ptr, ptr %320, align 8, !tbaa !27
  %322 = load ptr, ptr %11, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.Table, ptr %322, i32 0, i32 0
  %324 = load ptr, ptr %323, align 8, !tbaa !27
  %325 = load ptr, ptr %6, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.Parse, ptr %325, i32 0, i32 32
  %327 = load i32, ptr %326, align 4, !tbaa !38
  %328 = load ptr, ptr %20, align 8, !tbaa !5
  %329 = load ptr, ptr %6, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.Parse, ptr %329, i32 0, i32 31
  %331 = load i32, ptr %330, align 8, !tbaa !53
  call void (ptr, ptr, ...) @sqlite3NestedParse(ptr noundef %309, ptr noundef @.str.30, ptr noundef %317, ptr noundef @.str, ptr noundef %318, ptr noundef %321, ptr noundef %324, i32 noundef %327, ptr noundef %328, i32 noundef %331)
  %332 = load ptr, ptr %12, align 8, !tbaa !5
  %333 = load ptr, ptr %20, align 8, !tbaa !5
  call void @sqlite3DbFree(ptr noundef %332, ptr noundef %333)
  %334 = load ptr, ptr %6, align 8, !tbaa !5
  %335 = load i32, ptr %13, align 4, !tbaa !29
  call void @sqlite3ChangeCookie(ptr noundef %334, i32 noundef %335)
  %336 = load ptr, ptr %11, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.Table, ptr %336, i32 0, i32 9
  %338 = load i32, ptr %337, align 8, !tbaa !26
  %339 = and i32 %338, 8
  %340 = icmp ne i32 %339, 0
  br i1 %340, label %341, label %360

341:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %342 = load ptr, ptr %12, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.sqlite3, ptr %342, i32 0, i32 4
  %344 = load ptr, ptr %343, align 8, !tbaa !50
  %345 = load i32, ptr %13, align 4, !tbaa !29
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds %struct.Db, ptr %344, i64 %346
  store ptr %347, ptr %29, align 8, !tbaa !5
  %348 = load ptr, ptr %29, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.Db, ptr %348, i32 0, i32 4
  %350 = load ptr, ptr %349, align 8, !tbaa !54
  %351 = getelementptr inbounds %struct.Schema, ptr %350, i32 0, i32 6
  %352 = load ptr, ptr %351, align 8, !tbaa !55
  %353 = icmp eq ptr %352, null
  br i1 %353, label %354, label %359

354:                                              ; preds = %341
  %355 = load ptr, ptr %6, align 8, !tbaa !5
  %356 = load ptr, ptr %29, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.Db, ptr %356, i32 0, i32 0
  %358 = load ptr, ptr %357, align 8, !tbaa !51
  call void (ptr, ptr, ...) @sqlite3NestedParse(ptr noundef %355, ptr noundef @.str.31, ptr noundef %358)
  br label %359

359:                                              ; preds = %354, %341
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  br label %360

360:                                              ; preds = %359, %308
  %361 = load ptr, ptr %17, align 8, !tbaa !5
  %362 = load i32, ptr %13, align 4, !tbaa !29
  %363 = load ptr, ptr %12, align 8, !tbaa !5
  %364 = load ptr, ptr %11, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.Table, ptr %364, i32 0, i32 0
  %366 = load ptr, ptr %365, align 8, !tbaa !27
  %367 = call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef %363, ptr noundef @.str.32, ptr noundef %366)
  call void @sqlite3VdbeAddParseSchemaOp(ptr noundef %361, i32 noundef %362, ptr noundef %367)
  store i32 0, ptr %15, align 4
  br label %368

368:                                              ; preds = %360, %254, %146
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  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 4, ptr %16) #3
  %369 = load i32, ptr %15, align 4
  switch i32 %369, label %434 [
    i32 0, label %370
  ]

370:                                              ; preds = %368
  br label %371

371:                                              ; preds = %370, %135
  %372 = load ptr, ptr %12, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.sqlite3, ptr %372, i32 0, i32 33
  %374 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %373, i32 0, i32 2
  %375 = load i8, ptr %374, align 1, !tbaa !16
  %376 = icmp ne i8 %375, 0
  br i1 %376, label %377, label %433

377:                                              ; preds = %371
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %378 = load ptr, ptr %11, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.Table, ptr %378, i32 0, i32 20
  %380 = load ptr, ptr %379, align 8, !tbaa !28
  store ptr %380, ptr %31, align 8, !tbaa !5
  %381 = load ptr, ptr %31, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.Schema, ptr %381, i32 0, i32 2
  %383 = load ptr, ptr %11, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct.Table, ptr %383, i32 0, i32 0
  %385 = load ptr, ptr %384, align 8, !tbaa !27
  %386 = load ptr, ptr %11, align 8, !tbaa !5
  %387 = call ptr @sqlite3HashInsert(ptr noundef %382, ptr noundef %385, ptr noundef %386)
  store ptr %387, ptr %30, align 8, !tbaa !5
  %388 = load ptr, ptr %30, align 8, !tbaa !5
  %389 = icmp ne ptr %388, null
  br i1 %389, label %390, label %392

390:                                              ; preds = %377
  %391 = load ptr, ptr %12, align 8, !tbaa !5
  call void @sqlite3OomFault(ptr noundef %391)
  store i32 1, ptr %15, align 4
  br label %430

392:                                              ; preds = %377
  %393 = load ptr, ptr %6, align 8, !tbaa !5
  %394 = getelementptr inbounds %struct.Parse, ptr %393, i32 0, i32 61
  store ptr null, ptr %394, align 8, !tbaa !15
  %395 = load ptr, ptr %12, align 8, !tbaa !5
  %396 = getelementptr inbounds %struct.sqlite3, ptr %395, i32 0, i32 6
  %397 = load i32, ptr %396, align 4, !tbaa !57
  %398 = or i32 %397, 2
  store i32 %398, ptr %396, align 4, !tbaa !57
  %399 = load ptr, ptr %11, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.Table, ptr %399, i32 0, i32 3
  %401 = load ptr, ptr %400, align 8, !tbaa !36
  %402 = icmp ne ptr %401, null
  br i1 %402, label %429, label %403

403:                                              ; preds = %392
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %404 = load ptr, ptr %6, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct.Parse, ptr %404, i32 0, i32 48
  %406 = getelementptr inbounds %struct.Token, ptr %405, i32 0, i32 0
  %407 = load ptr, ptr %406, align 8, !tbaa !48
  store ptr %407, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %408 = load ptr, ptr %7, align 8, !tbaa !5
  %409 = getelementptr inbounds %struct.Token, ptr %408, i32 0, i32 0
  %410 = load ptr, ptr %409, align 8, !tbaa !47
  %411 = icmp eq ptr %410, null
  br i1 %411, label %412, label %414

412:                                              ; preds = %403
  %413 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %413, ptr %7, align 8, !tbaa !5
  br label %414

414:                                              ; preds = %412, %403
  %415 = load ptr, ptr %7, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.Token, ptr %415, i32 0, i32 0
  %417 = load ptr, ptr %416, align 8, !tbaa !47
  %418 = load ptr, ptr %32, align 8, !tbaa !5
  %419 = ptrtoint ptr %417 to i64
  %420 = ptrtoint ptr %418 to i64
  %421 = sub i64 %419, %420
  %422 = trunc i64 %421 to i32
  store i32 %422, ptr %33, align 4, !tbaa !29
  %423 = load ptr, ptr %32, align 8, !tbaa !5
  %424 = load i32, ptr %33, align 4, !tbaa !29
  %425 = call i32 @sqlite3Utf8CharLen(ptr noundef %423, i32 noundef %424)
  %426 = add nsw i32 13, %425
  %427 = load ptr, ptr %11, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.Table, ptr %427, i32 0, i32 15
  store i32 %426, ptr %428, align 8, !tbaa !58
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  br label %429

429:                                              ; preds = %414, %392
  store i32 0, ptr %15, align 4
  br label %430

430:                                              ; preds = %429, %390
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  %431 = load i32, ptr %15, align 4
  switch i32 %431, label %434 [
    i32 0, label %432
  ]

432:                                              ; preds = %430
  br label %433

433:                                              ; preds = %432, %371
  store i32 0, ptr %15, align 4
  br label %434

434:                                              ; preds = %433, %430, %368, %84, %49, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  %435 = load i32, ptr %15, align 4
  switch i32 %435, label %437 [
    i32 0, label %436
    i32 1, label %436
  ]

436:                                              ; preds = %434, %434
  ret void

437:                                              ; preds = %434
  unreachable
}

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3MayAbort(ptr noundef) #2

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) #1

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

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

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

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

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

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

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

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

declare i32 @sqlite3Utf8CharLen(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 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 0}
!11 = !{!"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, !13, 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, !13, i64 432, !13, i64 448, !14, 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, !13, i64 536, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584}
!12 = !{!"int", !7, i64 0}
!13 = !{!"Token", !6, i64 0, !12, i64 8}
!14 = !{!"short", !7, i64 0}
!15 = !{!11, !6, i64 512}
!16 = !{!17, !7, i64 169}
!17 = !{!"sqlite3", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !18, i64 48, !18, i64 56, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !14, i64 80, !7, i64 82, !7, i64 83, !7, i64 84, !7, i64 85, !7, i64 86, !7, i64 87, !7, i64 88, !7, i64 89, !7, i64 90, !7, i64 91, !7, i64 92, !7, i64 93, !7, i64 94, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !7, i64 112, !12, i64 160, !19, 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, !20, i64 344, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !12, i64 432, !12, 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, !12, i64 632, !12, i64 636, !12, i64 640, !18, i64 648, !18, i64 656, !6, i64 664}
!18 = !{!"long long", !7, i64 0}
!19 = !{!"sqlite3InitInfo", !12, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7}
!20 = !{!"Lookaside", !12, i64 0, !14, i64 4, !7, i64 6, !12, i64 8, !12, i64 12, !7, i64 16, !6, i64 32, !6, i64 40, !6, i64 48}
!21 = !{!"Hash", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 16}
!22 = !{!"BusyHandler", !6, i64 0, !6, i64 8, !12, i64 16}
!23 = !{!17, !12, i64 164}
!24 = !{!25, !12, i64 56}
!25 = !{!"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, !14, i64 68, !14, i64 70, !14, i64 72, !14, 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}
!26 = !{!25, !12, i64 64}
!27 = !{!25, !6, i64 0}
!28 = !{!25, !6, i64 112}
!29 = !{!12, !12, i64 0}
!30 = !{!25, !6, i64 48}
!31 = !{!25, !6, i64 16}
!32 = !{!33, !6, i64 40}
!33 = !{!"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, !14, i64 92, !14, i64 94, !14, 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}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!25, !6, i64 24}
!37 = !{!11, !12, i64 56}
!38 = !{!11, !12, i64 132}
!39 = !{!11, !12, i64 52}
!40 = !{!11, !12, i64 48}
!41 = !{!25, !14, i64 70}
!42 = !{!25, !6, i64 8}
!43 = !{!44, !12, i64 16}
!44 = !{!"SelectDest", !7, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !6, i64 32}
!45 = !{!44, !12, i64 20}
!46 = !{!44, !12, i64 24}
!47 = !{!13, !6, i64 0}
!48 = !{!11, !6, i64 432}
!49 = !{!13, !12, i64 8}
!50 = !{!17, !6, i64 32}
!51 = !{!52, !6, i64 0}
!52 = !{!"Db", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !6, i64 24}
!53 = !{!11, !12, i64 128}
!54 = !{!52, !6, i64 24}
!55 = !{!56, !6, i64 104}
!56 = !{!"Schema", !12, i64 0, !12, i64 4, !21, i64 8, !21, i64 32, !21, i64 56, !21, i64 80, !6, i64 104, !7, i64 112, !7, i64 113, !14, i64 114, !12, i64 116}
!57 = !{!17, !12, i64 44}
!58 = !{!25, !12, 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.SelectDest = type { i8, ptr, i32, i32, i32, ptr }
%struct.Db = type { ptr, ptr, i8, i8, ptr }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [34 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 void @sqlite3OomFault(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 ptr @sqlite3GetVdbe(ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3NestedParse(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @sqlite3EndTable(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef readonly %2, i8 noundef zeroext %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca %struct.SelectDest, align 8
  %7 = load ptr, ptr %0, align 8, !tbaa !5
  %8 = icmp eq ptr %2, null
  %9 = icmp eq ptr %4, null
  %or.cond = and i1 %8, %9
  br i1 %or.cond, label %166, label %10

10:                                               ; preds = %5
  %11 = getelementptr inbounds i8, ptr %0, i64 512
  %12 = load ptr, ptr %11, align 8, !tbaa !13
  %13 = icmp eq ptr %12, null
  br i1 %13, label %166, label %14

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %7, i64 169
  %16 = load i8, ptr %15, align 1, !tbaa !14
  %.not = icmp eq i8 %16, 0
  br i1 %.not, label %26, label %17

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %7, i64 164
  %19 = load i32, ptr %18, align 4, !tbaa !21
  %20 = getelementptr inbounds i8, ptr %12, i64 56
  store i32 %19, ptr %20, align 8, !tbaa !22
  %21 = icmp eq i32 %19, 1
  br i1 %21, label %22, label %26

22:                                               ; preds = %17
  %23 = getelementptr inbounds i8, ptr %12, i64 64
  %24 = load i32, ptr %23, align 8, !tbaa !24
  %25 = or i32 %24, 1
  store i32 %25, ptr %23, align 8, !tbaa !24
  br label %26

26:                                               ; preds = %17, %22, %14
  %27 = and i8 %3, 32
  %.not155 = icmp eq i8 %27, 0
  br i1 %.not155, label %40, label %28

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %12, i64 64
  %30 = load i32, ptr %29, align 8, !tbaa !24
  %31 = and i32 %30, 8
  %.not156 = icmp eq i32 %31, 0
  br i1 %.not156, label %33, label %32

32:                                               ; preds = %28
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.23) #3
  br label %166

33:                                               ; preds = %28
  %34 = and i32 %30, 4
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = load ptr, ptr %12, align 8, !tbaa !25
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.24, ptr noundef %37) #3
  br label %40

38:                                               ; preds = %33
  %39 = or i32 %30, 96
  store i32 %39, ptr %29, align 8, !tbaa !24
  tail call void @convertToWithoutRowidTable(ptr noundef nonnull %0, ptr noundef nonnull %12)
  br label %40

40:                                               ; preds = %36, %38, %26
  %41 = getelementptr inbounds i8, ptr %12, i64 112
  %42 = load ptr, ptr %41, align 8, !tbaa !26
  %43 = tail call i32 @sqlite3SchemaToIndex(ptr noundef nonnull %7, ptr noundef %42) #3
  %44 = getelementptr inbounds i8, ptr %12, i64 48
  %45 = load ptr, ptr %44, align 8, !tbaa !27
  %.not157 = icmp eq ptr %45, null
  br i1 %.not157, label %47, label %46

46:                                               ; preds = %40
  tail call void @sqlite3ResolveSelfReference(ptr noundef nonnull %0, ptr noundef nonnull %12, i32 noundef 4, ptr noundef null, ptr noundef nonnull %45) #3
  br label %47

47:                                               ; preds = %46, %40
  tail call void @estimateTableWidth(ptr noundef nonnull %12)
  %48 = getelementptr inbounds i8, ptr %12, i64 16
  %.0144173 = load ptr, ptr %48, align 8, !tbaa !28
  %.not158174 = icmp eq ptr %.0144173, null
  br i1 %.not158174, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %47, %.lr.ph
  %.0144175 = phi ptr [ %.0144, %.lr.ph ], [ %.0144173, %47 ]
  tail call void @estimateIndexWidth(ptr noundef nonnull %.0144175)
  %49 = getelementptr inbounds i8, ptr %.0144175, i64 40
  %.0144 = load ptr, ptr %49, align 8, !tbaa !28
  %.not158 = icmp eq ptr %.0144, null
  br i1 %.not158, label %._crit_edge, label %.lr.ph, !llvm.loop !29

._crit_edge:                                      ; preds = %.lr.ph, %47
  %50 = load i8, ptr %15, align 1, !tbaa !14
  %.not159 = icmp eq i8 %50, 0
  br i1 %.not159, label %51, label %.thread

51:                                               ; preds = %._crit_edge
  %52 = tail call ptr @sqlite3GetVdbe(ptr noundef nonnull %0) #3
  %53 = icmp eq ptr %52, null
  br i1 %53, label %166, label %54

54:                                               ; preds = %51
  %55 = tail call i32 @sqlite3VdbeAddOp1(ptr noundef nonnull %52, i32 noundef 112, i32 noundef 0) #3
  %56 = getelementptr inbounds i8, ptr %12, i64 24
  %57 = load ptr, ptr %56, align 8, !tbaa !31
  %58 = icmp eq ptr %57, null
  %.str.26..str.28 = select i1 %58, ptr @.str.26, ptr @.str.28
  %.str.25..str.27 = select i1 %58, ptr @.str.25, ptr @.str.27
  br i1 %9, label %.critedge169, label %59

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #3
  %60 = getelementptr inbounds i8, ptr %0, i64 56
  %61 = load i32, ptr %60, align 8, !tbaa !32
  %62 = add nsw i32 %61, 1
  %63 = add nsw i32 %61, 2
  %64 = add nsw i32 %61, 3
  store i32 %64, ptr %60, align 8, !tbaa !32
  tail call void @sqlite3MayAbort(ptr noundef nonnull %0)
  %65 = getelementptr inbounds i8, ptr %0, i64 132
  %66 = load i32, ptr %65, align 4, !tbaa !33
  %67 = tail call i32 @sqlite3VdbeAddOp3(ptr noundef nonnull %52, i32 noundef 106, i32 noundef 1, i32 noundef %66, i32 noundef %43) #3
  tail call void @sqlite3VdbeChangeP5(ptr noundef nonnull %52, i16 noundef zeroext 16) #3
  %68 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 2, ptr %68, align 4, !tbaa !34
  %69 = tail call i32 @sqlite3VdbeCurrentAddr(ptr noundef nonnull %52) #3
  %70 = add nsw i32 %69, 1
  %71 = tail call i32 @sqlite3VdbeAddOp3(ptr noundef nonnull %52, i32 noundef 15, i32 noundef %62, i32 noundef 0, i32 noundef %70) #3
  call void @sqlite3SelectDestInit(ptr noundef nonnull %6, i32 noundef 13, i32 noundef %62) #3
  %72 = call i32 @sqlite3Select(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef nonnull %6) #3
  call void @sqlite3VdbeEndCoroutine(ptr noundef nonnull %52, i32 noundef %62) #3
  call void @sqlite3VdbeJumpHere(ptr noundef nonnull %52, i32 noundef %69) #3
  %73 = getelementptr inbounds i8, ptr %0, i64 48
  %74 = load i32, ptr %73, align 8, !tbaa !35
  %.not161 = icmp eq i32 %74, 0
  br i1 %.not161, label %75, label %78

75:                                               ; preds = %59
  %76 = call ptr @sqlite3ResultSetOfSelect(ptr noundef nonnull %0, ptr noundef nonnull %4) #3
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %79

78:                                               ; preds = %75, %59
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #3
  br label %166

79:                                               ; preds = %75
  %80 = getelementptr inbounds i8, ptr %76, i64 70
  %81 = load i16, ptr %80, align 2, !tbaa !36
  %82 = getelementptr inbounds i8, ptr %12, i64 70
  store i16 %81, ptr %82, align 2, !tbaa !36
  %83 = getelementptr inbounds i8, ptr %76, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !37
  %85 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr %84, ptr %85, align 8, !tbaa !37
  store i16 0, ptr %80, align 2, !tbaa !36
  store ptr null, ptr %83, align 8, !tbaa !37
  call void @sqlite3DeleteTable(ptr noundef nonnull %7, ptr noundef nonnull %76)
  %86 = getelementptr inbounds i8, ptr %6, i64 16
  %87 = load i32, ptr %86, align 8, !tbaa !38
  %88 = call i32 @sqlite3VdbeAddOp1(ptr noundef nonnull %52, i32 noundef 16, i32 noundef %87) #3
  %89 = getelementptr inbounds i8, ptr %6, i64 20
  %90 = load i32, ptr %89, align 4, !tbaa !40
  %91 = getelementptr inbounds i8, ptr %6, i64 24
  %92 = load i32, ptr %91, align 8, !tbaa !41
  %93 = call i32 @sqlite3VdbeAddOp3(ptr noundef nonnull %52, i32 noundef 100, i32 noundef %90, i32 noundef %92, i32 noundef %63) #3
  call void @sqlite3TableAffinity(ptr noundef nonnull %52, ptr noundef nonnull %12, i32 noundef 0) #3
  %94 = call i32 @sqlite3VdbeAddOp2(ptr noundef nonnull %52, i32 noundef 115, i32 noundef 1, i32 noundef %64) #3
  %95 = call i32 @sqlite3VdbeAddOp3(ptr noundef nonnull %52, i32 noundef 116, i32 noundef 1, i32 noundef %63, i32 noundef %64) #3
  %96 = call i32 @sqlite3VdbeGoto(ptr noundef nonnull %52, i32 noundef %88) #3
  call void @sqlite3VdbeJumpHere(ptr noundef nonnull %52, i32 noundef %88) #3
  %97 = call i32 @sqlite3VdbeAddOp1(ptr noundef nonnull %52, i32 noundef 112, i32 noundef 1) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #3
  %98 = call ptr @createTableStmt(ptr noundef nonnull %7, ptr noundef nonnull %12)
  br label %115

.critedge169:                                     ; preds = %54
  %.not162 = icmp eq i8 %3, 0
  %99 = getelementptr inbounds i8, ptr %0, i64 448
  %100 = select i1 %.not162, ptr %2, ptr %99
  %101 = load ptr, ptr %100, align 8, !tbaa !42
  %102 = getelementptr inbounds i8, ptr %0, i64 432
  %103 = load ptr, ptr %102, align 8, !tbaa !43
  %104 = ptrtoint ptr %101 to i64
  %105 = ptrtoint ptr %103 to i64
  %106 = sub i64 %104, %105
  %107 = trunc i64 %106 to i32
  %108 = load i8, ptr %101, align 1, !tbaa !44
  %.not163 = icmp eq i8 %108, 59
  br i1 %.not163, label %113, label %109

109:                                              ; preds = %.critedge169
  %110 = getelementptr inbounds i8, ptr %100, i64 8
  %111 = load i32, ptr %110, align 8, !tbaa !45
  %112 = add i32 %111, %107
  br label %113

113:                                              ; preds = %109, %.critedge169
  %.0146 = phi i32 [ %112, %109 ], [ %107, %.critedge169 ]
  %114 = tail call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.29, ptr noundef nonnull %.str.26..str.28, i32 noundef %.0146, ptr noundef %103) #3
  br label %115

115:                                              ; preds = %113, %79
  %.0149 = phi ptr [ %98, %79 ], [ %114, %113 ]
  %116 = getelementptr inbounds i8, ptr %7, i64 32
  %117 = load ptr, ptr %116, align 8, !tbaa !46
  %118 = sext i32 %43 to i64
  %119 = getelementptr inbounds %struct.Db, ptr %117, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !47
  %121 = load ptr, ptr %12, align 8, !tbaa !25
  %122 = getelementptr inbounds i8, ptr %0, i64 132
  %123 = load i32, ptr %122, align 4, !tbaa !33
  %124 = getelementptr inbounds i8, ptr %0, i64 128
  %125 = load i32, ptr %124, align 8, !tbaa !49
  call void (ptr, ptr, ...) @sqlite3NestedParse(ptr noundef nonnull %0, ptr noundef nonnull @.str.30, ptr noundef %120, ptr noundef nonnull @.str, ptr noundef nonnull %.str.25..str.27, ptr noundef %121, ptr noundef %121, i32 noundef %123, ptr noundef %.0149, i32 noundef %125)
  call void @sqlite3DbFree(ptr noundef nonnull %7, ptr noundef %.0149) #3
  call void @sqlite3ChangeCookie(ptr noundef nonnull %0, i32 noundef %43)
  %126 = getelementptr inbounds i8, ptr %12, i64 64
  %127 = load i32, ptr %126, align 8, !tbaa !24
  %128 = and i32 %127, 8
  %.not164 = icmp eq i32 %128, 0
  br i1 %.not164, label %139, label %129

129:                                              ; preds = %115
  %130 = load ptr, ptr %116, align 8, !tbaa !46
  %131 = getelementptr inbounds %struct.Db, ptr %130, i64 %118
  %132 = getelementptr inbounds i8, ptr %131, i64 24
  %133 = load ptr, ptr %132, align 8, !tbaa !50
  %134 = getelementptr inbounds i8, ptr %133, i64 104
  %135 = load ptr, ptr %134, align 8, !tbaa !51
  %136 = icmp eq ptr %135, null
  br i1 %136, label %137, label %139

137:                                              ; preds = %129
  %138 = load ptr, ptr %131, align 8, !tbaa !47
  call void (ptr, ptr, ...) @sqlite3NestedParse(ptr noundef nonnull %0, ptr noundef nonnull @.str.31, ptr noundef %138)
  br label %139

139:                                              ; preds = %115, %137, %129
  %140 = load ptr, ptr %12, align 8, !tbaa !25
  %141 = call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.32, ptr noundef %140) #3
  call void @sqlite3VdbeAddParseSchemaOp(ptr noundef nonnull %52, i32 noundef %43, ptr noundef %141) #3
  %.pr = load i8, ptr %15, align 1, !tbaa !14
  %.not165 = icmp eq i8 %.pr, 0
  br i1 %.not165, label %166, label %.thread

.thread:                                          ; preds = %._crit_edge, %139
  %142 = load ptr, ptr %41, align 8, !tbaa !26
  %143 = getelementptr inbounds i8, ptr %142, i64 8
  %144 = load ptr, ptr %12, align 8, !tbaa !25
  %145 = call ptr @sqlite3HashInsert(ptr noundef nonnull %143, ptr noundef %144, ptr noundef nonnull %12) #3
  %.not166 = icmp eq ptr %145, null
  br i1 %.not166, label %147, label %146

146:                                              ; preds = %.thread
  call void @sqlite3OomFault(ptr noundef nonnull %7) #3
  br label %166

147:                                              ; preds = %.thread
  store ptr null, ptr %11, align 8, !tbaa !13
  %148 = getelementptr inbounds i8, ptr %7, i64 44
  %149 = load i32, ptr %148, align 4, !tbaa !53
  %150 = or i32 %149, 2
  store i32 %150, ptr %148, align 4, !tbaa !53
  %151 = getelementptr inbounds i8, ptr %12, i64 24
  %152 = load ptr, ptr %151, align 8, !tbaa !31
  %.not167 = icmp eq ptr %152, null
  br i1 %.not167, label %153, label %166

153:                                              ; preds = %147
  %154 = getelementptr inbounds i8, ptr %0, i64 432
  %155 = load ptr, ptr %154, align 8, !tbaa !43
  %156 = load ptr, ptr %1, align 8, !tbaa !42
  %157 = icmp eq ptr %156, null
  %spec.select = select i1 %157, ptr %2, ptr %1
  %158 = load ptr, ptr %spec.select, align 8, !tbaa !42
  %159 = ptrtoint ptr %158 to i64
  %160 = ptrtoint ptr %155 to i64
  %161 = sub i64 %159, %160
  %162 = trunc i64 %161 to i32
  %163 = call i32 @sqlite3Utf8CharLen(ptr noundef %155, i32 noundef %162) #3
  %164 = add nsw i32 %163, 13
  %165 = getelementptr inbounds i8, ptr %12, i64 80
  store i32 %164, ptr %165, align 8, !tbaa !54
  br label %166

166:                                              ; preds = %146, %153, %147, %139, %51, %78, %10, %5, %32
  ret void
}

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

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

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

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

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

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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


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