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

; 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.FKey = type { ptr, ptr, ptr, ptr, ptr, i32, i8, [2 x i8], [2 x ptr], [1 x %struct.sColMap] }
%struct.sColMap = type { i32, ptr }
%struct.Table = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i16, i16, i16, i16, i8, i32, i32, ptr, ptr, ptr, ptr, ptr }
%struct.Column = type { ptr, ptr, ptr, i8, i8, i8, i8 }
%struct.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.Index = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i16, i16, i16, i8, i8 }

@sqlite3StrBINARY = external constant [0 x i8], align 1
@.str = external hidden unnamed_addr constant [45 x i8], align 1

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

33:                                               ; preds = %5
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Table, ptr %34, i32 0, i32 10
  %36 = load i16, ptr %35, align 4, !tbaa !15
  %37 = sext i16 %36 to i32
  %38 = icmp sge i32 %37, 0
  br i1 %38, label %39, label %59

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

42:                                               ; preds = %39
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %277

43:                                               ; preds = %39
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.Table, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.Table, ptr %47, i32 0, i32 10
  %49 = load i16, ptr %48, align 4, !tbaa !15
  %50 = sext i16 %49 to i64
  %51 = getelementptr inbounds %struct.Column, ptr %46, i64 %50
  %52 = getelementptr inbounds %struct.Column, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = load ptr, ptr %15, align 8, !tbaa !5
  %55 = call i32 @sqlite3StrICmp(ptr noundef %53, ptr noundef %54)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %58, label %57

57:                                               ; preds = %43
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %277

58:                                               ; preds = %43
  br label %59

59:                                               ; preds = %58, %33
  br label %78

60:                                               ; preds = %5
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %77

63:                                               ; preds = %60
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.Parse, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !21
  %67 = load i32, ptr %14, align 4, !tbaa !12
  %68 = sext i32 %67 to i64
  %69 = mul i64 %68, 4
  %70 = call ptr @sqlite3DbMallocRawNN(ptr noundef %66, i64 noundef %69)
  store ptr %70, ptr %13, align 8, !tbaa !5
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %74, label %73

73:                                               ; preds = %63
  store i32 1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %277

74:                                               ; preds = %63
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %75, ptr %76, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %74, %60
  br label %78

78:                                               ; preds = %77, %59
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.Table, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !24
  store ptr %81, ptr %12, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %247, %78
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %251

85:                                               ; preds = %82
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.Index, ptr %86, i32 0, i32 13
  %88 = load i16, ptr %87, align 2, !tbaa !25
  %89 = zext i16 %88 to i32
  %90 = load i32, ptr %14, align 4, !tbaa !12
  %91 = icmp eq i32 %89, %90
  br i1 %91, label %92, label %246

92:                                               ; preds = %85
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.Index, ptr %93, i32 0, i32 15
  %95 = load i8, ptr %94, align 2, !tbaa !27
  %96 = zext i8 %95 to i32
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %246

98:                                               ; preds = %92
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.Index, ptr %99, i32 0, i32 9
  %101 = load ptr, ptr %100, align 8, !tbaa !28
  %102 = icmp eq ptr %101, null
  br i1 %102, label %103, label %246

103:                                              ; preds = %98
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %139

106:                                              ; preds = %103
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.Index, ptr %107, i32 0, i32 16
  %109 = load i8, ptr %108, align 1
  %110 = and i8 %109, 3
  %111 = zext i8 %110 to i32
  %112 = icmp eq i32 %111, 2
  br i1 %112, label %113, label %138

113:                                              ; preds = %106
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %137

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !12
  br label %117

117:                                              ; preds = %133, %116
  %118 = load i32, ptr %17, align 4, !tbaa !12
  %119 = load i32, ptr %14, align 4, !tbaa !12
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %121, label %136

121:                                              ; preds = %117
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.FKey, ptr %122, i32 0, i32 9
  %124 = load i32, ptr %17, align 4, !tbaa !12
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1 x %struct.sColMap], ptr %123, i64 0, i64 %125
  %127 = getelementptr inbounds %struct.sColMap, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !29
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = load i32, ptr %17, align 4, !tbaa !12
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %129, i64 %131
  store i32 %128, ptr %132, align 4, !tbaa !12
  br label %133

133:                                              ; preds = %121
  %134 = load i32, ptr %17, align 4, !tbaa !12
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %17, align 4, !tbaa !12
  br label %117, !llvm.loop !30

136:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %137

137:                                              ; preds = %136, %113
  br label %251

138:                                              ; preds = %106
  br label %245

139:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 0, ptr %18, align 4, !tbaa !12
  br label %140

140:                                              ; preds = %233, %139
  %141 = load i32, ptr %18, align 4, !tbaa !12
  %142 = load i32, ptr %14, align 4, !tbaa !12
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %144, label %236

144:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 2, ptr %20) #3
  %145 = load ptr, ptr %12, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.Index, ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !32
  %148 = load i32, ptr %18, align 4, !tbaa !12
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i16, ptr %147, i64 %149
  %151 = load i16, ptr %150, align 2, !tbaa !33
  store i16 %151, ptr %20, align 2, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %152 = load i16, ptr %20, align 2, !tbaa !33
  %153 = sext i16 %152 to i32
  %154 = icmp slt i32 %153, 0
  br i1 %154, label %155, label %156

