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

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

%struct.Parse = type { ptr, ptr, ptr, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, %struct.Token, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i8, i8, i8, [10 x %struct.yColCache], [8 x i32], %struct.Token, %struct.Token, i16, i8, i8, i8, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Token, ptr, ptr, ptr, ptr, ptr }
%struct.yColCache = type { i32, i16, i8, i32, i32, i32 }
%struct.Token = type { ptr, i32 }
%struct.Index = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i16, i16, i16, i8, i8 }
%struct.Table = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i16, i16, i16, i16, i8, i32, i32, ptr, ptr, ptr, ptr, ptr }

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

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

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

declare i32 @sqlite3VdbeMakeLabel(ptr noundef) #1

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

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

27:                                               ; preds = %8
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.Index, ptr %28, i32 0, i32 9
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %46

32:                                               ; preds = %27
  %33 = load ptr, ptr %17, align 8, !tbaa !5
  %34 = call i32 @sqlite3VdbeMakeLabel(ptr noundef %33)
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 %34, ptr %35, align 4, !tbaa !9
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.Parse, ptr %37, i32 0, i32 22
  store i32 %36, ptr %38, align 8, !tbaa !17
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  call void @sqlite3ExprCachePush(ptr noundef %39)
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.Index, ptr %41, i32 0, i32 9
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = load i32, ptr %44, align 4, !tbaa !9
  call void @sqlite3ExprIfFalseDup(ptr noundef %40, ptr noundef %43, i32 noundef %45, i32 noundef 16)
  br label %48

46:                                               ; preds = %27
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 0, ptr %47, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %46, %32
  br label %49

49:                                               ; preds = %48, %8
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %65

52:                                               ; preds = %49
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.Index, ptr %53, i32 0, i32 16
  %55 = load i8, ptr %54, align 1
  %56 = lshr i8 %55, 3
  %57 = and i8 %56, 1
  %58 = zext i8 %57 to i32
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %65

60:                                               ; preds = %52
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.Index, ptr %61, i32 0, i32 13
  %63 = load i16, ptr %62, align 2, !tbaa !18
  %64 = zext i16 %63 to i32
  br label %70

65:                                               ; preds = %52, %49
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.Index, ptr %66, i32 0, i32 14
  %68 = load i16, ptr %67, align 8, !tbaa !19
  %69 = zext i16 %68 to i32
  br label %70

70:                                               ; preds = %65, %60
  %71 = phi i32 [ %64, %60 ], [ %69, %65 ]
  store i32 %71, ptr %20, align 4, !tbaa !9
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load i32, ptr %20, align 4, !tbaa !9
  %74 = call i32 @sqlite3GetTempRange(ptr noundef %72, i32 noundef %73)
  store i32 %74, ptr %19, align 4, !tbaa !9
  %75 = load ptr, ptr %15, align 8, !tbaa !5
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %87

77:                                               ; preds = %70
  %78 = load i32, ptr %19, align 4, !tbaa !9
  %79 = load i32, ptr %16, align 4, !tbaa !9
  %80 = icmp ne i32 %78, %79
  br i1 %80, label %86, label %81

81:                                               ; preds = %77
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.Index, ptr %82, i32 0, i32 9
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %87

86:                                               ; preds = %81, %77
  store ptr null, ptr %15, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %86, %81, %70
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %134, %87
  %89 = load i32, ptr %18, align 4, !tbaa !9
  %90 = load i32, ptr %20, align 4, !tbaa !9
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %92, label %137

92:                                               ; preds = %88
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %124

95:                                               ; preds = %92
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.Index, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !20
  %99 = load i32, ptr %18, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i16, ptr %98, i64 %100
  %102 = load i16, ptr %101, align 2, !tbaa !21
  %103 = sext i16 %102 to i32
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.Index, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !20
  %107 = load i32, ptr %18, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i16, ptr %106, i64 %108
  %110 = load i16, ptr %109, align 2, !tbaa !21
  %111 = sext i16 %110 to i32
  %112 = icmp eq i32 %103, %111
  br i1 %112, label %113, label %124

113:                                              ; preds = %95
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.Index, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !20
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i16, ptr %116, i64 %118
  %120 = load i16, ptr %119, align 2, !tbaa !21
  %121 = sext i16 %120 to i32
  %122 = icmp ne i32 %121, -2
  br i1 %122, label %123, label %124

123:                                              ; preds = %113
  br label %134

