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

; 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.DbFixer = type { ptr, ptr, i32, ptr, ptr, 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.SrcList = type { i32, i32, [1 x %struct.SrcList_item] }
%struct.SrcList_item = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, %struct.anon, i8, i32, ptr, ptr, i64, %union.anon.0, ptr }
%struct.anon = type { i8, i8, [2 x i8] }
%union.anon.0 = type { 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.Schema = type { i32, i32, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Hash, ptr, i8, i8, i16, i32 }
%struct.Trigger = type { ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [46 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 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 @sqlite3ExprDelete(ptr noundef, ptr noundef) #1

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

declare void @sqlite3DbFree(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

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

38:                                               ; preds = %10
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.Token, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !15
  %42 = icmp ugt i32 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %38
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %44, ptr noundef @.str)
  br label %344

45:                                               ; preds = %38
  store i32 1, ptr %25, align 4, !tbaa !9
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %46, ptr %26, align 8, !tbaa !5
  br label %56

47:                                               ; preds = %10
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = call i32 @sqlite3TwoPartName(ptr noundef %48, ptr noundef %49, ptr noundef %50, ptr noundef %26)
  store i32 %51, ptr %25, align 4, !tbaa !9
  %52 = load i32, ptr %25, align 4, !tbaa !9
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %47
  br label %344

55:                                               ; preds = %47
  br label %56

56:                                               ; preds = %55, %45
  %57 = load ptr, ptr %17, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %65

59:                                               ; preds = %56
  %60 = load ptr, ptr %24, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.sqlite3, ptr %60, i32 0, i32 17
  %62 = load i8, ptr %61, align 1, !tbaa !16
  %63 = zext i8 %62 to i32
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %59, %56
  br label %344

66:                                               ; preds = %59
  %67 = load ptr, ptr %24, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.sqlite3, ptr %67, i32 0, i32 33
  %69 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %68, i32 0, i32 2
  %70 = load i8, ptr %69, align 1, !tbaa !23
  %71 = zext i8 %70 to i32
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %87

73:                                               ; preds = %66
  %74 = load i32, ptr %25, align 4, !tbaa !9
  %75 = icmp ne i32 %74, 1
  br i1 %75, label %76, label %87

76:                                               ; preds = %73
  %77 = load ptr, ptr %24, align 8, !tbaa !5
  %78 = load ptr, ptr %17, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.SrcList, ptr %78, i32 0, i32 2
  %80 = getelementptr inbounds [1 x %struct.SrcList_item], ptr %79, i64 0, i64 0
  %81 = getelementptr inbounds %struct.SrcList_item, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !24
  call void @sqlite3DbFree(ptr noundef %77, ptr noundef %82)
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.SrcList, ptr %83, i32 0, i32 2
  %85 = getelementptr inbounds [1 x %struct.SrcList_item], ptr %84, i64 0, i64 0
  %86 = getelementptr inbounds %struct.SrcList_item, ptr %85, i32 0, i32 1
  store ptr null, ptr %86, align 8, !tbaa !24
  br label %87

87:                                               ; preds = %76, %73, %66
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = call ptr @sqlite3SrcListLookup(ptr noundef %88, ptr noundef %89)
  store ptr %90, ptr %22, align 8, !tbaa !5
  %91 = load ptr, ptr %24, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.sqlite3, ptr %91, i32 0, i32 33
  %93 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %92, i32 0, i32 2
  %94 = load i8, ptr %93, align 1, !tbaa !23
  %95 = zext i8 %94 to i32
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %117

97:                                               ; preds = %87
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Token, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 8, !tbaa !15
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %117

102:                                              ; preds = %97
  %103 = load ptr, ptr %22, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %117

105:                                              ; preds = %102
  %106 = load ptr, ptr %22, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.Table, ptr %106, i32 0, i32 20
  %108 = load ptr, ptr %107, align 8, !tbaa !27
  %109 = load ptr, ptr %24, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.sqlite3, ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !29
  %112 = getelementptr inbounds %struct.Db, ptr %111, i64 1
  %113 = getelementptr inbounds %struct.Db, ptr %112, i32 0, i32 4
  %114 = load ptr, ptr %113, align 8, !tbaa !30
  %115 = icmp eq ptr %108, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %105
  store i32 1, ptr %25, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %116, %105, %102, %97, %87
  %118 = load ptr, ptr %24, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.sqlite3, ptr %118, i32 0, i32 17
  %120 = load i8, ptr %119, align 1, !tbaa !16
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %122, label %123

122:                                              ; preds = %117
  br label %344

123:                                              ; preds = %117
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = load i32, ptr %25, align 4, !tbaa !9
  %126 = load ptr, ptr %26, align 8, !tbaa !5
  call void @sqlite3FixInit(ptr noundef %27, ptr noundef %124, i32 noundef %125, ptr noundef @.str.1, ptr noundef %126)
  %127 = load ptr, ptr %17, align 8, !tbaa !5
  %128 = call i32 @sqlite3FixSrcList(ptr noundef %27, ptr noundef %127)
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %123
  br label %344

131:                                              ; preds = %123
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = load ptr, ptr %17, align 8, !tbaa !5
  %134 = call ptr @sqlite3SrcListLookup(ptr noundef %132, ptr noundef %133)
  store ptr %134, ptr %22, align 8, !tbaa !5
  %135 = load ptr, ptr %22, align 8, !tbaa !5
  %136 = icmp ne ptr %135, null
  br i1 %136, label %149, label %137

137:                                              ; preds = %131
  %138 = load ptr, ptr %24, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.sqlite3, ptr %138, i32 0, i32 33
  %140 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %139, i32 0, i32 1
  %141 = load i8, ptr %140, align 4, !tbaa !32
  %142 = zext i8 %141 to i32
  %143 = icmp eq i32 %142, 1
  br i1 %143, label %144, label %148

144:                                              ; preds = %137
  %145 = load ptr, ptr %24, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.sqlite3, ptr %145, i32 0, i32 33
  %147 = getelementptr inbounds %struct.sqlite3InitInfo, ptr %146, i32 0, i32 3
  store i8 1, ptr %147, align 2, !tbaa !33
  br label %148

148:                                              ; preds = %144, %137
  br label %344

149:                                              ; preds = %131
  %150 = load ptr, ptr %22, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.Table, ptr %150, i32 0, i32 16
  %152 = load i32, ptr %151, align 4, !tbaa !34
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %156

154:                                              ; preds = %149
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %155, ptr noundef @.str.2)
  br label %344

156:                                              ; preds = %149
  %157 = load ptr, ptr %24, align 8, !tbaa !5
  %158 = load ptr, ptr %26, align 8, !tbaa !5
  %159 = call ptr @sqlite3NameFromToken(ptr noundef %157, ptr noundef %158)
  store ptr %159, ptr %23, align 8, !tbaa !5
  %160 = load ptr, ptr %23, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %167

162:                                              ; preds = %156
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = load ptr, ptr %23, align 8, !tbaa !5
  %165 = call i32 @sqlite3CheckObjectName(ptr noundef %163, ptr noundef %164)
  %166 = icmp ne i32 0, %165
  br i1 %166, label %167, label %168

167:                                              ; preds = %162, %156
  br label %344

168:                                              ; preds = %162
  %169 = load ptr, ptr %24, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.sqlite3, ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !29
  %172 = load i32, ptr %25, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds %struct.Db, ptr %171, i64 %173
  %175 = getelementptr inbounds %struct.Db, ptr %174, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !30
  %177 = getelementptr inbounds %struct.Schema, ptr %176, i32 0, i32 4
  %178 = load ptr, ptr %23, align 8, !tbaa !5
  %179 = call ptr @sqlite3HashFind(ptr noundef %177, ptr noundef %178)
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %191

181:                                              ; preds = %168
  %182 = load i32, ptr %20, align 4, !tbaa !9
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %187, label %184

184:                                              ; preds = %181
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  %186 = load ptr, ptr %26, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %185, ptr noundef @.str.3, ptr noundef %186)
  br label %190

187:                                              ; preds = %181
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = load i32, ptr %25, align 4, !tbaa !9
  call void @sqlite3CodeVerifySchema(ptr noundef %188, i32 noundef %189)
  br label %190

190:                                              ; preds = %187, %184
  br label %344

191:                                              ; preds = %168
  %192 = load ptr, ptr %22, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.Table, ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !35
  %195 = call i32 @sqlite3_strnicmp(ptr noundef %194, ptr noundef @.str.4, i32 noundef 7)
  %196 = icmp eq i32 %195, 0
  br i1 %196, label %197, label %199

197:                                              ; preds = %191
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %198, ptr noundef @.str.5)
  br label %344