155:                                              ; preds = %144
  store i32 8, ptr %16, align 4
  br label %230

156:                                              ; preds = %144
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.Table, ptr %157, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8, !tbaa !18
  %160 = load i16, ptr %20, align 2, !tbaa !33
  %161 = sext i16 %160 to i64
  %162 = getelementptr inbounds %struct.Column, ptr %159, i64 %161
  %163 = getelementptr inbounds %struct.Column, ptr %162, i32 0, i32 2
  %164 = load ptr, ptr %163, align 8, !tbaa !34
  store ptr %164, ptr %21, align 8, !tbaa !5
  %165 = load ptr, ptr %21, align 8, !tbaa !5
  %166 = icmp ne ptr %165, null
  br i1 %166, label %168, label %167

167:                                              ; preds = %156
  store ptr @sqlite3StrBINARY, ptr %21, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %167, %156
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.Index, ptr %169, i32 0, i32 8
  %171 = load ptr, ptr %170, align 8, !tbaa !35
  %172 = load i32, ptr %18, align 4, !tbaa !12
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds ptr, ptr %171, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  %176 = load ptr, ptr %21, align 8, !tbaa !5
  %177 = call i32 @sqlite3StrICmp(ptr noundef %175, ptr noundef %176)
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %180

179:                                              ; preds = %168
  store i32 8, ptr %16, align 4
  br label %230

180:                                              ; preds = %168
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.Table, ptr %181, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8, !tbaa !18
  %184 = load i16, ptr %20, align 2, !tbaa !33
  %185 = sext i16 %184 to i64
  %186 = getelementptr inbounds %struct.Column, ptr %183, i64 %185
  %187 = getelementptr inbounds %struct.Column, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !19
  store ptr %188, ptr %22, align 8, !tbaa !5
  store i32 0, ptr %19, align 4, !tbaa !12
  br label %189

189:                                              ; preds = %221, %180
  %190 = load i32, ptr %19, align 4, !tbaa !12
  %191 = load i32, ptr %14, align 4, !tbaa !12
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %193, label %224

193:                                              ; preds = %189
  %194 = load ptr, ptr %9, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.FKey, ptr %194, i32 0, i32 9
  %196 = load i32, ptr %19, align 4, !tbaa !12
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [1 x %struct.sColMap], ptr %195, i64 0, i64 %197
  %199 = getelementptr inbounds %struct.sColMap, ptr %198, i32 0, i32 1
  %200 = load ptr, ptr %199, align 8, !tbaa !13
  %201 = load ptr, ptr %22, align 8, !tbaa !5
  %202 = call i32 @sqlite3StrICmp(ptr noundef %200, ptr noundef %201)
  %203 = icmp eq i32 %202, 0
  br i1 %203, label %204, label %220

204:                                              ; preds = %193
  %205 = load ptr, ptr %13, align 8, !tbaa !5
  %206 = icmp ne ptr %205, null
  br i1 %206, label %207, label %219

207:                                              ; preds = %204
  %208 = load ptr, ptr %9, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.FKey, ptr %208, i32 0, i32 9
  %210 = load i32, ptr %19, align 4, !tbaa !12
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [1 x %struct.sColMap], ptr %209, i64 0, i64 %211
  %213 = getelementptr inbounds %struct.sColMap, ptr %212, i32 0, i32 0
  %214 = load i32, ptr %213, align 8, !tbaa !29
  %215 = load ptr, ptr %13, align 8, !tbaa !5
  %216 = load i32, ptr %18, align 4, !tbaa !12
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i32, ptr %215, i64 %217
  store i32 %214, ptr %218, align 4, !tbaa !12
  br label %219

219:                                              ; preds = %207, %204
  br label %224

220:                                              ; preds = %193
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %19, align 4, !tbaa !12
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %19, align 4, !tbaa !12
  br label %189, !llvm.loop !36

224:                                              ; preds = %219, %189
  %225 = load i32, ptr %19, align 4, !tbaa !12
  %226 = load i32, ptr %14, align 4, !tbaa !12
  %227 = icmp eq i32 %225, %226
  br i1 %227, label %228, label %229

228:                                              ; preds = %224
  store i32 8, ptr %16, align 4
  br label %230

229:                                              ; preds = %224
  store i32 0, ptr %16, align 4
  br label %230

230:                                              ; preds = %229, %228, %179, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %20) #3
  %231 = load i32, ptr %16, align 4
  switch i32 %231, label %279 [
    i32 0, label %232
    i32 8, label %236
  ]

232:                                              ; preds = %230
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %18, align 4, !tbaa !12
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %18, align 4, !tbaa !12
  br label %140, !llvm.loop !37

236:                                              ; preds = %230, %140
  %237 = load i32, ptr %18, align 4, !tbaa !12
  %238 = load i32, ptr %14, align 4, !tbaa !12
  %239 = icmp eq i32 %237, %238
  br i1 %239, label %240, label %241

240:                                              ; preds = %236
  store i32 2, ptr %16, align 4
  br label %242

241:                                              ; preds = %236
  store i32 0, ptr %16, align 4
  br label %242

242:                                              ; preds = %241, %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  %243 = load i32, ptr %16, align 4
  switch i32 %243, label %279 [
    i32 0, label %244
    i32 2, label %251
  ]

244:                                              ; preds = %242
  br label %245