124:                                              ; preds = %113, %95, %92
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = load i32, ptr %11, align 4, !tbaa !9
  %128 = load i32, ptr %18, align 4, !tbaa !9
  %129 = load i32, ptr %19, align 4, !tbaa !9
  %130 = load i32, ptr %18, align 4, !tbaa !9
  %131 = add nsw i32 %129, %130
  call void @sqlite3ExprCodeLoadIndexColumn(ptr noundef %125, ptr noundef %126, i32 noundef %127, i32 noundef %128, i32 noundef %131)
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = call i32 @sqlite3VdbeDeletePriorOpcode(ptr noundef %132, i8 noundef zeroext 93)
  br label %134

134:                                              ; preds = %124, %123
  %135 = load i32, ptr %18, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %18, align 4, !tbaa !9
  br label %88, !llvm.loop !22

137:                                              ; preds = %88
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %161

140:                                              ; preds = %137
  %141 = load ptr, ptr %17, align 8, !tbaa !5
  %142 = load i32, ptr %19, align 4, !tbaa !9
  %143 = load i32, ptr %20, align 4, !tbaa !9
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = call i32 @sqlite3VdbeAddOp3(ptr noundef %141, i32 noundef 100, i32 noundef %142, i32 noundef %143, i32 noundef %144)
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.Index, ptr %146, i32 0, i32 3
  %148 = load ptr, ptr %147, align 8, !tbaa !24
  %149 = getelementptr inbounds %struct.Table, ptr %148, i32 0, i32 3
  %150 = load ptr, ptr %149, align 8, !tbaa !25
  %151 = icmp ne ptr %150, null
  br i1 %151, label %152, label %160

152:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.Parse, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !27
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = call ptr @sqlite3IndexAffinityStr(ptr noundef %155, ptr noundef %156)
  store ptr %157, ptr %21, align 8, !tbaa !5
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = load ptr, ptr %21, align 8, !tbaa !5
  call void @sqlite3VdbeChangeP4(ptr noundef %158, i32 noundef -1, ptr noundef %159, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %160

160:                                              ; preds = %152, %140
  br label %161

161:                                              ; preds = %160, %137
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = load i32, ptr %19, align 4, !tbaa !9
  %164 = load i32, ptr %20, align 4, !tbaa !9
  call void @sqlite3ReleaseTempRange(ptr noundef %162, i32 noundef %163, i32 noundef %164)
  %165 = load i32, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  ret i32 %165
}