199:                                              ; preds = %191
  %200 = load ptr, ptr %22, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.Table, ptr %200, i32 0, i32 3
  %202 = load ptr, ptr %201, align 8, !tbaa !36
  %203 = icmp ne ptr %202, null
  br i1 %203, label %204, label %214

204:                                              ; preds = %199
  %205 = load i32, ptr %14, align 4, !tbaa !9
  %206 = icmp ne i32 %205, 77
  br i1 %206, label %207, label %214

207:                                              ; preds = %204
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  %209 = load i32, ptr %14, align 4, !tbaa !9
  %210 = icmp eq i32 %209, 63
  %211 = zext i1 %210 to i64
  %212 = select i1 %210, ptr @.str.7, ptr @.str.8
  %213 = load ptr, ptr %17, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %208, ptr noundef @.str.6, ptr noundef %212, ptr noundef %213, i32 noundef 0)
  br label %344

214:                                              ; preds = %204, %199
  %215 = load ptr, ptr %22, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.Table, ptr %215, i32 0, i32 3
  %217 = load ptr, ptr %216, align 8, !tbaa !36
  %218 = icmp ne ptr %217, null
  br i1 %218, label %225, label %219

219:                                              ; preds = %214
  %220 = load i32, ptr %14, align 4, !tbaa !9
  %221 = icmp eq i32 %220, 77
  br i1 %221, label %222, label %225