245:                                              ; preds = %244, %138
  br label %246

246:                                              ; preds = %245, %98, %92, %85
  br label %247

247:                                              ; preds = %246
  %248 = load ptr, ptr %12, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.Index, ptr %248, i32 0, i32 5
  %250 = load ptr, ptr %249, align 8, !tbaa !38
  store ptr %250, ptr %12, align 8, !tbaa !5
  br label %82, !llvm.loop !39

251:                                              ; preds = %242, %137, %82
  %252 = load ptr, ptr %12, align 8, !tbaa !5
  %253 = icmp ne ptr %252, null
  br i1 %253, label %274, label %254

254:                                              ; preds = %251
  %255 = load ptr, ptr %7, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.Parse, ptr %255, i32 0, i32 45
  %257 = load i8, ptr %256, align 2, !tbaa !40
  %258 = icmp ne i8 %257, 0
  br i1 %258, label %269, label %259

259:                                              ; preds = %254
  %260 = load ptr, ptr %7, align 8, !tbaa !5
  %261 = load ptr, ptr %9, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.FKey, ptr %261, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8, !tbaa !41
  %264 = getelementptr inbounds %struct.Table, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !42
  %266 = load ptr, ptr %9, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.FKey, ptr %266, i32 0, i32 2
  %268 = load ptr, ptr %267, align 8, !tbaa !43
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %260, ptr noundef @.str, ptr noundef %265, ptr noundef %268)
  br label %269

269:                                              ; preds = %259, %254
  %270 = load ptr, ptr %7, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.Parse, ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !21
  %273 = load ptr, ptr %13, align 8, !tbaa !5
  call void @sqlite3DbFree(ptr noundef %272, ptr noundef %273)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %277

274:                                              ; preds = %251
  %275 = load ptr, ptr %12, align 8, !tbaa !5
  %276 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %275, ptr %276, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %277

277:                                              ; preds = %274, %269, %73, %57, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %278 = load i32, ptr %6, align 4
  ret i32 %278

279:                                              ; preds = %242, %230
  unreachable
}

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

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