declare void @sqlite3ExprCachePush(ptr noundef) #1

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!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 = !{!16, !6, i64 72}
!16 = !{!"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, !10, i64 88, !14, i64 92, !14, i64 94, !14, i64 96, !7, i64 98, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99, !10, i64 99}
!17 = !{!12, !10, i64 72}
!18 = !{!16, !14, i64 94}
!19 = !{!16, !14, i64 96}
!20 = !{!16, !6, i64 8}
!21 = !{!14, !14, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!16, !6, i64 24}
!25 = !{!26, !6, i64 24}
!26 = !{!"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}
!27 = !{!12, !6, i64 0}


; 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"

declare ptr @sqlite3IndexAffinityStr(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @sqlite3VdbeMakeLabel(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @sqlite3GenerateIndexKey(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef readonly %6, i32 noundef %7) local_unnamed_addr #1 {
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %20, label %11

11:                                               ; preds = %8
  %12 = getelementptr inbounds i8, ptr %1, i64 72
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %.not58 = icmp eq ptr %13, null
  br i1 %.not58, label %19, label %14

14:                                               ; preds = %11
  %15 = tail call i32 @sqlite3VdbeMakeLabel(ptr noundef %10) #2
  store i32 %15, ptr %5, align 4, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %2, ptr %16, align 8, !tbaa !16
  tail call void @sqlite3ExprCachePush(ptr noundef nonnull %0) #2
  %17 = load ptr, ptr %12, align 8, !tbaa !13
  %18 = load i32, ptr %5, align 4, !tbaa !15
  tail call void @sqlite3ExprIfFalseDup(ptr noundef nonnull %0, ptr noundef %17, i32 noundef %18, i32 noundef 16) #2
  br label %20

19:                                               ; preds = %11
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %20

20:                                               ; preds = %14, %19, %8
  %.not59 = icmp eq i32 %4, 0
  br i1 %.not59, label %25, label %21

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %1, i64 99
  %23 = load i8, ptr %22, align 1
  %24 = and i8 %23, 8
  %.not60 = icmp eq i8 %24, 0
  br i1 %.not60, label %25, label %26

25:                                               ; preds = %21, %20
  br label %26

26:                                               ; preds = %21, %25
  %.sink = phi i64 [ 96, %25 ], [ 94, %21 ]
  %27 = getelementptr inbounds i8, ptr %1, i64 %.sink
  %.in = load i16, ptr %27, align 2, !tbaa !17
  %28 = zext i16 %.in to i32
  %29 = tail call i32 @sqlite3GetTempRange(ptr noundef nonnull %0, i32 noundef %28) #2
  %.not61 = icmp eq ptr %6, null
  br i1 %.not61, label %35, label %30

30:                                               ; preds = %26
  %.not62 = icmp eq i32 %29, %7
  br i1 %.not62, label %31, label %34

31:                                               ; preds = %30
  %32 = getelementptr inbounds i8, ptr %6, i64 72
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %.not63 = icmp eq ptr %33, null
  br i1 %.not63, label %35, label %34

34:                                               ; preds = %31, %30
  br label %35

35:                                               ; preds = %34, %31, %26
  %.0 = phi ptr [ null, %34 ], [ %6, %31 ], [ null, %26 ]
  %.not70 = icmp eq i16 %.in, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %35
  %.not66 = icmp eq ptr %.0, null
  %36 = getelementptr inbounds i8, ptr %.0, i64 8
  %37 = getelementptr inbounds i8, ptr %1, i64 8
  br i1 %.not66, label %.lr.ph.split.us, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %wide.trip.count = zext i16 %.in to i64
  br label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %.05268.us = phi i32 [ %40, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %38 = add nsw i32 %.05268.us, %29
  tail call void @sqlite3ExprCodeLoadIndexColumn(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %.05268.us, i32 noundef %38) #2
  %39 = tail call i32 @sqlite3VdbeDeletePriorOpcode(ptr noundef %10, i8 noundef zeroext 93) #2
  %40 = add nuw nsw i32 %.05268.us, 1
  %exitcond73.not = icmp eq i32 %40, %28
  br i1 %exitcond73.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !18

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next, %51 ]
  %41 = load ptr, ptr %36, align 8, !tbaa !20
  %42 = getelementptr inbounds i16, ptr %41, i64 %indvars.iv
  %43 = load i16, ptr %42, align 2, !tbaa !17
  %44 = load ptr, ptr %37, align 8, !tbaa !20
  %45 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv
  %46 = load i16, ptr %45, align 2, !tbaa !17
  %47 = icmp ne i16 %43, %46
  %.not67 = icmp eq i16 %43, -2
  %or.cond = or i1 %.not67, %47
  br i1 %or.cond, label %48, label %51

48:                                               ; preds = %.lr.ph.split
  %indvars72 = trunc i64 %indvars.iv to i32
  %49 = add nsw i32 %29, %indvars72
  tail call void @sqlite3ExprCodeLoadIndexColumn(ptr noundef %0, ptr noundef nonnull %1, i32 noundef %2, i32 noundef %indvars72, i32 noundef %49) #2
  %50 = tail call i32 @sqlite3VdbeDeletePriorOpcode(ptr noundef %10, i8 noundef zeroext 93) #2
  br label %51

51:                                               ; preds = %.lr.ph.split, %48
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !18

._crit_edge:                                      ; preds = %51, %.lr.ph.split.us, %35
  %.not64 = icmp eq i32 %3, 0
  br i1 %.not64, label %61, label %52

52:                                               ; preds = %._crit_edge
  %53 = tail call i32 @sqlite3VdbeAddOp3(ptr noundef %10, i32 noundef 100, i32 noundef %29, i32 noundef %28, i32 noundef %3) #2
  %54 = getelementptr inbounds i8, ptr %1, i64 24
  %55 = load ptr, ptr %54, align 8, !tbaa !21
  %56 = getelementptr inbounds i8, ptr %55, i64 24
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %.not65 = icmp eq ptr %57, null
  br i1 %.not65, label %61, label %58

58:                                               ; preds = %52
  %59 = load ptr, ptr %0, align 8, !tbaa !24
  %60 = tail call ptr @sqlite3IndexAffinityStr(ptr noundef %59, ptr noundef nonnull %1) #2
  tail call void @sqlite3VdbeChangeP4(ptr noundef %10, i32 noundef -1, ptr noundef %60, i32 noundef 0) #2
  br label %61

61:                                               ; preds = %52, %58, %._crit_edge
  tail call void @sqlite3ReleaseTempRange(ptr noundef %0, i32 noundef %29, i32 noundef %28) #2
  ret i32 %29
}

declare void @sqlite3ExprCachePush(ptr noundef) local_unnamed_addr #0

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

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

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

declare i32 @sqlite3VdbeDeletePriorOpcode(ptr noundef, i8 noundef zeroext) local_unnamed_addr #0

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

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

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

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

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


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