222:                                              ; preds = %219
  %223 = load ptr, ptr %11, align 8, !tbaa !5
  %224 = load ptr, ptr %17, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %223, ptr noundef @.str.9, ptr noundef %224, i32 noundef 0)
  br label %344

225:                                              ; preds = %219, %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  %226 = load ptr, ptr %24, align 8, !tbaa !5
  %227 = load ptr, ptr %22, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.Table, ptr %227, i32 0, i32 20
  %229 = load ptr, ptr %228, align 8, !tbaa !27
  %230 = call i32 @sqlite3SchemaToIndex(ptr noundef %226, ptr noundef %229)
  store i32 %230, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  store i32 7, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %231 = load ptr, ptr %24, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.sqlite3, ptr %231, i32 0, i32 4
  %233 = load ptr, ptr %232, align 8, !tbaa !29
  %234 = load i32, ptr %28, align 4, !tbaa !9
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds %struct.Db, ptr %233, i64 %235
  %237 = getelementptr inbounds %struct.Db, ptr %236, i32 0, i32 0
  %238 = load ptr, ptr %237, align 8, !tbaa !37
  store ptr %238, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %239 = load i32, ptr %19, align 4, !tbaa !9
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %241, label %248

241:                                              ; preds = %225
  %242 = load ptr, ptr %24, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.sqlite3, ptr %242, i32 0, i32 4
  %244 = load ptr, ptr %243, align 8, !tbaa !29
  %245 = getelementptr inbounds %struct.Db, ptr %244, i64 1
  %246 = getelementptr inbounds %struct.Db, ptr %245, i32 0, i32 0
  %247 = load ptr, ptr %246, align 8, !tbaa !37
  br label %250

248:                                              ; preds = %225
  %249 = load ptr, ptr %30, align 8, !tbaa !5
  br label %250

250:                                              ; preds = %248, %241
  %251 = phi ptr [ %247, %241 ], [ %249, %248 ]
  store ptr %251, ptr %31, align 8, !tbaa !5
  %252 = load i32, ptr %28, align 4, !tbaa !9
  %253 = icmp eq i32 %252, 1
  br i1 %253, label %257, label %254

254:                                              ; preds = %250
  %255 = load i32, ptr %19, align 4, !tbaa !9
  %256 = icmp ne i32 %255, 0
  br i1 %256, label %257, label %258

257:                                              ; preds = %254, %250
  store i32 5, ptr %29, align 4, !tbaa !9
  br label %258

258:                                              ; preds = %257, %254
  %259 = load ptr, ptr %11, align 8, !tbaa !5
  %260 = load i32, ptr %29, align 4, !tbaa !9
  %261 = load ptr, ptr %23, align 8, !tbaa !5
  %262 = load ptr, ptr %22, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.Table, ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %263, align 8, !tbaa !35
  %265 = load ptr, ptr %31, align 8, !tbaa !5
  %266 = call i32 @sqlite3AuthCheck(ptr noundef %259, i32 noundef %260, ptr noundef %261, ptr noundef %264, ptr noundef %265)
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %268, label %269

268:                                              ; preds = %258
  store i32 2, ptr %32, align 4
  br label %280

269:                                              ; preds = %258
  %270 = load ptr, ptr %11, align 8, !tbaa !5
  %271 = load i32, ptr %28, align 4, !tbaa !9
  %272 = icmp eq i32 %271, 1
  %273 = zext i1 %272 to i64
  %274 = select i1 %272, ptr @.str.10, ptr @.str.11
  %275 = load ptr, ptr %30, align 8, !tbaa !5
  %276 = call i32 @sqlite3AuthCheck(ptr noundef %270, i32 noundef 18, ptr noundef %274, ptr noundef null, ptr noundef %275)
  %277 = icmp ne i32 %276, 0
  br i1 %277, label %278, label %279