declare ptr @sqlite3DbMallocRawNN(ptr noundef, i64 noundef) #2

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 40}
!10 = !{!"FKey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !7, i64 44, !7, i64 45, !7, i64 48, !7, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"sColMap", !11, i64 0, !6, i64 8}
!15 = !{!16, !17, i64 68}
!16 = !{!"Table", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !17, i64 68, !17, i64 70, !17, i64 72, !17, i64 74, !7, i64 76, !11, i64 80, !11, i64 84, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!17 = !{!"short", !7, i64 0}
!18 = !{!16, !6, i64 8}
!19 = !{!20, !6, i64 0}
!20 = !{!"Column", !6, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27}
!21 = !{!22, !6, i64 0}
!22 = !{!"Parse", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !7, i64 28, !7, i64 29, !7, i64 30, !7, i64 31, !7, i64 32, !7, i64 33, !7, i64 34, !7, i64 35, !7, i64 36, !7, i64 37, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !6, i64 88, !6, i64 96, !23, i64 104, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !7, i64 192, !7, i64 193, !7, i64 194, !7, i64 196, !7, i64 396, !23, i64 432, !23, i64 448, !17, i64 464, !7, i64 466, !7, i64 467, !7, i64 468, !11, i64 472, !11, i64 476, !11, i64 480, !11, i64 484, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !23, i64 536, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584}
!23 = !{!"Token", !6, i64 0, !11, i64 8}
!24 = !{!16, !6, i64 16}
!25 = !{!26, !17, i64 94}
!26 = !{!"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, !11, i64 88, !17, i64 92, !17, i64 94, !17, i64 96, !7, i64 98, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99}
!27 = !{!26, !7, i64 98}
!28 = !{!26, !6, i64 72}
!29 = !{!14, !11, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!26, !6, i64 8}
!33 = !{!17, !17, i64 0}
!34 = !{!20, !6, i64 16}
!35 = !{!26, !6, i64 64}
!36 = distinct !{!36, !31}
!37 = distinct !{!37, !31}
!38 = !{!26, !6, i64 40}
!39 = distinct !{!39, !31}
!40 = !{!22, !7, i64 194}
!41 = !{!10, !6, i64 0}
!42 = !{!16, !6, i64 0}
!43 = !{!10, !6, i64 16}


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

@sqlite3StrBINARY = external constant [0 x i8], align 1
@.str = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @sqlite3FkLocateIndex(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef writeonly %3, ptr noundef writeonly %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %2, i64 40
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %.fr = freeze i32 %7
  %8 = getelementptr i8, ptr %2, i64 64
  %9 = getelementptr inbounds i8, ptr %2, i64 72
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %.fr139 = freeze ptr %10
  %11 = icmp eq i32 %.fr, 1
  br i1 %11, label %12, label %24

12:                                               ; preds = %5
  %13 = getelementptr inbounds i8, ptr %1, i64 68
  %14 = load i16, ptr %13, align 4, !tbaa !13
  %15 = icmp sgt i16 %14, -1
  br i1 %15, label %16, label %32

16:                                               ; preds = %12
  %.not82 = icmp eq ptr %.fr139, null
  br i1 %.not82, label %223, label %17

17:                                               ; preds = %16
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = zext nneg i16 %14 to i64
  %21 = getelementptr inbounds %struct.Column, ptr %19, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %23 = tail call i32 @sqlite3StrICmp(ptr noundef %22, ptr noundef nonnull %.fr139) #2
  %.not83 = icmp eq i32 %23, 0
  br i1 %.not83, label %223, label %32

24:                                               ; preds = %5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %32, label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %0, align 8, !tbaa !19
  %27 = sext i32 %.fr to i64
  %28 = shl nsw i64 %27, 2
  %29 = tail call ptr @sqlite3DbMallocRawNN(ptr noundef %26, i64 noundef %28) #2
  %30 = freeze ptr %29
  %.not81 = icmp eq ptr %30, null
  br i1 %.not81, label %223, label %31

31:                                               ; preds = %25
  store ptr %30, ptr %4, align 8, !tbaa !22
  br label %32

32:                                               ; preds = %24, %31, %12, %17
  %.072 = phi ptr [ null, %17 ], [ null, %12 ], [ %30, %31 ], [ null, %24 ]
  %33 = getelementptr inbounds i8, ptr %1, i64 16
  %.071115 = load ptr, ptr %33, align 8, !tbaa !22
  %.not84116 = icmp eq ptr %.071115, null
  br i1 %.not84116, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %32
  %34 = icmp eq ptr %.fr139, null
  %35 = getelementptr inbounds i8, ptr %1, i64 8
  %.not88 = icmp eq ptr %.072, null
  br i1 %34, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %52
  %.071117.us = phi ptr [ %.071.us, %52 ], [ %.071115, %.lr.ph ]
  %36 = getelementptr inbounds i8, ptr %.071117.us, i64 94
  %37 = load i16, ptr %36, align 2, !tbaa !23
  %38 = zext i16 %37 to i32
  %39 = icmp eq i32 %.fr, %38
  br i1 %39, label %40, label %52

40:                                               ; preds = %.lr.ph.split.us
  %41 = getelementptr inbounds i8, ptr %.071117.us, i64 98
  %42 = load i8, ptr %41, align 2, !tbaa !25
  %.not85.us = icmp eq i8 %42, 0
  br i1 %.not85.us, label %52, label %43

43:                                               ; preds = %40
  %44 = getelementptr inbounds i8, ptr %.071117.us, i64 72
  %45 = load ptr, ptr %44, align 8, !tbaa !26
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %52

47:                                               ; preds = %43
  %48 = getelementptr inbounds i8, ptr %.071117.us, i64 99
  %49 = load i8, ptr %48, align 1
  %50 = and i8 %49, 3
  %51 = icmp eq i8 %50, 2
  br i1 %51, label %.split.us, label %52

52:                                               ; preds = %47, %43, %40, %.lr.ph.split.us
  %53 = getelementptr inbounds i8, ptr %.071117.us, i64 40
  %.071.us = load ptr, ptr %53, align 8, !tbaa !22
  %.not84.us = icmp eq ptr %.071.us, null
  br i1 %.not84.us, label %.critedge, label %.lr.ph.split.us, !llvm.loop !27

.lr.ph.split:                                     ; preds = %.lr.ph
  %54 = icmp sgt i32 %.fr, 0
  br i1 %54, label %.lr.ph.split.split.us, label %.lr.ph.split.split

.lr.ph.split.split.us:                            ; preds = %.lr.ph.split
  %wide.trip.count168 = zext nneg i32 %.fr to i64
  br i1 %.not88, label %.lr.ph.split.split.us.split.us, label %.lr.ph.split.split.us.split

.lr.ph.split.split.us.split.us:                   ; preds = %.lr.ph.split.split.us, %70
  %.071117.us118.us = phi ptr [ %.071.us120.us, %70 ], [ %.071115, %.lr.ph.split.split.us ]
  %55 = getelementptr inbounds i8, ptr %.071117.us118.us, i64 94
  %56 = load i16, ptr %55, align 2, !tbaa !23
  %57 = zext i16 %56 to i32
  %58 = icmp eq i32 %.fr, %57
  br i1 %58, label %59, label %70

59:                                               ; preds = %.lr.ph.split.split.us.split.us
  %60 = getelementptr inbounds i8, ptr %.071117.us118.us, i64 98
  %61 = load i8, ptr %60, align 2, !tbaa !25
  %.not85.us119.us = icmp eq i8 %61, 0
  br i1 %.not85.us119.us, label %70, label %62

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %.071117.us118.us, i64 72
  %64 = load ptr, ptr %63, align 8, !tbaa !26
  %65 = icmp eq ptr %64, null
  br i1 %65, label %.preheader95.us.us, label %70

.preheader95.us.us:                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %.071117.us118.us, i64 8
  %67 = getelementptr inbounds i8, ptr %.071117.us118.us, i64 64
  br label %72

.thread.us.us:                                    ; preds = %..loopexit94_crit_edge.us.us.us.us, %77, %72, %93
  %68 = trunc nuw nsw i64 %indvars.iv165 to i32
  %69 = icmp eq i32 %.fr, %68
  br i1 %69, label %.loopexit, label %70

70:                                               ; preds = %.thread.us.us, %62, %59, %.lr.ph.split.split.us.split.us
  %71 = getelementptr inbounds i8, ptr %.071117.us118.us, i64 40
  %.071.us120.us = load ptr, ptr %71, align 8, !tbaa !22
  %.not84.us121.us = icmp eq ptr %.071.us120.us, null
  br i1 %.not84.us121.us, label %.critedge, label %.lr.ph.split.split.us.split.us, !llvm.loop !27

72:                                               ; preds = %96, %.preheader95.us.us
  %indvars.iv165 = phi i64 [ %indvars.iv.next166, %96 ], [ 0, %.preheader95.us.us ]
  %73 = load ptr, ptr %66, align 8, !tbaa !29
  %74 = getelementptr inbounds i16, ptr %73, i64 %indvars.iv165
  %75 = load i16, ptr %74, align 2, !tbaa !30
  %76 = icmp slt i16 %75, 0
  br i1 %76, label %.thread.us.us, label %77

77:                                               ; preds = %72
  %78 = load ptr, ptr %35, align 8, !tbaa !16
  %79 = zext nneg i16 %75 to i64
  %80 = getelementptr inbounds %struct.Column, ptr %78, i64 %79, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !31
  %.not86.us.us.us.us = icmp eq ptr %81, null
  %spec.store.select.us.us.us.us = select i1 %.not86.us.us.us.us, ptr @sqlite3StrBINARY, ptr %81
  %82 = load ptr, ptr %67, align 8, !tbaa !32
  %83 = getelementptr inbounds ptr, ptr %82, i64 %indvars.iv165
  %84 = load ptr, ptr %83, align 8, !tbaa !22
  %85 = tail call i32 @sqlite3StrICmp(ptr noundef %84, ptr noundef nonnull %spec.store.select.us.us.us.us) #2
  %.not87.us.us.us.us = icmp eq i32 %85, 0
  br i1 %.not87.us.us.us.us, label %.lr.ph.us.us.us.us, label %.thread.us.us

.lr.ph.us.us.us.us:                               ; preds = %77
  %86 = load ptr, ptr %35, align 8, !tbaa !16
  %87 = getelementptr inbounds %struct.Column, ptr %86, i64 %79
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  br label %89

89:                                               ; preds = %93, %.lr.ph.us.us.us.us
  %indvars.iv160 = phi i64 [ %indvars.iv.next161, %93 ], [ 0, %.lr.ph.us.us.us.us ]
  %gep = getelementptr inbounds [1 x %struct.sColMap], ptr %9, i64 0, i64 %indvars.iv160
  %90 = load ptr, ptr %gep, align 8, !tbaa !11
  %91 = tail call i32 @sqlite3StrICmp(ptr noundef %90, ptr noundef %88) #2
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %..loopexit94_crit_edge.us.us.us.us, label %93

93:                                               ; preds = %89
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1
  %exitcond164.not = icmp eq i64 %indvars.iv.next161, %wide.trip.count168
  br i1 %exitcond164.not, label %.thread.us.us, label %89, !llvm.loop !33

..loopexit94_crit_edge.us.us.us.us:               ; preds = %89
  %94 = trunc nuw nsw i64 %indvars.iv160 to i32
  %95 = icmp eq i32 %.fr, %94
  br i1 %95, label %.thread.us.us, label %96

96:                                               ; preds = %..loopexit94_crit_edge.us.us.us.us
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %exitcond169.not = icmp eq i64 %indvars.iv.next166, %wide.trip.count168
  br i1 %exitcond169.not, label %.loopexit, label %72, !llvm.loop !34

.lr.ph.split.split.us.split:                      ; preds = %.lr.ph.split.split.us, %112
  %.071117.us118 = phi ptr [ %.071.us120, %112 ], [ %.071115, %.lr.ph.split.split.us ]
  %97 = getelementptr inbounds i8, ptr %.071117.us118, i64 94
  %98 = load i16, ptr %97, align 2, !tbaa !23
  %99 = zext i16 %98 to i32
  %100 = icmp eq i32 %.fr, %99
  br i1 %100, label %101, label %112

101:                                              ; preds = %.lr.ph.split.split.us.split
  %102 = getelementptr inbounds i8, ptr %.071117.us118, i64 98
  %103 = load i8, ptr %102, align 2, !tbaa !25
  %.not85.us119 = icmp eq i8 %103, 0
  br i1 %.not85.us119, label %112, label %104

104:                                              ; preds = %101
  %105 = getelementptr inbounds i8, ptr %.071117.us118, i64 72
  %106 = load ptr, ptr %105, align 8, !tbaa !26
  %107 = icmp eq ptr %106, null
  br i1 %107, label %.preheader95.us, label %112

.preheader95.us:                                  ; preds = %104
  %108 = getelementptr inbounds i8, ptr %.071117.us118, i64 8
  %109 = getelementptr inbounds i8, ptr %.071117.us118, i64 64
  br label %114

.thread.us:                                       ; preds = %..loopexit94_crit_edge.us.us, %119, %114, %137
  %110 = trunc nuw nsw i64 %indvars.iv155 to i32
  %111 = icmp eq i32 %.fr, %110
  br i1 %111, label %.loopexit, label %112

112:                                              ; preds = %.thread.us, %104, %101, %.lr.ph.split.split.us.split
  %113 = getelementptr inbounds i8, ptr %.071117.us118, i64 40
  %.071.us120 = load ptr, ptr %113, align 8, !tbaa !22
  %.not84.us121 = icmp eq ptr %.071.us120, null
  br i1 %.not84.us121, label %.critedge, label %.lr.ph.split.split.us.split, !llvm.loop !27

114:                                              ; preds = %142, %.preheader95.us
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %142 ], [ 0, %.preheader95.us ]
  %115 = load ptr, ptr %108, align 8, !tbaa !29
  %116 = getelementptr inbounds i16, ptr %115, i64 %indvars.iv155
  %117 = load i16, ptr %116, align 2, !tbaa !30
  %118 = icmp slt i16 %117, 0
  br i1 %118, label %.thread.us, label %119

119:                                              ; preds = %114
  %120 = load ptr, ptr %35, align 8, !tbaa !16
  %121 = zext nneg i16 %117 to i64
  %122 = getelementptr inbounds %struct.Column, ptr %120, i64 %121, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !31
  %.not86.us.us = icmp eq ptr %123, null
  %spec.store.select.us.us = select i1 %.not86.us.us, ptr @sqlite3StrBINARY, ptr %123
  %124 = load ptr, ptr %109, align 8, !tbaa !32
  %125 = getelementptr inbounds ptr, ptr %124, i64 %indvars.iv155
  %126 = load ptr, ptr %125, align 8, !tbaa !22
  %127 = tail call i32 @sqlite3StrICmp(ptr noundef %126, ptr noundef nonnull %spec.store.select.us.us) #2
  %.not87.us.us = icmp eq i32 %127, 0
  br i1 %.not87.us.us, label %.lr.ph.us.us, label %.thread.us

.lr.ph.us.us:                                     ; preds = %119
  %128 = load ptr, ptr %35, align 8, !tbaa !16
  %129 = getelementptr inbounds %struct.Column, ptr %128, i64 %121
  %130 = load ptr, ptr %129, align 8, !tbaa !17
  br label %131

131:                                              ; preds = %137, %.lr.ph.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %137 ], [ 0, %.lr.ph.us.us ]
  %132 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %indvars.iv
  %133 = getelementptr inbounds i8, ptr %132, i64 8
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = tail call i32 @sqlite3StrICmp(ptr noundef %134, ptr noundef %130) #2
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %..loopexit94_crit_edge.us.us, label %137

137:                                              ; preds = %131
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count168
  br i1 %exitcond.not, label %.thread.us, label %131, !llvm.loop !33

..loopexit94_crit_edge.us.us:                     ; preds = %131
  %138 = trunc nuw nsw i64 %indvars.iv to i32
  %139 = load i32, ptr %132, align 8, !tbaa !35
  %140 = getelementptr inbounds i32, ptr %.072, i64 %indvars.iv155
  store i32 %139, ptr %140, align 4, !tbaa !36
  %141 = icmp eq i32 %.fr, %138
  br i1 %141, label %.thread.us, label %142

142:                                              ; preds = %..loopexit94_crit_edge.us.us
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond159.not = icmp eq i64 %indvars.iv.next156, %wide.trip.count168
  br i1 %exitcond159.not, label %.loopexit, label %114, !llvm.loop !34

.lr.ph.split.split:                               ; preds = %.lr.ph.split
  %143 = icmp eq i32 %.fr, 0
  br i1 %143, label %.lr.ph.split.split.split.us, label %.critedge

.lr.ph.split.split.split.us:                      ; preds = %.lr.ph.split.split, %154
  %.071117.us123 = phi ptr [ %.071.us126, %154 ], [ %.071115, %.lr.ph.split.split ]
  %144 = getelementptr inbounds i8, ptr %.071117.us123, i64 94
  %145 = load i16, ptr %144, align 2, !tbaa !23
  %146 = icmp eq i16 %145, 0
  br i1 %146, label %147, label %154

147:                                              ; preds = %.lr.ph.split.split.split.us
  %148 = getelementptr inbounds i8, ptr %.071117.us123, i64 98
  %149 = load i8, ptr %148, align 2, !tbaa !25
  %.not85.us124 = icmp eq i8 %149, 0
  br i1 %.not85.us124, label %154, label %150

150:                                              ; preds = %147
  %151 = getelementptr inbounds i8, ptr %.071117.us123, i64 72
  %152 = load ptr, ptr %151, align 8, !tbaa !26
  %153 = icmp eq ptr %152, null
  br i1 %153, label %.loopexit, label %154

154:                                              ; preds = %150, %147, %.lr.ph.split.split.split.us
  %155 = getelementptr inbounds i8, ptr %.071117.us123, i64 40
  %.071.us126 = load ptr, ptr %155, align 8, !tbaa !22
  %.not84.us127 = icmp eq ptr %.071.us126, null
  br i1 %.not84.us127, label %.critedge, label %.lr.ph.split.split.split.us, !llvm.loop !27

.split.us:                                        ; preds = %47
  %.not89 = icmp ne ptr %.072, null
  %156 = icmp ne i32 %.fr, 0
  %or.cond = and i1 %.not89, %156
  br i1 %or.cond, label %.lr.ph138.preheader, label %.loopexit

.lr.ph138.preheader:                              ; preds = %.split.us
  %wide.trip.count173 = zext i32 %.fr to i64
  %min.iters.check = icmp ult i32 %.fr, 17
  br i1 %min.iters.check, label %.lr.ph138.preheader233, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph138.preheader
  %157 = shl nuw nsw i64 %wide.trip.count173, 2
  %scevgep = getelementptr i8, ptr %.072, i64 %157
  %158 = shl nuw nsw i64 %wide.trip.count173, 4
  %159 = getelementptr i8, ptr %2, i64 %158
  %scevgep232 = getelementptr i8, ptr %159, i64 52
  %bound0 = icmp ult ptr %.072, %scevgep232
  %bound1 = icmp ult ptr %8, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph138.preheader233, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.mod.vf = and i64 %wide.trip.count173, 7
  %160 = icmp eq i64 %n.mod.vf, 0
  %161 = select i1 %160, i64 8, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count173, %161
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %162 = or disjoint i64 %index, 1
  %163 = or disjoint i64 %index, 2
  %164 = or disjoint i64 %index, 3
  %165 = or disjoint i64 %index, 4
  %166 = or disjoint i64 %index, 5
  %167 = or disjoint i64 %index, 6
  %168 = or disjoint i64 %index, 7
  %169 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %index
  %170 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %162
  %171 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %163
  %172 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %164
  %173 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %165
  %174 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %166
  %175 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %167
  %176 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %168
  %177 = load i32, ptr %169, align 8, !tbaa !35, !alias.scope !37
  %178 = load i32, ptr %170, align 8, !tbaa !35, !alias.scope !37
  %179 = load i32, ptr %171, align 8, !tbaa !35, !alias.scope !37
  %180 = load i32, ptr %172, align 8, !tbaa !35, !alias.scope !37
  %181 = insertelement <4 x i32> poison, i32 %177, i64 0
  %182 = insertelement <4 x i32> %181, i32 %178, i64 1
  %183 = insertelement <4 x i32> %182, i32 %179, i64 2
  %184 = insertelement <4 x i32> %183, i32 %180, i64 3
  %185 = load i32, ptr %173, align 8, !tbaa !35, !alias.scope !37
  %186 = load i32, ptr %174, align 8, !tbaa !35, !alias.scope !37
  %187 = load i32, ptr %175, align 8, !tbaa !35, !alias.scope !37
  %188 = load i32, ptr %176, align 8, !tbaa !35, !alias.scope !37
  %189 = insertelement <4 x i32> poison, i32 %185, i64 0
  %190 = insertelement <4 x i32> %189, i32 %186, i64 1
  %191 = insertelement <4 x i32> %190, i32 %187, i64 2
  %192 = insertelement <4 x i32> %191, i32 %188, i64 3
  %193 = getelementptr inbounds i32, ptr %.072, i64 %index
  %194 = getelementptr inbounds i8, ptr %193, i64 16
  store <4 x i32> %184, ptr %193, align 4, !tbaa !36, !alias.scope !40, !noalias !37
  store <4 x i32> %192, ptr %194, align 4, !tbaa !36, !alias.scope !40, !noalias !37
  %index.next = add nuw i64 %index, 8
  %195 = icmp eq i64 %index.next, %n.vec
  br i1 %195, label %.lr.ph138.preheader233, label %vector.body, !llvm.loop !42

.lr.ph138.preheader233:                           ; preds = %vector.body, %vector.memcheck, %.lr.ph138.preheader
  %indvars.iv170.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph138.preheader ], [ %n.vec, %vector.body ]
  %196 = sub nsw i64 %wide.trip.count173, %indvars.iv170.ph
  %xtraiter = and i64 %196, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph138.prol.loopexit, label %.lr.ph138.prol

.lr.ph138.prol:                                   ; preds = %.lr.ph138.preheader233, %.lr.ph138.prol
  %indvars.iv170.prol = phi i64 [ %indvars.iv.next171.prol, %.lr.ph138.prol ], [ %indvars.iv170.ph, %.lr.ph138.preheader233 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph138.prol ], [ 0, %.lr.ph138.preheader233 ]
  %197 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %indvars.iv170.prol
  %198 = load i32, ptr %197, align 8, !tbaa !35
  %199 = getelementptr inbounds i32, ptr %.072, i64 %indvars.iv170.prol
  store i32 %198, ptr %199, align 4, !tbaa !36
  %indvars.iv.next171.prol = add nuw nsw i64 %indvars.iv170.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph138.prol.loopexit, label %.lr.ph138.prol, !llvm.loop !45

.lr.ph138.prol.loopexit:                          ; preds = %.lr.ph138.prol, %.lr.ph138.preheader233
  %indvars.iv170.unr = phi i64 [ %indvars.iv170.ph, %.lr.ph138.preheader233 ], [ %indvars.iv.next171.prol, %.lr.ph138.prol ]
  %200 = sub nsw i64 %indvars.iv170.ph, %wide.trip.count173
  %201 = icmp ugt i64 %200, -4
  br i1 %201, label %.loopexit, label %.lr.ph138

.lr.ph138:                                        ; preds = %.lr.ph138.prol.loopexit, %.lr.ph138
  %indvars.iv170 = phi i64 [ %indvars.iv.next171.3, %.lr.ph138 ], [ %indvars.iv170.unr, %.lr.ph138.prol.loopexit ]
  %202 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %indvars.iv170
  %203 = load i32, ptr %202, align 8, !tbaa !35
  %204 = getelementptr inbounds i32, ptr %.072, i64 %indvars.iv170
  store i32 %203, ptr %204, align 4, !tbaa !36
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %205 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %indvars.iv.next171
  %206 = load i32, ptr %205, align 8, !tbaa !35
  %207 = getelementptr inbounds i32, ptr %.072, i64 %indvars.iv.next171
  store i32 %206, ptr %207, align 4, !tbaa !36
  %indvars.iv.next171.1 = add nuw nsw i64 %indvars.iv170, 2
  %208 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %indvars.iv.next171.1
  %209 = load i32, ptr %208, align 8, !tbaa !35
  %210 = getelementptr inbounds i32, ptr %.072, i64 %indvars.iv.next171.1
  store i32 %209, ptr %210, align 4, !tbaa !36
  %indvars.iv.next171.2 = add nuw nsw i64 %indvars.iv170, 3
  %211 = getelementptr inbounds [1 x %struct.sColMap], ptr %8, i64 0, i64 %indvars.iv.next171.2
  %212 = load i32, ptr %211, align 8, !tbaa !35
  %213 = getelementptr inbounds i32, ptr %.072, i64 %indvars.iv.next171.2
  store i32 %212, ptr %213, align 4, !tbaa !36
  %indvars.iv.next171.3 = add nuw nsw i64 %indvars.iv170, 4
  %exitcond174.not.3 = icmp eq i64 %indvars.iv.next171.3, %wide.trip.count173
  br i1 %exitcond174.not.3, label %.loopexit, label %.lr.ph138, !llvm.loop !47

.critedge:                                        ; preds = %154, %112, %70, %52, %.lr.ph.split.split, %32
  %214 = getelementptr inbounds i8, ptr %0, i64 194
  %215 = load i8, ptr %214, align 2, !tbaa !48
  %.not90 = icmp eq i8 %215, 0
  br i1 %.not90, label %216, label %221

216:                                              ; preds = %.critedge
  %217 = load ptr, ptr %2, align 8, !tbaa !49
  %218 = load ptr, ptr %217, align 8, !tbaa !50
  %219 = getelementptr inbounds i8, ptr %2, i64 16
  %220 = load ptr, ptr %219, align 8, !tbaa !51
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str, ptr noundef %218, ptr noundef %220) #2
  br label %221