278:                                              ; preds = %269
  store i32 2, ptr %32, align 4
  br label %280

279:                                              ; preds = %269
  store i32 0, ptr %32, align 4
  br label %280

280:                                              ; preds = %279, %278, %268
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  %281 = load i32, ptr %32, align 4
  switch i32 %281, label %362 [
    i32 0, label %282
    i32 2, label %344
  ]

282:                                              ; preds = %280
  %283 = load i32, ptr %14, align 4, !tbaa !9
  %284 = icmp eq i32 %283, 77
  br i1 %284, label %285, label %286

285:                                              ; preds = %282
  store i32 63, ptr %14, align 4, !tbaa !9
  br label %286

286:                                              ; preds = %285, %282
  %287 = load ptr, ptr %24, align 8, !tbaa !5
  %288 = call ptr @sqlite3DbMallocZero(ptr noundef %287, i64 noundef 72)
  store ptr %288, ptr %21, align 8, !tbaa !5
  %289 = load ptr, ptr %21, align 8, !tbaa !5
  %290 = icmp eq ptr %289, null
  br i1 %290, label %291, label %292

291:                                              ; preds = %286
  br label %344

292:                                              ; preds = %286
  %293 = load ptr, ptr %23, align 8, !tbaa !5
  %294 = load ptr, ptr %21, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.Trigger, ptr %294, i32 0, i32 0
  store ptr %293, ptr %295, align 8, !tbaa !38
  store ptr null, ptr %23, align 8, !tbaa !5
  %296 = load ptr, ptr %24, align 8, !tbaa !5
  %297 = load ptr, ptr %17, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.SrcList, ptr %297, i32 0, i32 2
  %299 = getelementptr inbounds [1 x %struct.SrcList_item], ptr %298, i64 0, i64 0
  %300 = getelementptr inbounds %struct.SrcList_item, ptr %299, i32 0, i32 2
  %301 = load ptr, ptr %300, align 8, !tbaa !40
  %302 = call ptr @sqlite3DbStrDup(ptr noundef %296, ptr noundef %301)
  %303 = load ptr, ptr %21, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.Trigger, ptr %303, i32 0, i32 1
  store ptr %302, ptr %304, align 8, !tbaa !41
  %305 = load ptr, ptr %24, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.sqlite3, ptr %305, i32 0, i32 4
  %307 = load ptr, ptr %306, align 8, !tbaa !29
  %308 = load i32, ptr %25, align 4, !tbaa !9
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds %struct.Db, ptr %307, i64 %309
  %311 = getelementptr inbounds %struct.Db, ptr %310, i32 0, i32 4
  %312 = load ptr, ptr %311, align 8, !tbaa !30
  %313 = load ptr, ptr %21, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.Trigger, ptr %313, i32 0, i32 6
  store ptr %312, ptr %314, align 8, !tbaa !42
  %315 = load ptr, ptr %22, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.Table, ptr %315, i32 0, i32 20
  %317 = load ptr, ptr %316, align 8, !tbaa !27
  %318 = load ptr, ptr %21, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.Trigger, ptr %318, i32 0, i32 7
  store ptr %317, ptr %319, align 8, !tbaa !43
  %320 = load i32, ptr %15, align 4, !tbaa !9
  %321 = trunc i32 %320 to i8
  %322 = load ptr, ptr %21, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.Trigger, ptr %322, i32 0, i32 2
  store i8 %321, ptr %323, align 8, !tbaa !44
  %324 = load i32, ptr %14, align 4, !tbaa !9
  %325 = icmp eq i32 %324, 63
  %326 = zext i1 %325 to i64
  %327 = select i1 %325, i32 1, i32 2
  %328 = trunc i32 %327 to i8
  %329 = load ptr, ptr %21, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.Trigger, ptr %329, i32 0, i32 3
  store i8 %328, ptr %330, align 1, !tbaa !45
  %331 = load ptr, ptr %24, align 8, !tbaa !5
  %332 = load ptr, ptr %18, align 8, !tbaa !5
  %333 = call ptr @sqlite3ExprDup(ptr noundef %331, ptr noundef %332, i32 noundef 1)
  %334 = load ptr, ptr %21, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.Trigger, ptr %334, i32 0, i32 4
  store ptr %333, ptr %335, align 8, !tbaa !46
  %336 = load ptr, ptr %24, align 8, !tbaa !5
  %337 = load ptr, ptr %16, align 8, !tbaa !5
  %338 = call ptr @sqlite3IdListDup(ptr noundef %336, ptr noundef %337)
  %339 = load ptr, ptr %21, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.Trigger, ptr %339, i32 0, i32 5
  store ptr %338, ptr %340, align 8, !tbaa !47
  %341 = load ptr, ptr %21, align 8, !tbaa !5
  %342 = load ptr, ptr %11, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.Parse, ptr %342, i32 0, i32 62
  store ptr %341, ptr %343, align 8, !tbaa !48
  br label %344