221:                                              ; preds = %216, %.critedge
  %222 = load ptr, ptr %0, align 8, !tbaa !19
  tail call void @sqlite3DbFree(ptr noundef %222, ptr noundef %.072) #2
  br label %223

.loopexit:                                        ; preds = %150, %.thread.us, %142, %.thread.us.us, %96, %.lr.ph138.prol.loopexit, %.lr.ph138, %.split.us
  %.071101 = phi ptr [ %.071117.us, %.split.us ], [ %.071117.us, %.lr.ph138 ], [ %.071117.us, %.lr.ph138.prol.loopexit ], [ %.071117.us118.us, %96 ], [ %.071117.us118.us, %.thread.us.us ], [ %.071117.us118, %142 ], [ %.071117.us118, %.thread.us ], [ %.071117.us123, %150 ]
  store ptr %.071101, ptr %3, align 8, !tbaa !22
  br label %223

223:                                              ; preds = %25, %17, %16, %.loopexit, %221
  %.0 = phi i32 [ 0, %.loopexit ], [ 1, %221 ], [ 0, %16 ], [ 0, %17 ], [ 1, %25 ]
  ret i32 %.0
}

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 40}
!6 = !{!"FKey", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !8, i64 44, !8, i64 45, !8, i64 48, !8, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 8}
!12 = !{!"sColMap", !10, i64 0, !7, i64 8}
!13 = !{!14, !15, i64 68}
!14 = !{!"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, !15, i64 68, !15, i64 70, !15, i64 72, !15, 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}
!15 = !{!"short", !8, i64 0}
!16 = !{!14, !7, i64 8}
!17 = !{!18, !7, i64 0}
!18 = !{!"Column", !7, i64 0, !7, i64 8, !7, i64 16, !8, i64 24, !8, i64 25, !8, i64 26, !8, i64 27}
!19 = !{!20, !7, i64 0}
!20 = !{!"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, !21, 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, !21, i64 432, !21, i64 448, !15, 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, !21, i64 536, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584}
!21 = !{!"Token", !7, i64 0, !10, i64 8}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !15, i64 94}
!24 = !{!"Index", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !15, i64 92, !15, i64 94, !15, i64 96, !8, i64 98, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99}
!25 = !{!24, !8, i64 98}
!26 = !{!24, !7, i64 72}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!24, !7, i64 8}
!30 = !{!15, !15, i64 0}
!31 = !{!18, !7, i64 16}
!32 = !{!24, !7, i64 64}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}
!35 = !{!12, !10, i64 0}
!36 = !{!10, !10, i64 0}
!37 = !{!38}
!38 = distinct !{!38, !39}
!39 = distinct !{!39, !"LVerDomain"}
!40 = !{!41}
!41 = distinct !{!41, !39}
!42 = distinct !{!42, !28, !43, !44}
!43 = !{!"llvm.loop.isvectorized", i32 1}
!44 = !{!"llvm.loop.unroll.runtime.disable"}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.unroll.disable"}
!47 = distinct !{!47, !28, !43}
!48 = !{!20, !8, i64 194}
!49 = !{!6, !7, i64 0}
!50 = !{!14, !7, i64 0}
!51 = !{!6, !7, i64 16}


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