344:                                              ; preds = %292, %291, %280, %222, %207, %197, %190, %167, %154, %148, %130, %122, %65, %54, %43
  %345 = load ptr, ptr %24, align 8, !tbaa !5
  %346 = load ptr, ptr %23, align 8, !tbaa !5
  call void @sqlite3DbFree(ptr noundef %345, ptr noundef %346)
  %347 = load ptr, ptr %24, align 8, !tbaa !5
  %348 = load ptr, ptr %17, align 8, !tbaa !5
  call void @sqlite3SrcListDelete(ptr noundef %347, ptr noundef %348)
  %349 = load ptr, ptr %24, align 8, !tbaa !5
  %350 = load ptr, ptr %16, align 8, !tbaa !5
  call void @sqlite3IdListDelete(ptr noundef %349, ptr noundef %350)
  %351 = load ptr, ptr %24, align 8, !tbaa !5
  %352 = load ptr, ptr %18, align 8, !tbaa !5
  call void @sqlite3ExprDelete(ptr noundef %351, ptr noundef %352)
  %353 = load ptr, ptr %11, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.Parse, ptr %353, i32 0, i32 62
  %355 = load ptr, ptr %354, align 8, !tbaa !48
  %356 = icmp ne ptr %355, null
  br i1 %356, label %360, label %357

357:                                              ; preds = %344
  %358 = load ptr, ptr %24, align 8, !tbaa !5
  %359 = load ptr, ptr %21, align 8, !tbaa !5
  call void @sqlite3DeleteTrigger(ptr noundef %358, ptr noundef %359)
  br label %361

360:                                              ; preds = %344
  br label %361

361:                                              ; preds = %360, %357
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  ret void

362:                                              ; preds = %280
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

@.str = external hidden unnamed_addr constant [46 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 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 @sqlite3ExprDelete(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare void @sqlite3DbFree(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

; Function Attrs: nounwind uwtable
define dso_local void @sqlite3BeginTrigger(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, i32 noundef %9) local_unnamed_addr #2 {
  %11 = alloca ptr, align 8
  %12 = alloca %struct.DbFixer, align 8
  %13 = load ptr, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %12) #3
  %14 = icmp ne i32 %8, 0
  br i1 %14, label %15, label %20

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !13
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %19, label %18

18:                                               ; preds = %15
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str) #3
  br label %.thread

19:                                               ; preds = %15
  store ptr %1, ptr %11, align 8, !tbaa !14
  %.old10.not = icmp eq ptr %6, null
  br i1 %.old10.not, label %.thread, label %24

20:                                               ; preds = %10
  %21 = call i32 @sqlite3TwoPartName(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %11) #3
  %22 = icmp sgt i32 %21, -1
  %23 = icmp ne ptr %6, null
  %or.cond11 = and i1 %23, %22
  br i1 %or.cond11, label %24, label %.thread

24:                                               ; preds = %20, %19
  %.0122 = phi i32 [ 1, %19 ], [ %21, %20 ]
  %25 = getelementptr inbounds i8, ptr %13, i64 85
  %26 = load i8, ptr %25, align 1, !tbaa !15
  %.not132 = icmp eq i8 %26, 0
  br i1 %.not132, label %27, label %.thread

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %13, i64 169
  %29 = load i8, ptr %28, align 1, !tbaa !22
  %30 = icmp ne i8 %29, 0
  %31 = icmp ne i32 %.0122, 1
  %or.cond = and i1 %31, %30
  br i1 %or.cond, label %32, label %35

32:                                               ; preds = %27
  %33 = getelementptr inbounds i8, ptr %6, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !23
  call void @sqlite3DbFree(ptr noundef nonnull %13, ptr noundef %34) #3
  store ptr null, ptr %33, align 8, !tbaa !23
  br label %35

35:                                               ; preds = %32, %27
  %36 = call ptr @sqlite3SrcListLookup(ptr noundef nonnull %0, ptr noundef nonnull %6) #3
  %37 = load i8, ptr %28, align 1, !tbaa !22
  %38 = icmp eq i8 %37, 0
  br i1 %38, label %39, label %52

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %2, i64 8
  %41 = load i32, ptr %40, align 8, !tbaa !13
  %42 = icmp eq i32 %41, 0
  %43 = icmp ne ptr %36, null
  %or.cond3 = select i1 %42, i1 %43, i1 false
  br i1 %or.cond3, label %44, label %52

44:                                               ; preds = %39
  %45 = getelementptr inbounds i8, ptr %36, i64 112
  %46 = load ptr, ptr %45, align 8, !tbaa !26
  %47 = getelementptr inbounds i8, ptr %13, i64 32
  %48 = load ptr, ptr %47, align 8, !tbaa !28
  %49 = getelementptr inbounds i8, ptr %48, i64 56
  %50 = load ptr, ptr %49, align 8, !tbaa !29
  %51 = icmp eq ptr %46, %50
  %spec.select = select i1 %51, i32 1, i32 %.0122
  br label %52

52:                                               ; preds = %44, %39, %35
  %.1 = phi i32 [ %.0122, %39 ], [ %.0122, %35 ], [ %spec.select, %44 ]
  %53 = load i8, ptr %25, align 1, !tbaa !15
  %.not133 = icmp eq i8 %53, 0
  br i1 %.not133, label %54, label %.thread

54:                                               ; preds = %52
  %55 = load ptr, ptr %11, align 8, !tbaa !14
  call void @sqlite3FixInit(ptr noundef nonnull %12, ptr noundef nonnull %0, i32 noundef %.1, ptr noundef nonnull @.str.1, ptr noundef %55) #3
  %56 = call i32 @sqlite3FixSrcList(ptr noundef nonnull %12, ptr noundef nonnull %6) #3
  %.not134 = icmp eq i32 %56, 0
  br i1 %.not134, label %57, label %.thread

57:                                               ; preds = %54
  %58 = call ptr @sqlite3SrcListLookup(ptr noundef nonnull %0, ptr noundef nonnull %6) #3
  %.not135 = icmp eq ptr %58, null
  br i1 %.not135, label %59, label %65

59:                                               ; preds = %57
  %60 = getelementptr inbounds i8, ptr %13, i64 168
  %61 = load i8, ptr %60, align 4, !tbaa !31
  %62 = icmp eq i8 %61, 1
  br i1 %62, label %63, label %.thread

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %13, i64 170
  store i8 1, ptr %64, align 2, !tbaa !32
  br label %.thread

65:                                               ; preds = %57
  %66 = getelementptr inbounds i8, ptr %58, i64 84
  %67 = load i32, ptr %66, align 4, !tbaa !33
  %.not136 = icmp eq i32 %67, 0
  br i1 %.not136, label %69, label %68

68:                                               ; preds = %65
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.2) #3
  br label %.thread

69:                                               ; preds = %65
  %70 = load ptr, ptr %11, align 8, !tbaa !14
  %71 = call ptr @sqlite3NameFromToken(ptr noundef nonnull %13, ptr noundef %70) #3
  %.not137 = icmp eq ptr %71, null
  br i1 %.not137, label %.thread, label %72

72:                                               ; preds = %69
  %73 = call i32 @sqlite3CheckObjectName(ptr noundef nonnull %0, ptr noundef nonnull %71) #3
  %.not138 = icmp eq i32 %73, 0
  br i1 %.not138, label %74, label %.thread

74:                                               ; preds = %72
  %75 = getelementptr inbounds i8, ptr %13, i64 32
  %76 = load ptr, ptr %75, align 8, !tbaa !28
  %77 = zext nneg i32 %.1 to i64
  %78 = getelementptr inbounds %struct.Db, ptr %76, i64 %77, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !29
  %80 = getelementptr inbounds i8, ptr %79, i64 56
  %81 = call ptr @sqlite3HashFind(ptr noundef nonnull %80, ptr noundef nonnull %71) #3
  %.not139 = icmp eq ptr %81, null
  br i1 %.not139, label %86, label %82

82:                                               ; preds = %74
  %.not142 = icmp eq i32 %9, 0
  br i1 %.not142, label %83, label %85

83:                                               ; preds = %82
  %84 = load ptr, ptr %11, align 8, !tbaa !14
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.3, ptr noundef %84) #3
  br label %.thread

85:                                               ; preds = %82
  call void @sqlite3CodeVerifySchema(ptr noundef nonnull %0, i32 noundef %.1) #3
  br label %.thread

86:                                               ; preds = %74
  %87 = load ptr, ptr %58, align 8, !tbaa !34
  %88 = call i32 @sqlite3_strnicmp(ptr noundef %87, ptr noundef nonnull @.str.4, i32 noundef 7) #3
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %86
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.5) #3
  br label %.thread

91:                                               ; preds = %86
  %92 = getelementptr inbounds i8, ptr %58, i64 24
  %93 = load ptr, ptr %92, align 8, !tbaa !35
  %94 = icmp ne ptr %93, null
  %95 = icmp ne i32 %3, 77
  %or.cond5 = and i1 %95, %94
  br i1 %or.cond5, label %96, label %99

96:                                               ; preds = %91
  %97 = icmp eq i32 %3, 63
  %98 = select i1 %97, ptr @.str.7, ptr @.str.8
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.6, ptr noundef nonnull %98, ptr noundef nonnull %6, i32 noundef 0) #3
  br label %.thread

99:                                               ; preds = %91
  %100 = icmp eq ptr %93, null
  %101 = icmp eq i32 %3, 77
  %or.cond7 = and i1 %101, %100
  br i1 %or.cond7, label %102, label %103

102:                                              ; preds = %99
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.9, ptr noundef nonnull %6, i32 noundef 0) #3
  br label %.thread

103:                                              ; preds = %99
  %104 = getelementptr inbounds i8, ptr %58, i64 112
  %105 = load ptr, ptr %104, align 8, !tbaa !26
  %106 = call i32 @sqlite3SchemaToIndex(ptr noundef nonnull %13, ptr noundef %105) #3
  %107 = load ptr, ptr %75, align 8, !tbaa !28
  %108 = sext i32 %106 to i64
  %109 = getelementptr inbounds %struct.Db, ptr %107, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !36
  br i1 %14, label %111, label %114

111:                                              ; preds = %103
  %112 = getelementptr inbounds i8, ptr %107, i64 32
  %113 = load ptr, ptr %112, align 8, !tbaa !36
  br label %114

114:                                              ; preds = %103, %111
  %115 = phi ptr [ %113, %111 ], [ %110, %103 ]
  %116 = icmp eq i32 %106, 1
  %or.cond9 = or i1 %14, %116
  %spec.select144 = select i1 %or.cond9, i32 5, i32 7
  %117 = load ptr, ptr %58, align 8, !tbaa !34
  %118 = call i32 @sqlite3AuthCheck(ptr noundef nonnull %0, i32 noundef %spec.select144, ptr noundef nonnull %71, ptr noundef %117, ptr noundef %115) #3
  %.not140 = icmp eq i32 %118, 0
  br i1 %.not140, label %119, label %.thread

119:                                              ; preds = %114
  %120 = select i1 %116, ptr @.str.10, ptr @.str.11
  %121 = call i32 @sqlite3AuthCheck(ptr noundef nonnull %0, i32 noundef 18, ptr noundef nonnull %120, ptr noundef null, ptr noundef %110) #3
  %.not141 = icmp eq i32 %121, 0
  br i1 %.not141, label %122, label %.thread

122:                                              ; preds = %119
  %123 = call ptr @sqlite3DbMallocZero(ptr noundef nonnull %13, i64 noundef 72) #3
  %124 = icmp eq ptr %123, null
  br i1 %124, label %.thread, label %125

125:                                              ; preds = %122
  store ptr %71, ptr %123, align 8, !tbaa !37
  %126 = getelementptr inbounds i8, ptr %6, i64 24
  %127 = load ptr, ptr %126, align 8, !tbaa !39
  %128 = call ptr @sqlite3DbStrDup(ptr noundef nonnull %13, ptr noundef %127) #3
  %129 = getelementptr inbounds i8, ptr %123, i64 8
  store ptr %128, ptr %129, align 8, !tbaa !40
  %130 = load ptr, ptr %75, align 8, !tbaa !28
  %131 = getelementptr inbounds %struct.Db, ptr %130, i64 %77, i32 4
  %132 = load ptr, ptr %131, align 8, !tbaa !29
  %133 = getelementptr inbounds i8, ptr %123, i64 40
  store ptr %132, ptr %133, align 8, !tbaa !41
  %134 = load ptr, ptr %104, align 8, !tbaa !26
  %135 = getelementptr inbounds i8, ptr %123, i64 48
  store ptr %134, ptr %135, align 8, !tbaa !42
  %136 = trunc i32 %4 to i8
  %137 = getelementptr inbounds i8, ptr %123, i64 16
  store i8 %136, ptr %137, align 8, !tbaa !43
  %138 = icmp eq i32 %3, 63
  %139 = or i1 %101, %138
  %140 = select i1 %139, i8 1, i8 2
  %141 = getelementptr inbounds i8, ptr %123, i64 17
  store i8 %140, ptr %141, align 1, !tbaa !44
  %142 = call ptr @sqlite3ExprDup(ptr noundef nonnull %13, ptr noundef %7, i32 noundef 1) #3
  %143 = getelementptr inbounds i8, ptr %123, i64 24
  store ptr %142, ptr %143, align 8, !tbaa !45
  %144 = call ptr @sqlite3IdListDup(ptr noundef nonnull %13, ptr noundef %5) #3
  %145 = getelementptr inbounds i8, ptr %123, i64 32
  store ptr %144, ptr %145, align 8, !tbaa !46
  %146 = getelementptr inbounds i8, ptr %0, i64 520
  store ptr %123, ptr %146, align 8, !tbaa !47
  br label %.thread

.thread:                                          ; preds = %119, %114, %122, %83, %85, %69, %72, %59, %63, %54, %52, %19, %24, %20, %125, %102, %96, %90, %68, %18
  %.0123 = phi ptr [ null, %18 ], [ null, %24 ], [ null, %52 ], [ null, %54 ], [ null, %68 ], [ %71, %72 ], [ %71, %85 ], [ %71, %83 ], [ %71, %90 ], [ %71, %96 ], [ %71, %102 ], [ %71, %122 ], [ null, %125 ], [ null, %69 ], [ null, %63 ], [ null, %59 ], [ null, %19 ], [ null, %20 ], [ %71, %114 ], [ %71, %119 ]
  %.0120 = phi ptr [ null, %18 ], [ null, %24 ], [ null, %52 ], [ null, %54 ], [ null, %68 ], [ null, %72 ], [ null, %85 ], [ null, %83 ], [ null, %90 ], [ null, %96 ], [ null, %102 ], [ null, %122 ], [ %123, %125 ], [ null, %69 ], [ null, %63 ], [ null, %59 ], [ null, %19 ], [ null, %20 ], [ null, %114 ], [ null, %119 ]
  call void @sqlite3DbFree(ptr noundef %13, ptr noundef %.0123) #3
  call void @sqlite3SrcListDelete(ptr noundef %13, ptr noundef %6) #3
  call void @sqlite3IdListDelete(ptr noundef %13, ptr noundef %5) #3
  call void @sqlite3ExprDelete(ptr noundef %13, ptr noundef %7) #3
  %147 = getelementptr inbounds i8, ptr %0, i64 520
  %148 = load ptr, ptr %147, align 8, !tbaa !47
  %.not143 = icmp eq ptr %148, null
  br i1 %.not143, label %149, label %150

149:                                              ; preds = %.thread
  call void @sqlite3DeleteTrigger(ptr noundef %13, ptr noundef %.0120)
  br label %150

150:                                              ; preds = %.thread, %149
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  ret void
}

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

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

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

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

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

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

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

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

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

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

declare i32 @sqlite3SchemaToIndex(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

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

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

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

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

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

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

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 = !{!11, !10, i64 8}
!14 = !{!7, !7, i64 0}
!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 = !{!16, !8, i64 169}
!23 = !{!24, !7, i64 8}
!24 = !{!"SrcList_item", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !25, i64 60, !8, i64 64, !10, i64 68, !7, i64 72, !7, i64 80, !17, i64 88, !8, i64 96, !7, i64 104}
!25 = !{!"", !8, i64 0, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1}
!26 = !{!27, !7, i64 112}
!27 = !{!"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}
!28 = !{!16, !7, i64 32}
!29 = !{!30, !7, i64 24}
!30 = !{!"Db", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !7, i64 24}
!31 = !{!16, !8, i64 168}
!32 = !{!16, !8, i64 170}
!33 = !{!27, !10, i64 84}
!34 = !{!27, !7, i64 0}
!35 = !{!27, !7, i64 24}
!36 = !{!30, !7, i64 0}
!37 = !{!38, !7, i64 0}
!38 = !{!"Trigger", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!39 = !{!24, !7, i64 16}
!40 = !{!38, !7, i64 8}
!41 = !{!38, !7, i64 40}
!42 = !{!38, !7, i64 48}
!43 = !{!38, !8, i64 16}
!44 = !{!38, !8, i64 17}
!45 = !{!38, !7, i64 24}
!46 = !{!38, !7, i64 32}
!47 = !{!6, !7, i64 520}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass