; LLVM IR from GitZHCODE/zspace_core :: cpp/depends/SQLITE (shell)

; 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.ShellState = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, ptr, [30 x i8], [20 x i8], [20 x i8], [100 x i32], [100 x i32], [20 x i8], [4096 x i8], ptr, ptr, ptr, ptr, ptr, ptr, i32, i32 }

@stderr = external global ptr, align 8
@stdin_is_interactive = external hidden global i32, align 4
@stdout_is_console = external hidden global i32, align 4
@.str = external hidden unnamed_addr constant [61 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@Argv0 = external hidden global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@stdout = external global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [6 x i8], align 1
@bail_on_error = external hidden global i32, align 4
@.str.38 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [19 x i8], align 1
@stdin = external global ptr, align 8

; 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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.ShellState, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %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 i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 5152, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  store ptr null, ptr %14, align 8, !tbaa !9
  %29 = load ptr, ptr @stderr, align 8, !tbaa !9
  %30 = call i32 @setvbuf(ptr noundef %29, ptr noundef null, i32 noundef 2, i64 noundef 0) #9
  %31 = call i32 @isatty(i32 noundef 0) #9
  store i32 %31, ptr @stdin_is_interactive, align 4, !tbaa !5
  %32 = call i32 @isatty(i32 noundef 1) #9
  store i32 %32, ptr @stdout_is_console, align 4, !tbaa !5
  %33 = call ptr @sqlite3_sourceid()
  %34 = call i32 @strcmp(ptr noundef %33, ptr noundef @.str) #10
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %40

36:                                               ; preds = %2
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = call ptr @sqlite3_sourceid()
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.1, ptr noundef %38, ptr noundef @.str) #9
  call void @exit(i32 noundef 1) #11
  unreachable

40:                                               ; preds = %2
  call void @main_init(ptr noundef %7)
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = icmp sge i32 %41, 1
  br i1 %42, label %43, label %52

43:                                               ; preds = %40
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %52

46:                                               ; preds = %43
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = getelementptr inbounds ptr, ptr %47, i64 0
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %52

51:                                               ; preds = %46
  br label %53

52:                                               ; preds = %46, %43, %40
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 5830, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

53:                                               ; preds = %51
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %54, i64 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  store ptr %56, ptr @Argv0, align 8, !tbaa !9
  %57 = call ptr @signal(i32 noundef 2, ptr noundef @interrupt_handler) #9
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %338, %53
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %341

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %63 = load ptr, ptr %5, align 8, !tbaa !9
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  store ptr %67, ptr %15, align 8, !tbaa !9
  %68 = load ptr, ptr %15, align 8, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %68, i64 0
  %70 = load i8, ptr %69, align 1, !tbaa !11
  %71 = sext i8 %70 to i32
  %72 = icmp ne i32 %71, 45
  br i1 %72, label %73, label %101

73:                                               ; preds = %62
  %74 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 28
  %75 = load ptr, ptr %74, align 8, !tbaa !12
  %76 = icmp eq ptr %75, null
  br i1 %76, label %77, label %80

77:                                               ; preds = %73
  %78 = load ptr, ptr %15, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 28
  store ptr %78, ptr %79, align 8, !tbaa !12
  br label %100

80:                                               ; preds = %73
  store i32 0, ptr %12, align 4, !tbaa !5
  %81 = load i32, ptr %13, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %13, align 4, !tbaa !5
  %83 = load ptr, ptr %14, align 8, !tbaa !9
  %84 = load i32, ptr %13, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = mul i64 8, %85
  %87 = call ptr @realloc(ptr noundef %83, i64 noundef %86) #12
  store ptr %87, ptr %14, align 8, !tbaa !9
  %88 = load ptr, ptr %14, align 8, !tbaa !9
  %89 = icmp eq ptr %88, null
  br i1 %89, label %90, label %93

90:                                               ; preds = %80
  %91 = load ptr, ptr @stderr, align 8, !tbaa !9
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.4) #9
  call void @exit(i32 noundef 1) #11
  unreachable

93:                                               ; preds = %80
  %94 = load ptr, ptr %15, align 8, !tbaa !9
  %95 = load ptr, ptr %14, align 8, !tbaa !9
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds ptr, ptr %95, i64 %98
  store ptr %94, ptr %99, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %93, %77
  br label %101

101:                                              ; preds = %100, %62
  %102 = load ptr, ptr %15, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %102, i64 1
  %104 = load i8, ptr %103, align 1, !tbaa !11
  %105 = sext i8 %104 to i32
  %106 = icmp eq i32 %105, 45
  br i1 %106, label %107, label %110

107:                                              ; preds = %101
  %108 = load ptr, ptr %15, align 8, !tbaa !9
  %109 = getelementptr inbounds i8, ptr %108, i32 1
  store ptr %109, ptr %15, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %107, %101
  %111 = load ptr, ptr %15, align 8, !tbaa !9
  %112 = call i32 @strcmp(ptr noundef %111, ptr noundef @.str.5) #10
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %126, label %114

114:                                              ; preds = %110
  %115 = load ptr, ptr %15, align 8, !tbaa !9
  %116 = call i32 @strcmp(ptr noundef %115, ptr noundef @.str.6) #10
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %126, label %118

118:                                              ; preds = %114
  %119 = load ptr, ptr %15, align 8, !tbaa !9
  %120 = call i32 @strcmp(ptr noundef %119, ptr noundef @.str.7) #10
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %126, label %122

122:                                              ; preds = %118
  %123 = load ptr, ptr %15, align 8, !tbaa !9
  %124 = call i32 @strcmp(ptr noundef %123, ptr noundef @.str.8) #10
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %132

126:                                              ; preds = %122, %118, %114, %110
  %127 = load i32, ptr %4, align 4, !tbaa !5
  %128 = load ptr, ptr %5, align 8, !tbaa !9
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %9, align 4, !tbaa !5
  %131 = call ptr @cmdline_option_value(i32 noundef %127, ptr noundef %128, i32 noundef %130)
  br label %337

132:                                              ; preds = %122
  %133 = load ptr, ptr %15, align 8, !tbaa !9
  %134 = call i32 @strcmp(ptr noundef %133, ptr noundef @.str.9) #10
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %142

136:                                              ; preds = %132
  %137 = load i32, ptr %4, align 4, !tbaa !5
  %138 = load ptr, ptr %5, align 8, !tbaa !9
  %139 = load i32, ptr %9, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %9, align 4, !tbaa !5
  %141 = call ptr @cmdline_option_value(i32 noundef %137, ptr noundef %138, i32 noundef %140)
  store ptr %141, ptr %8, align 8, !tbaa !9
  br label %336

142:                                              ; preds = %132
  %143 = load ptr, ptr %15, align 8, !tbaa !9
  %144 = call i32 @strcmp(ptr noundef %143, ptr noundef @.str.10) #10
  %145 = icmp eq i32 %144, 0
  br i1 %145, label %146, label %147

146:                                              ; preds = %142
  store i32 0, ptr @stdin_is_interactive, align 4, !tbaa !5
  br label %335

147:                                              ; preds = %142
  %148 = load ptr, ptr %15, align 8, !tbaa !9
  %149 = call i32 @strcmp(ptr noundef %148, ptr noundef @.str.11) #10
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %157

151:                                              ; preds = %147
  %152 = load i32, ptr %4, align 4, !tbaa !5
  %153 = load ptr, ptr %5, align 8, !tbaa !9
  %154 = load i32, ptr %9, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %9, align 4, !tbaa !5
  %156 = call ptr @cmdline_option_value(i32 noundef %152, ptr noundef %153, i32 noundef %155)
  br label %334

157:                                              ; preds = %147
  %158 = load ptr, ptr %15, align 8, !tbaa !9
  %159 = call i32 @strcmp(ptr noundef %158, ptr noundef @.str.12) #10
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %204

161:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %162 = load i32, ptr %4, align 4, !tbaa !5
  %163 = load ptr, ptr %5, align 8, !tbaa !9
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %9, align 4, !tbaa !5
  %166 = call ptr @cmdline_option_value(i32 noundef %162, ptr noundef %163, i32 noundef %165)
  %167 = call i64 @integerValue(ptr noundef %166)
  %168 = trunc i64 %167 to i32
  store i32 %168, ptr %17, align 4, !tbaa !5
  %169 = load i32, ptr %17, align 4, !tbaa !5
  %170 = icmp sgt i32 %169, 400000
  br i1 %170, label %171, label %172

171:                                              ; preds = %161
  store i32 400000, ptr %17, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %171, %161
  %173 = load i32, ptr %17, align 4, !tbaa !5
  %174 = icmp slt i32 %173, 2500
  br i1 %174, label %175, label %176

175:                                              ; preds = %172
  store i32 2500, ptr %17, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %175, %172
  %177 = load i32, ptr %4, align 4, !tbaa !5
  %178 = load ptr, ptr %5, align 8, !tbaa !9
  %179 = load i32, ptr %9, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %9, align 4, !tbaa !5
  %181 = call ptr @cmdline_option_value(i32 noundef %177, ptr noundef %178, i32 noundef %180)
  %182 = call i64 @integerValue(ptr noundef %181)
  %183 = trunc i64 %182 to i32
  store i32 %183, ptr %16, align 4, !tbaa !5
  %184 = load i32, ptr %16, align 4, !tbaa !5
  %185 = icmp sgt i32 %184, 10
  br i1 %185, label %186, label %187

186:                                              ; preds = %176
  store i32 10, ptr %16, align 4, !tbaa !5
  br label %187

187:                                              ; preds = %186, %176
  %188 = load i32, ptr %16, align 4, !tbaa !5
  %189 = icmp slt i32 %188, 1
  br i1 %189, label %190, label %191

190:                                              ; preds = %187
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %190, %187
  %192 = load i32, ptr %16, align 4, !tbaa !5
  %193 = load i32, ptr %17, align 4, !tbaa !5
  %194 = mul nsw i32 %192, %193
  %195 = add nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = call noalias ptr @malloc(i64 noundef %196) #13
  %198 = load i32, ptr %17, align 4, !tbaa !5
  %199 = load i32, ptr %16, align 4, !tbaa !5
  %200 = call i32 (i32, ...) @sqlite3_config(i32 noundef 6, ptr noundef %197, i32 noundef %198, i32 noundef %199)
  %201 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 19
  %202 = load i32, ptr %201, align 4, !tbaa !14
  %203 = or i32 %202, 1
  store i32 %203, ptr %201, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %333

204:                                              ; preds = %157
  %205 = load ptr, ptr %15, align 8, !tbaa !9
  %206 = call i32 @strcmp(ptr noundef %205, ptr noundef @.str.13) #10
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %208, label %251

208:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %209 = load i32, ptr %4, align 4, !tbaa !5
  %210 = load ptr, ptr %5, align 8, !tbaa !9
  %211 = load i32, ptr %9, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %9, align 4, !tbaa !5
  %213 = call ptr @cmdline_option_value(i32 noundef %209, ptr noundef %210, i32 noundef %212)
  %214 = call i64 @integerValue(ptr noundef %213)
  %215 = trunc i64 %214 to i32
  store i32 %215, ptr %19, align 4, !tbaa !5
  %216 = load i32, ptr %19, align 4, !tbaa !5
  %217 = icmp sgt i32 %216, 70000
  br i1 %217, label %218, label %219

218:                                              ; preds = %208
  store i32 70000, ptr %19, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %218, %208
  %220 = load i32, ptr %19, align 4, !tbaa !5
  %221 = icmp slt i32 %220, 0
  br i1 %221, label %222, label %223

222:                                              ; preds = %219
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %223

223:                                              ; preds = %222, %219
  %224 = load i32, ptr %4, align 4, !tbaa !5
  %225 = load ptr, ptr %5, align 8, !tbaa !9
  %226 = load i32, ptr %9, align 4, !tbaa !5
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %9, align 4, !tbaa !5
  %228 = call ptr @cmdline_option_value(i32 noundef %224, ptr noundef %225, i32 noundef %227)
  %229 = call i64 @integerValue(ptr noundef %228)
  %230 = trunc i64 %229 to i32
  store i32 %230, ptr %18, align 4, !tbaa !5
  %231 = load i32, ptr %18, align 4, !tbaa !5
  %232 = icmp sgt i32 %231, 0
  br i1 %232, label %233, label %242

233:                                              ; preds = %223
  %234 = load i32, ptr %19, align 4, !tbaa !5
  %235 = icmp sgt i32 %234, 0
  br i1 %235, label %236, label %242

236:                                              ; preds = %233
  %237 = load i32, ptr %18, align 4, !tbaa !5
  %238 = load i32, ptr %19, align 4, !tbaa !5
  %239 = mul nsw i32 %237, %238
  %240 = sext i32 %239 to i64
  %241 = call noalias ptr @malloc(i64 noundef %240) #13
  br label %243

242:                                              ; preds = %233, %223
  br label %243

243:                                              ; preds = %242, %236
  %244 = phi ptr [ %241, %236 ], [ null, %242 ]
  %245 = load i32, ptr %19, align 4, !tbaa !5
  %246 = load i32, ptr %18, align 4, !tbaa !5
  %247 = call i32 (i32, ...) @sqlite3_config(i32 noundef 7, ptr noundef %244, i32 noundef %245, i32 noundef %246)
  %248 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 19
  %249 = load i32, ptr %248, align 4, !tbaa !14
  %250 = or i32 %249, 2
  store i32 %250, ptr %248, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %332

251:                                              ; preds = %204
  %252 = load ptr, ptr %15, align 8, !tbaa !9
  %253 = call i32 @strcmp(ptr noundef %252, ptr noundef @.str.14) #10
  %254 = icmp eq i32 %253, 0
  br i1 %254, label %255, label %290

255:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %256 = load i32, ptr %4, align 4, !tbaa !5
  %257 = load ptr, ptr %5, align 8, !tbaa !9
  %258 = load i32, ptr %9, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %9, align 4, !tbaa !5
  %260 = call ptr @cmdline_option_value(i32 noundef %256, ptr noundef %257, i32 noundef %259)
  %261 = call i64 @integerValue(ptr noundef %260)
  %262 = trunc i64 %261 to i32
  store i32 %262, ptr %21, align 4, !tbaa !5
  %263 = load i32, ptr %21, align 4, !tbaa !5
  %264 = icmp slt i32 %263, 0
  br i1 %264, label %265, label %266

265:                                              ; preds = %255
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %266

266:                                              ; preds = %265, %255
  %267 = load i32, ptr %4, align 4, !tbaa !5
  %268 = load ptr, ptr %5, align 8, !tbaa !9
  %269 = load i32, ptr %9, align 4, !tbaa !5
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %9, align 4, !tbaa !5
  %271 = call ptr @cmdline_option_value(i32 noundef %267, ptr noundef %268, i32 noundef %270)
  %272 = call i64 @integerValue(ptr noundef %271)
  %273 = trunc i64 %272 to i32
  store i32 %273, ptr %20, align 4, !tbaa !5
  %274 = load i32, ptr %20, align 4, !tbaa !5
  %275 = icmp slt i32 %274, 0
  br i1 %275, label %276, label %277

276:                                              ; preds = %266
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %277

277:                                              ; preds = %276, %266
  %278 = load i32, ptr %21, align 4, !tbaa !5
  %279 = load i32, ptr %20, align 4, !tbaa !5
  %280 = call i32 (i32, ...) @sqlite3_config(i32 noundef 13, i32 noundef %278, i32 noundef %279)
  %281 = load i32, ptr %21, align 4, !tbaa !5
  %282 = load i32, ptr %20, align 4, !tbaa !5
  %283 = mul nsw i32 %281, %282
  %284 = icmp eq i32 %283, 0
  br i1 %284, label %285, label %289

285:                                              ; preds = %277
  %286 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 19
  %287 = load i32, ptr %286, align 4, !tbaa !14
  %288 = and i32 %287, -5
  store i32 %288, ptr %286, align 4, !tbaa !14
  br label %289

289:                                              ; preds = %285, %277
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %331

290:                                              ; preds = %251
  %291 = load ptr, ptr %15, align 8, !tbaa !9
  %292 = call i32 @strcmp(ptr noundef %291, ptr noundef @.str.15) #10
  %293 = icmp eq i32 %292, 0
  br i1 %293, label %294, label %304

294:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %295 = load i32, ptr %4, align 4, !tbaa !5
  %296 = load ptr, ptr %5, align 8, !tbaa !9
  %297 = load i32, ptr %9, align 4, !tbaa !5
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %9, align 4, !tbaa !5
  %299 = call ptr @cmdline_option_value(i32 noundef %295, ptr noundef %296, i32 noundef %298)
  %300 = call i64 @integerValue(ptr noundef %299)
  store i64 %300, ptr %22, align 8, !tbaa !15
  %301 = load i64, ptr %22, align 8, !tbaa !15
  %302 = load i64, ptr %22, align 8, !tbaa !15
  %303 = call i32 (i32, ...) @sqlite3_config(i32 noundef 22, i64 noundef %301, i64 noundef %302)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %330

304:                                              ; preds = %290
  %305 = load ptr, ptr %15, align 8, !tbaa !9
  %306 = call i32 @strcmp(ptr noundef %305, ptr noundef @.str.16) #10
  %307 = icmp eq i32 %306, 0
  br i1 %307, label %308, label %329

308:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %309 = load i32, ptr %4, align 4, !tbaa !5
  %310 = load ptr, ptr %5, align 8, !tbaa !9
  %311 = load i32, ptr %9, align 4, !tbaa !5
  %312 = add nsw i32 %311, 1
  store i32 %312, ptr %9, align 4, !tbaa !5
  %313 = call ptr @cmdline_option_value(i32 noundef %309, ptr noundef %310, i32 noundef %312)
  %314 = call ptr @sqlite3_vfs_find(ptr noundef %313)
  store ptr %314, ptr %23, align 8, !tbaa !9
  %315 = load ptr, ptr %23, align 8, !tbaa !9
  %316 = icmp ne ptr %315, null
  br i1 %316, label %317, label %320

317:                                              ; preds = %308
  %318 = load ptr, ptr %23, align 8, !tbaa !9
  %319 = call i32 @sqlite3_vfs_register(ptr noundef %318, i32 noundef 1)
  br label %328

320:                                              ; preds = %308
  %321 = load ptr, ptr @stderr, align 8, !tbaa !9
  %322 = load ptr, ptr %5, align 8, !tbaa !9
  %323 = load i32, ptr %9, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds ptr, ptr %322, i64 %324
  %326 = load ptr, ptr %325, align 8, !tbaa !9
  %327 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %321, ptr noundef @.str.17, ptr noundef %326) #9
  call void @exit(i32 noundef 1) #11
  unreachable

328:                                              ; preds = %317
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %329

329:                                              ; preds = %328, %304
  br label %330

330:                                              ; preds = %329, %294
  br label %331

331:                                              ; preds = %330, %289
  br label %332

332:                                              ; preds = %331, %243
  br label %333

333:                                              ; preds = %332, %191
  br label %334

334:                                              ; preds = %333, %151
  br label %335

335:                                              ; preds = %334, %146
  br label %336

336:                                              ; preds = %335, %136
  br label %337

337:                                              ; preds = %336, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %338

338:                                              ; preds = %337
  %339 = load i32, ptr %9, align 4, !tbaa !5
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %9, align 4, !tbaa !5
  br label %58, !llvm.loop !17

341:                                              ; preds = %58
  %342 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 28
  %343 = load ptr, ptr %342, align 8, !tbaa !12
  %344 = icmp eq ptr %343, null
  br i1 %344, label %345, label %350

345:                                              ; preds = %341
  %346 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 28
  store ptr @.str.18, ptr %346, align 8, !tbaa !12
  %347 = load i32, ptr %4, align 4, !tbaa !5
  %348 = icmp eq i32 %347, 1
  %349 = zext i1 %348 to i32
  store i32 %349, ptr %11, align 4, !tbaa !5
  br label %350

350:                                              ; preds = %345, %341
  %351 = load ptr, ptr @stdout, align 8, !tbaa !9
  %352 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store ptr %351, ptr %352, align 8, !tbaa !19
  %353 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 28
  %354 = load ptr, ptr %353, align 8, !tbaa !12
  %355 = call i32 @access(ptr noundef %354, i32 noundef 0) #9
  %356 = icmp eq i32 %355, 0
  br i1 %356, label %357, label %358

357:                                              ; preds = %350
  call void @open_db(ptr noundef %7, i32 noundef 0)
  br label %358

358:                                              ; preds = %357, %350
  %359 = load ptr, ptr %8, align 8, !tbaa !9
  call void @process_sqliterc(ptr noundef %7, ptr noundef %359)
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %360

360:                                              ; preds = %711, %358
  %361 = load i32, ptr %9, align 4, !tbaa !5
  %362 = load i32, ptr %4, align 4, !tbaa !5
  %363 = icmp slt i32 %361, %362
  br i1 %363, label %364, label %714

364:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %365 = load ptr, ptr %5, align 8, !tbaa !9
  %366 = load i32, ptr %9, align 4, !tbaa !5
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds ptr, ptr %365, i64 %367
  %369 = load ptr, ptr %368, align 8, !tbaa !9
  store ptr %369, ptr %24, align 8, !tbaa !9
  %370 = load ptr, ptr %24, align 8, !tbaa !9
  %371 = getelementptr inbounds i8, ptr %370, i64 0
  %372 = load i8, ptr %371, align 1, !tbaa !11
  %373 = sext i8 %372 to i32
  %374 = icmp ne i32 %373, 45
  br i1 %374, label %375, label %376

375:                                              ; preds = %364
  store i32 7, ptr %25, align 4
  br label %708

376:                                              ; preds = %364
  %377 = load ptr, ptr %24, align 8, !tbaa !9
  %378 = getelementptr inbounds i8, ptr %377, i64 1
  %379 = load i8, ptr %378, align 1, !tbaa !11
  %380 = sext i8 %379 to i32
  %381 = icmp eq i32 %380, 45
  br i1 %381, label %382, label %385

382:                                              ; preds = %376
  %383 = load ptr, ptr %24, align 8, !tbaa !9
  %384 = getelementptr inbounds i8, ptr %383, i32 1
  store ptr %384, ptr %24, align 8, !tbaa !9
  br label %385

385:                                              ; preds = %382, %376
  %386 = load ptr, ptr %24, align 8, !tbaa !9
  %387 = call i32 @strcmp(ptr noundef %386, ptr noundef @.str.9) #10
  %388 = icmp eq i32 %387, 0
  br i1 %388, label %389, label %392

389:                                              ; preds = %385
  %390 = load i32, ptr %9, align 4, !tbaa !5
  %391 = add nsw i32 %390, 1
  store i32 %391, ptr %9, align 4, !tbaa !5
  br label %704

392:                                              ; preds = %385
  %393 = load ptr, ptr %24, align 8, !tbaa !9
  %394 = call i32 @strcmp(ptr noundef %393, ptr noundef @.str.19) #10
  %395 = icmp eq i32 %394, 0
  br i1 %395, label %396, label %398

396:                                              ; preds = %392
  %397 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 13
  store i32 4, ptr %397, align 4, !tbaa !20
  br label %703

398:                                              ; preds = %392
  %399 = load ptr, ptr %24, align 8, !tbaa !9
  %400 = call i32 @strcmp(ptr noundef %399, ptr noundef @.str.20) #10
  %401 = icmp eq i32 %400, 0
  br i1 %401, label %402, label %404

402:                                              ; preds = %398
  %403 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 13
  store i32 2, ptr %403, align 4, !tbaa !20
  br label %702

404:                                              ; preds = %398
  %405 = load ptr, ptr %24, align 8, !tbaa !9
  %406 = call i32 @strcmp(ptr noundef %405, ptr noundef @.str.21) #10
  %407 = icmp eq i32 %406, 0
  br i1 %407, label %408, label %410

408:                                              ; preds = %404
  %409 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 13
  store i32 0, ptr %409, align 4, !tbaa !20
  br label %701

410:                                              ; preds = %404
  %411 = load ptr, ptr %24, align 8, !tbaa !9
  %412 = call i32 @strcmp(ptr noundef %411, ptr noundef @.str.22) #10
  %413 = icmp eq i32 %412, 0
  br i1 %413, label %414, label %416

414:                                              ; preds = %410
  %415 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 13
  store i32 1, ptr %415, align 4, !tbaa !20
  br label %700

416:                                              ; preds = %410
  %417 = load ptr, ptr %24, align 8, !tbaa !9
  %418 = call i32 @strcmp(ptr noundef %417, ptr noundef @.str.23) #10
  %419 = icmp eq i32 %418, 0
  br i1 %419, label %420, label %424

420:                                              ; preds = %416
  %421 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 13
  store i32 8, ptr %421, align 4, !tbaa !20
  %422 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 22
  %423 = getelementptr inbounds [20 x i8], ptr %422, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %423, ptr align 1 @.str.24, i64 2, i1 false)
  br label %699

424:                                              ; preds = %416
  %425 = load ptr, ptr %24, align 8, !tbaa !9
  %426 = call i32 @strcmp(ptr noundef %425, ptr noundef @.str.25) #10
  %427 = icmp eq i32 %426, 0
  br i1 %427, label %428, label %436

428:                                              ; preds = %424
  %429 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 13
  store i32 10, ptr %429, align 4, !tbaa !20
  %430 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 22
  %431 = getelementptr inbounds [20 x i8], ptr %430, i64 0, i64 0
  %432 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %431, ptr noundef @.str.26)
  %433 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 23
  %434 = getelementptr inbounds [20 x i8], ptr %433, i64 0, i64 0
  %435 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %434, ptr noundef @.str.27)
  br label %698

436:                                              ; preds = %424
  %437 = load ptr, ptr %24, align 8, !tbaa !9
  %438 = call i32 @strcmp(ptr noundef %437, ptr noundef @.str.5) #10
  %439 = icmp eq i32 %438, 0
  br i1 %439, label %440, label %449

440:                                              ; preds = %436
  %441 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 22
  %442 = getelementptr inbounds [20 x i8], ptr %441, i64 0, i64 0
  %443 = load i32, ptr %4, align 4, !tbaa !5
  %444 = load ptr, ptr %5, align 8, !tbaa !9
  %445 = load i32, ptr %9, align 4, !tbaa !5
  %446 = add nsw i32 %445, 1
  store i32 %446, ptr %9, align 4, !tbaa !5
  %447 = call ptr @cmdline_option_value(i32 noundef %443, ptr noundef %444, i32 noundef %446)
  %448 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %442, ptr noundef @.str.28, ptr noundef %447)
  br label %697

449:                                              ; preds = %436
  %450 = load ptr, ptr %24, align 8, !tbaa !9
  %451 = call i32 @strcmp(ptr noundef %450, ptr noundef @.str.7) #10
  %452 = icmp eq i32 %451, 0
  br i1 %452, label %453, label %462

453:                                              ; preds = %449
  %454 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 23
  %455 = getelementptr inbounds [20 x i8], ptr %454, i64 0, i64 0
  %456 = load i32, ptr %4, align 4, !tbaa !5
  %457 = load ptr, ptr %5, align 8, !tbaa !9
  %458 = load i32, ptr %9, align 4, !tbaa !5
  %459 = add nsw i32 %458, 1
  store i32 %459, ptr %9, align 4, !tbaa !5
  %460 = call ptr @cmdline_option_value(i32 noundef %456, ptr noundef %457, i32 noundef %459)
  %461 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %455, ptr noundef @.str.28, ptr noundef %460)
  br label %696

462:                                              ; preds = %449
  %463 = load ptr, ptr %24, align 8, !tbaa !9
  %464 = call i32 @strcmp(ptr noundef %463, ptr noundef @.str.6) #10
  %465 = icmp eq i32 %464, 0
  br i1 %465, label %466, label %475

466:                                              ; preds = %462
  %467 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 26
  %468 = getelementptr inbounds [20 x i8], ptr %467, i64 0, i64 0
  %469 = load i32, ptr %4, align 4, !tbaa !5
  %470 = load ptr, ptr %5, align 8, !tbaa !9
  %471 = load i32, ptr %9, align 4, !tbaa !5
  %472 = add nsw i32 %471, 1
  store i32 %472, ptr %9, align 4, !tbaa !5
  %473 = call ptr @cmdline_option_value(i32 noundef %469, ptr noundef %470, i32 noundef %472)
  %474 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %468, ptr noundef @.str.28, ptr noundef %473)
  br label %695

475:                                              ; preds = %462
  %476 = load ptr, ptr %24, align 8, !tbaa !9
  %477 = call i32 @strcmp(ptr noundef %476, ptr noundef @.str.29) #10
  %478 = icmp eq i32 %477, 0
  br i1 %478, label %479, label %481

479:                                              ; preds = %475
  %480 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 17
  store i32 1, ptr %480, align 4, !tbaa !21
  br label %694

481:                                              ; preds = %475
  %482 = load ptr, ptr %24, align 8, !tbaa !9
  %483 = call i32 @strcmp(ptr noundef %482, ptr noundef @.str.30) #10
  %484 = icmp eq i32 %483, 0
  br i1 %484, label %485, label %487

485:                                              ; preds = %481
  %486 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 17
  store i32 0, ptr %486, align 4, !tbaa !21
  br label %693

487:                                              ; preds = %481
  %488 = load ptr, ptr %24, align 8, !tbaa !9
  %489 = call i32 @strcmp(ptr noundef %488, ptr noundef @.str.31) #10
  %490 = icmp eq i32 %489, 0
  br i1 %490, label %491, label %493

491:                                              ; preds = %487
  %492 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 1
  store i32 1, ptr %492, align 8, !tbaa !22
  br label %692

493:                                              ; preds = %487
  %494 = load ptr, ptr %24, align 8, !tbaa !9
  %495 = call i32 @strcmp(ptr noundef %494, ptr noundef @.str.32) #10
  %496 = icmp eq i32 %495, 0
  br i1 %496, label %497, label %499

497:                                              ; preds = %493
  %498 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 3
  store i32 1, ptr %498, align 8, !tbaa !23
  br label %691

499:                                              ; preds = %493
  %500 = load ptr, ptr %24, align 8, !tbaa !9
  %501 = call i32 @strcmp(ptr noundef %500, ptr noundef @.str.33) #10
  %502 = icmp eq i32 %501, 0
  br i1 %502, label %503, label %505

503:                                              ; preds = %499
  %504 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 3
  store i32 2, ptr %504, align 8, !tbaa !23
  br label %690

505:                                              ; preds = %499
  %506 = load ptr, ptr %24, align 8, !tbaa !9
  %507 = call i32 @strcmp(ptr noundef %506, ptr noundef @.str.34) #10
  %508 = icmp eq i32 %507, 0
  br i1 %508, label %509, label %511

509:                                              ; preds = %505
  %510 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 4
  store i32 1, ptr %510, align 4, !tbaa !24
  br label %689

511:                                              ; preds = %505
  %512 = load ptr, ptr %24, align 8, !tbaa !9
  %513 = call i32 @strcmp(ptr noundef %512, ptr noundef @.str.35) #10
  %514 = icmp eq i32 %513, 0
  br i1 %514, label %515, label %517

515:                                              ; preds = %511
  %516 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 5
  store i32 1, ptr %516, align 8, !tbaa !25
  br label %688

517:                                              ; preds = %511
  %518 = load ptr, ptr %24, align 8, !tbaa !9
  %519 = call i32 @strcmp(ptr noundef %518, ptr noundef @.str.36) #10
  %520 = icmp eq i32 %519, 0
  br i1 %520, label %521, label %523

521:                                              ; preds = %517
  %522 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 7
  store i32 1, ptr %522, align 8, !tbaa !26
  br label %687

523:                                              ; preds = %517
  %524 = load ptr, ptr %24, align 8, !tbaa !9
  %525 = call i32 @strcmp(ptr noundef %524, ptr noundef @.str.37) #10
  %526 = icmp eq i32 %525, 0
  br i1 %526, label %527, label %528

527:                                              ; preds = %523
  store i32 1, ptr @bail_on_error, align 4, !tbaa !5
  br label %686

528:                                              ; preds = %523
  %529 = load ptr, ptr %24, align 8, !tbaa !9
  %530 = call i32 @strcmp(ptr noundef %529, ptr noundef @.str.38) #10
  %531 = icmp eq i32 %530, 0
  br i1 %531, label %532, label %536

532:                                              ; preds = %528
  %533 = call ptr @sqlite3_libversion()
  %534 = call ptr @sqlite3_sourceid()
  %535 = call i32 (ptr, ...) @printf(ptr noundef @.str.39, ptr noundef %533, ptr noundef %534)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %708

536:                                              ; preds = %528
  %537 = load ptr, ptr %24, align 8, !tbaa !9
  %538 = call i32 @strcmp(ptr noundef %537, ptr noundef @.str.40) #10
  %539 = icmp eq i32 %538, 0
  br i1 %539, label %540, label %541

540:                                              ; preds = %536
  store i32 1, ptr @stdin_is_interactive, align 4, !tbaa !5
  br label %684

541:                                              ; preds = %536
  %542 = load ptr, ptr %24, align 8, !tbaa !9
  %543 = call i32 @strcmp(ptr noundef %542, ptr noundef @.str.10) #10
  %544 = icmp eq i32 %543, 0
  br i1 %544, label %545, label %546

545:                                              ; preds = %541
  store i32 0, ptr @stdin_is_interactive, align 4, !tbaa !5
  br label %683

546:                                              ; preds = %541
  %547 = load ptr, ptr %24, align 8, !tbaa !9
  %548 = call i32 @strcmp(ptr noundef %547, ptr noundef @.str.11) #10
  %549 = icmp eq i32 %548, 0
  br i1 %549, label %550, label %553

550:                                              ; preds = %546
  %551 = load i32, ptr %9, align 4, !tbaa !5
  %552 = add nsw i32 %551, 1
  store i32 %552, ptr %9, align 4, !tbaa !5
  br label %682

553:                                              ; preds = %546
  %554 = load ptr, ptr %24, align 8, !tbaa !9
  %555 = call i32 @strcmp(ptr noundef %554, ptr noundef @.str.12) #10
  %556 = icmp eq i32 %555, 0
  br i1 %556, label %557, label %560

557:                                              ; preds = %553
  %558 = load i32, ptr %9, align 4, !tbaa !5
  %559 = add nsw i32 %558, 2
  store i32 %559, ptr %9, align 4, !tbaa !5
  br label %681

560:                                              ; preds = %553
  %561 = load ptr, ptr %24, align 8, !tbaa !9
  %562 = call i32 @strcmp(ptr noundef %561, ptr noundef @.str.13) #10
  %563 = icmp eq i32 %562, 0
  br i1 %563, label %564, label %567

564:                                              ; preds = %560
  %565 = load i32, ptr %9, align 4, !tbaa !5
  %566 = add nsw i32 %565, 2
  store i32 %566, ptr %9, align 4, !tbaa !5
  br label %680

567:                                              ; preds = %560
  %568 = load ptr, ptr %24, align 8, !tbaa !9
  %569 = call i32 @strcmp(ptr noundef %568, ptr noundef @.str.14) #10
  %570 = icmp eq i32 %569, 0
  br i1 %570, label %571, label %574

571:                                              ; preds = %567
  %572 = load i32, ptr %9, align 4, !tbaa !5
  %573 = add nsw i32 %572, 2
  store i32 %573, ptr %9, align 4, !tbaa !5
  br label %679

574:                                              ; preds = %567
  %575 = load ptr, ptr %24, align 8, !tbaa !9
  %576 = call i32 @strcmp(ptr noundef %575, ptr noundef @.str.15) #10
  %577 = icmp eq i32 %576, 0
  br i1 %577, label %578, label %581

578:                                              ; preds = %574
  %579 = load i32, ptr %9, align 4, !tbaa !5
  %580 = add nsw i32 %579, 1
  store i32 %580, ptr %9, align 4, !tbaa !5
  br label %678

581:                                              ; preds = %574
  %582 = load ptr, ptr %24, align 8, !tbaa !9
  %583 = call i32 @strcmp(ptr noundef %582, ptr noundef @.str.16) #10
  %584 = icmp eq i32 %583, 0
  br i1 %584, label %585, label %588

585:                                              ; preds = %581
  %586 = load i32, ptr %9, align 4, !tbaa !5
  %587 = add nsw i32 %586, 1
  store i32 %587, ptr %9, align 4, !tbaa !5
  br label %677

588:                                              ; preds = %581
  %589 = load ptr, ptr %24, align 8, !tbaa !9
  %590 = call i32 @strcmp(ptr noundef %589, ptr noundef @.str.41) #10
  %591 = icmp eq i32 %590, 0
  br i1 %591, label %592, label %593

592:                                              ; preds = %588
  call void @usage(i32 noundef 1)
  br label %676

593:                                              ; preds = %588
  %594 = load ptr, ptr %24, align 8, !tbaa !9
  %595 = call i32 @strcmp(ptr noundef %594, ptr noundef @.str.8) #10
  %596 = icmp eq i32 %595, 0
  br i1 %596, label %597, label %668

597:                                              ; preds = %593
  %598 = load i32, ptr %9, align 4, !tbaa !5
  %599 = load i32, ptr %4, align 4, !tbaa !5
  %600 = sub nsw i32 %599, 1
  %601 = icmp eq i32 %598, %600
  br i1 %601, label %602, label %603

602:                                              ; preds = %597
  store i32 5, ptr %25, align 4
  br label %708

603:                                              ; preds = %597
  %604 = load i32, ptr %4, align 4, !tbaa !5
  %605 = load ptr, ptr %5, align 8, !tbaa !9
  %606 = load i32, ptr %9, align 4, !tbaa !5
  %607 = add nsw i32 %606, 1
  store i32 %607, ptr %9, align 4, !tbaa !5
  %608 = call ptr @cmdline_option_value(i32 noundef %604, ptr noundef %605, i32 noundef %607)
  store ptr %608, ptr %24, align 8, !tbaa !9
  %609 = load ptr, ptr %24, align 8, !tbaa !9
  %610 = getelementptr inbounds i8, ptr %609, i64 0
  %611 = load i8, ptr %610, align 1, !tbaa !11
  %612 = sext i8 %611 to i32
  %613 = icmp eq i32 %612, 46
  br i1 %613, label %614, label %631

614:                                              ; preds = %603
  %615 = load ptr, ptr %24, align 8, !tbaa !9
  %616 = call i32 @do_meta_command(ptr noundef %615, ptr noundef %7)
  store i32 %616, ptr %10, align 4, !tbaa !5
  %617 = load i32, ptr %10, align 4, !tbaa !5
  %618 = icmp ne i32 %617, 0
  br i1 %618, label %619, label %630

619:                                              ; preds = %614
  %620 = load i32, ptr @bail_on_error, align 4, !tbaa !5
  %621 = icmp ne i32 %620, 0
  br i1 %621, label %622, label %630

622:                                              ; preds = %619
  %623 = load i32, ptr %10, align 4, !tbaa !5
  %624 = icmp eq i32 %623, 2
  br i1 %624, label %625, label %626

625:                                              ; preds = %622
  br label %628

626:                                              ; preds = %622
  %627 = load i32, ptr %10, align 4, !tbaa !5
  br label %628

628:                                              ; preds = %626, %625
  %629 = phi i32 [ 0, %625 ], [ %627, %626 ]
  store i32 %629, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %708

630:                                              ; preds = %619, %614
  br label %667

631:                                              ; preds = %603
  call void @open_db(ptr noundef %7, i32 noundef 0)
  %632 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %633 = load ptr, ptr %632, align 8, !tbaa !27
  %634 = load ptr, ptr %24, align 8, !tbaa !9
  %635 = call i32 @shell_exec(ptr noundef %633, ptr noundef %634, ptr noundef @shell_callback, ptr noundef %7, ptr noundef %6)
  store i32 %635, ptr %10, align 4, !tbaa !5
  %636 = load ptr, ptr %6, align 8, !tbaa !9
  %637 = icmp ne ptr %636, null
  br i1 %637, label %638, label %653

638:                                              ; preds = %631
  %639 = load ptr, ptr @stderr, align 8, !tbaa !9
  %640 = load ptr, ptr %6, align 8, !tbaa !9
  %641 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %639, ptr noundef @.str.42, ptr noundef %640) #9
  %642 = load i32, ptr @bail_on_error, align 4, !tbaa !5
  %643 = icmp ne i32 %642, 0
  br i1 %643, label %644, label %652

644:                                              ; preds = %638
  %645 = load i32, ptr %10, align 4, !tbaa !5
  %646 = icmp ne i32 %645, 0
  br i1 %646, label %647, label %649

647:                                              ; preds = %644
  %648 = load i32, ptr %10, align 4, !tbaa !5
  br label %650

649:                                              ; preds = %644
  br label %650

650:                                              ; preds = %649, %647
  %651 = phi i32 [ %648, %647 ], [ 1, %649 ]
  store i32 %651, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %708

652:                                              ; preds = %638
  br label %666

653:                                              ; preds = %631
  %654 = load i32, ptr %10, align 4, !tbaa !5
  %655 = icmp ne i32 %654, 0
  br i1 %655, label %656, label %665

656:                                              ; preds = %653
  %657 = load ptr, ptr @stderr, align 8, !tbaa !9
  %658 = load ptr, ptr %24, align 8, !tbaa !9
  %659 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %657, ptr noundef @.str.43, ptr noundef %658) #9
  %660 = load i32, ptr @bail_on_error, align 4, !tbaa !5
  %661 = icmp ne i32 %660, 0
  br i1 %661, label %662, label %664

662:                                              ; preds = %656
  %663 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %663, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %708

664:                                              ; preds = %656
  br label %665

665:                                              ; preds = %664, %653
  br label %666

666:                                              ; preds = %665, %652
  br label %667

667:                                              ; preds = %666, %630
  br label %675

668:                                              ; preds = %593
  %669 = load ptr, ptr @stderr, align 8, !tbaa !9
  %670 = load ptr, ptr @Argv0, align 8, !tbaa !9
  %671 = load ptr, ptr %24, align 8, !tbaa !9
  %672 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %669, ptr noundef @.str.44, ptr noundef %670, ptr noundef %671) #9
  %673 = load ptr, ptr @stderr, align 8, !tbaa !9
  %674 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %673, ptr noundef @.str.45) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %708

675:                                              ; preds = %667
  br label %676

676:                                              ; preds = %675, %592
  br label %677

677:                                              ; preds = %676, %585
  br label %678

678:                                              ; preds = %677, %578
  br label %679

679:                                              ; preds = %678, %571
  br label %680

680:                                              ; preds = %679, %564
  br label %681

681:                                              ; preds = %680, %557
  br label %682

682:                                              ; preds = %681, %550
  br label %683

683:                                              ; preds = %682, %545
  br label %684

684:                                              ; preds = %683, %540
  br label %685

685:                                              ; preds = %684
  br label %686

686:                                              ; preds = %685, %527
  br label %687

687:                                              ; preds = %686, %521
  br label %688

688:                                              ; preds = %687, %515
  br label %689

689:                                              ; preds = %688, %509
  br label %690

690:                                              ; preds = %689, %503
  br label %691

691:                                              ; preds = %690, %497
  br label %692

692:                                              ; preds = %691, %491
  br label %693

693:                                              ; preds = %692, %485
  br label %694

694:                                              ; preds = %693, %479
  br label %695

695:                                              ; preds = %694, %466
  br label %696

696:                                              ; preds = %695, %453
  br label %697

697:                                              ; preds = %696, %440
  br label %698

698:                                              ; preds = %697, %428
  br label %699

699:                                              ; preds = %698, %420
  br label %700

700:                                              ; preds = %699, %414
  br label %701

701:                                              ; preds = %700, %408
  br label %702

702:                                              ; preds = %701, %402
  br label %703

703:                                              ; preds = %702, %396
  br label %704

704:                                              ; preds = %703, %389
  %705 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 13
  %706 = load i32, ptr %705, align 4, !tbaa !20
  %707 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 14
  store i32 %706, ptr %707, align 8, !tbaa !28
  store i32 0, ptr %25, align 4
  br label %708

708:                                              ; preds = %704, %668, %662, %650, %628, %602, %532, %375
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  %709 = load i32, ptr %25, align 4
  switch i32 %709, label %850 [
    i32 0, label %710
    i32 7, label %711
    i32 5, label %714
  ]

710:                                              ; preds = %708
  br label %711

711:                                              ; preds = %710, %708
  %712 = load i32, ptr %9, align 4, !tbaa !5
  %713 = add nsw i32 %712, 1
  store i32 %713, ptr %9, align 4, !tbaa !5
  br label %360, !llvm.loop !29

714:                                              ; preds = %708, %360
  %715 = load i32, ptr %12, align 4, !tbaa !5
  %716 = icmp ne i32 %715, 0
  br i1 %716, label %792, label %717

717:                                              ; preds = %714
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %718

718:                                              ; preds = %787, %717
  %719 = load i32, ptr %9, align 4, !tbaa !5
  %720 = load i32, ptr %13, align 4, !tbaa !5
  %721 = icmp slt i32 %719, %720
  br i1 %721, label %722, label %790

722:                                              ; preds = %718
  %723 = load ptr, ptr %14, align 8, !tbaa !9
  %724 = load i32, ptr %9, align 4, !tbaa !5
  %725 = sext i32 %724 to i64
  %726 = getelementptr inbounds ptr, ptr %723, i64 %725
  %727 = load ptr, ptr %726, align 8, !tbaa !9
  %728 = getelementptr inbounds i8, ptr %727, i64 0
  %729 = load i8, ptr %728, align 1, !tbaa !11
  %730 = sext i8 %729 to i32
  %731 = icmp eq i32 %730, 46
  br i1 %731, label %732, label %750

732:                                              ; preds = %722
  %733 = load ptr, ptr %14, align 8, !tbaa !9
  %734 = load i32, ptr %9, align 4, !tbaa !5
  %735 = sext i32 %734 to i64
  %736 = getelementptr inbounds ptr, ptr %733, i64 %735
  %737 = load ptr, ptr %736, align 8, !tbaa !9
  %738 = call i32 @do_meta_command(ptr noundef %737, ptr noundef %7)
  store i32 %738, ptr %10, align 4, !tbaa !5
  %739 = load i32, ptr %10, align 4, !tbaa !5
  %740 = icmp ne i32 %739, 0
  br i1 %740, label %741, label %749

741:                                              ; preds = %732
  %742 = load i32, ptr %10, align 4, !tbaa !5
  %743 = icmp eq i32 %742, 2
  br i1 %743, label %744, label %745

744:                                              ; preds = %741
  br label %747

745:                                              ; preds = %741
  %746 = load i32, ptr %10, align 4, !tbaa !5
  br label %747

747:                                              ; preds = %745, %744
  %748 = phi i32 [ 0, %744 ], [ %746, %745 ]
  store i32 %748, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %850

749:                                              ; preds = %732
  br label %786

750:                                              ; preds = %722
  call void @open_db(ptr noundef %7, i32 noundef 0)
  %751 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %752 = load ptr, ptr %751, align 8, !tbaa !27
  %753 = load ptr, ptr %14, align 8, !tbaa !9
  %754 = load i32, ptr %9, align 4, !tbaa !5
  %755 = sext i32 %754 to i64
  %756 = getelementptr inbounds ptr, ptr %753, i64 %755
  %757 = load ptr, ptr %756, align 8, !tbaa !9
  %758 = call i32 @shell_exec(ptr noundef %752, ptr noundef %757, ptr noundef @shell_callback, ptr noundef %7, ptr noundef %6)
  store i32 %758, ptr %10, align 4, !tbaa !5
  %759 = load ptr, ptr %6, align 8, !tbaa !9
  %760 = icmp ne ptr %759, null
  br i1 %760, label %761, label %772

761:                                              ; preds = %750
  %762 = load ptr, ptr @stderr, align 8, !tbaa !9
  %763 = load ptr, ptr %6, align 8, !tbaa !9
  %764 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %762, ptr noundef @.str.42, ptr noundef %763) #9
  %765 = load i32, ptr %10, align 4, !tbaa !5
  %766 = icmp ne i32 %765, 0
  br i1 %766, label %767, label %769

767:                                              ; preds = %761
  %768 = load i32, ptr %10, align 4, !tbaa !5
  br label %770

769:                                              ; preds = %761
  br label %770

770:                                              ; preds = %769, %767
  %771 = phi i32 [ %768, %767 ], [ 1, %769 ]
  store i32 %771, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %850

772:                                              ; preds = %750
  %773 = load i32, ptr %10, align 4, !tbaa !5
  %774 = icmp ne i32 %773, 0
  br i1 %774, label %775, label %784

775:                                              ; preds = %772
  %776 = load ptr, ptr @stderr, align 8, !tbaa !9
  %777 = load ptr, ptr %14, align 8, !tbaa !9
  %778 = load i32, ptr %9, align 4, !tbaa !5
  %779 = sext i32 %778 to i64
  %780 = getelementptr inbounds ptr, ptr %777, i64 %779
  %781 = load ptr, ptr %780, align 8, !tbaa !9
  %782 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %776, ptr noundef @.str.46, ptr noundef %781) #9
  %783 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %783, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %850

784:                                              ; preds = %772
  br label %785

785:                                              ; preds = %784
  br label %786

786:                                              ; preds = %785, %749
  br label %787

787:                                              ; preds = %786
  %788 = load i32, ptr %9, align 4, !tbaa !5
  %789 = add nsw i32 %788, 1
  store i32 %789, ptr %9, align 4, !tbaa !5
  br label %718, !llvm.loop !30

790:                                              ; preds = %718
  %791 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %791) #9
  br label %837

792:                                              ; preds = %714
  %793 = load i32, ptr @stdin_is_interactive, align 4, !tbaa !5
  %794 = icmp ne i32 %793, 0
  br i1 %794, label %795, label %833

795:                                              ; preds = %792
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  store ptr null, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  %796 = call ptr @sqlite3_libversion()
  %797 = call ptr @sqlite3_sourceid()
  %798 = call i32 (ptr, ...) @printf(ptr noundef @.str.47, ptr noundef %796, ptr noundef %797)
  %799 = load i32, ptr %11, align 4, !tbaa !5
  %800 = icmp ne i32 %799, 0
  br i1 %800, label %801, label %804

801:                                              ; preds = %795
  %802 = call i32 (ptr, ...) @printf(ptr noundef @.str.48)
  call void @printBold(ptr noundef @.str.49)
  %803 = call i32 (ptr, ...) @printf(ptr noundef @.str.50)
  br label %804

804:                                              ; preds = %801, %795
  %805 = call ptr @find_home_dir(i32 noundef 0)
  store ptr %805, ptr %26, align 8, !tbaa !9
  %806 = load ptr, ptr %26, align 8, !tbaa !9
  %807 = icmp ne ptr %806, null
  br i1 %807, label %808, label %822

808:                                              ; preds = %804
  %809 = load ptr, ptr %26, align 8, !tbaa !9
  %810 = call i32 @strlen30(ptr noundef %809)
  %811 = add nsw i32 %810, 20
  store i32 %811, ptr %28, align 4, !tbaa !5
  %812 = load i32, ptr %28, align 4, !tbaa !5
  %813 = sext i32 %812 to i64
  %814 = call noalias ptr @malloc(i64 noundef %813) #13
  store ptr %814, ptr %27, align 8, !tbaa !9
  %815 = icmp ne ptr %814, null
  br i1 %815, label %816, label %821

816:                                              ; preds = %808
  %817 = load i32, ptr %28, align 4, !tbaa !5
  %818 = load ptr, ptr %27, align 8, !tbaa !9
  %819 = load ptr, ptr %26, align 8, !tbaa !9
  %820 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef %817, ptr noundef %818, ptr noundef @.str.51, ptr noundef %819)
  br label %821

821:                                              ; preds = %816, %808
  br label %822

822:                                              ; preds = %821, %804
  %823 = load ptr, ptr %27, align 8, !tbaa !9
  %824 = icmp ne ptr %823, null
  br i1 %824, label %825, label %826

825:                                              ; preds = %822
  br label %826

826:                                              ; preds = %825, %822
  %827 = call i32 @process_input(ptr noundef %7, ptr noundef null)
  store i32 %827, ptr %10, align 4, !tbaa !5
  %828 = load ptr, ptr %27, align 8, !tbaa !9
  %829 = icmp ne ptr %828, null
  br i1 %829, label %830, label %832

830:                                              ; preds = %826
  %831 = load ptr, ptr %27, align 8, !tbaa !9
  call void @free(ptr noundef %831) #9
  br label %832

832:                                              ; preds = %830, %826
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %836

833:                                              ; preds = %792
  %834 = load ptr, ptr @stdin, align 8, !tbaa !9
  %835 = call i32 @process_input(ptr noundef %7, ptr noundef %834)
  store i32 %835, ptr %10, align 4, !tbaa !5
  br label %836

836:                                              ; preds = %833, %832
  br label %837

837:                                              ; preds = %836, %790
  call void @set_table_name(ptr noundef %7, ptr noundef null)
  %838 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %839 = load ptr, ptr %838, align 8, !tbaa !27
  %840 = icmp ne ptr %839, null
  br i1 %840, label %841, label %845

841:                                              ; preds = %837
  %842 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %843 = load ptr, ptr %842, align 8, !tbaa !27
  %844 = call i32 @sqlite3_close(ptr noundef %843)
  br label %845

845:                                              ; preds = %841, %837
  %846 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 29
  %847 = load ptr, ptr %846, align 8, !tbaa !31
  call void @sqlite3_free(ptr noundef %847)
  %848 = call ptr @find_home_dir(i32 noundef 1)
  %849 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %849, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %850

850:                                              ; preds = %845, %775, %770, %747, %708
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 5152, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  %851 = load i32, ptr %3, align 4
  ret i32 %851
}

; Function Attrs: nounwind
declare i32 @setvbuf(ptr noundef, ptr noundef, i32 noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i32 @isatty(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

declare ptr @sqlite3_sourceid() #4

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @main_init(ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @interrupt_handler(i32 noundef) #1

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #6

; Function Attrs: nounwind uwtable
declare hidden ptr @cmdline_option_value(i32 noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @integerValue(ptr noundef) #1

declare i32 @sqlite3_config(i32 noundef, ...) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #7

declare ptr @sqlite3_vfs_find(ptr noundef) #4

declare i32 @sqlite3_vfs_register(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @access(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @open_db(ptr noundef, i32 noundef) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

declare ptr @sqlite3_snprintf(i32 noundef, ptr noundef, ptr noundef, ...) #4

declare i32 @printf(ptr noundef, ...) #4

declare ptr @sqlite3_libversion() #4

; Function Attrs: nounwind uwtable
declare hidden void @usage(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @do_meta_command(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @shell_exec(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @shell_callback(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @printBold(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @find_home_dir(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @strlen30(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @process_input(ptr noundef, ptr noundef) #1

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

declare i32 @sqlite3_close(ptr noundef) #4

declare void @sqlite3_free(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 willreturn memory(read) "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 #4 = { "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 #5 = { noreturn nounwind "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 #6 = { nounwind allocsize(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 #7 = { nounwind allocsize(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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind allocsize(1) }
attributes #13 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 5096}
!13 = !{!"ShellState", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !10, i64 48, !10, i64 56, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !10, i64 96, !7, i64 104, !7, i64 134, !7, i64 154, !7, i64 176, !7, i64 576, !7, i64 976, !7, i64 996, !10, i64 5096, !10, i64 5104, !10, i64 5112, !10, i64 5120, !10, i64 5128, !10, i64 5136, !6, i64 5144, !6, i64 5148}
!14 = !{!13, !6, i64 92}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!13, !10, i64 48}
!20 = !{!13, !6, i64 68}
!21 = !{!13, !6, i64 84}
!22 = !{!13, !6, i64 8}
!23 = !{!13, !6, i64 16}
!24 = !{!13, !6, i64 20}
!25 = !{!13, !6, i64 24}
!26 = !{!13, !6, i64 32}
!27 = !{!13, !10, i64 0}
!28 = !{!13, !6, i64 72}
!29 = distinct !{!29, !18}
!30 = distinct !{!30, !18}
!31 = !{!13, !10, i64 5104}


; 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.ShellState = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, ptr, [30 x i8], [20 x i8], [20 x i8], [100 x i32], [100 x i32], [20 x i8], [4096 x i8], ptr, ptr, ptr, ptr, ptr, ptr, i32, i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@stdin_is_interactive = external hidden local_unnamed_addr global i32, align 4
@stdout_is_console = external hidden local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [61 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@Argv0 = external hidden local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [6 x i8], align 1
@bail_on_error = external hidden local_unnamed_addr global i32, align 4
@.str.38 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [19 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8

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

; 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 i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca ptr, align 8
  %4 = alloca %struct.ShellState, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #11
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 5152, ptr nonnull %4) #11
  %5 = load ptr, ptr @stderr, align 8, !tbaa !5
  %6 = tail call i32 @setvbuf(ptr noundef %5, ptr noundef null, i32 noundef 2, i64 noundef 0) #11
  %7 = tail call i32 @isatty(i32 noundef 0) #11
  store i32 %7, ptr @stdin_is_interactive, align 4, !tbaa !9
  %8 = tail call i32 @isatty(i32 noundef 1) #11
  store i32 %8, ptr @stdout_is_console, align 4, !tbaa !9
  %9 = tail call ptr @sqlite3_sourceid() #11
  %10 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str) #12
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %15, label %11

11:                                               ; preds = %2
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = tail call ptr @sqlite3_sourceid() #11
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.1, ptr noundef %13, ptr noundef nonnull @.str) #13
  tail call void @exit(i32 noundef 1) #14
  unreachable

15:                                               ; preds = %2
  call void @main_init(ptr noundef nonnull %4)
  %16 = icmp sgt i32 %0, 0
  %17 = icmp ne ptr %1, null
  %or.cond = and i1 %16, %17
  br i1 %or.cond, label %18, label %20

18:                                               ; preds = %15
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %.not251 = icmp eq ptr %19, null
  br i1 %.not251, label %20, label %21

20:                                               ; preds = %18, %15
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 5830, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #14
  unreachable

21:                                               ; preds = %18
  store ptr %19, ptr @Argv0, align 8, !tbaa !5
  %22 = call ptr @signal(i32 noundef 2, ptr noundef nonnull @interrupt_handler) #11
  %23 = icmp ugt i32 %0, 1
  br i1 %23, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %21
  %24 = getelementptr inbounds i8, ptr %4, i64 5096
  %25 = getelementptr inbounds i8, ptr %4, i64 92
  br label %26

26:                                               ; preds = %.lr.ph, %163
  %.0211324 = phi ptr [ null, %.lr.ph ], [ %.1212, %163 ]
  %.0215323 = phi i32 [ 1, %.lr.ph ], [ %164, %163 ]
  %.0225322 = phi i32 [ 1, %.lr.ph ], [ %.1226, %163 ]
  %.0227321 = phi i32 [ 0, %.lr.ph ], [ %.1228, %163 ]
  %.0229320 = phi ptr [ null, %.lr.ph ], [ %.1230, %163 ]
  %27 = sext i32 %.0215323 to i64
  %28 = getelementptr inbounds ptr, ptr %1, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %.not269 = icmp eq i8 %30, 45
  br i1 %.not269, label %46, label %31

31:                                               ; preds = %26
  %32 = load ptr, ptr %24, align 8, !tbaa !12
  %33 = icmp eq ptr %32, null
  br i1 %33, label %.sink.split, label %34

34:                                               ; preds = %31
  %35 = add nsw i32 %.0227321, 1
  %36 = sext i32 %35 to i64
  %37 = shl nsw i64 %36, 3
  %38 = call ptr @realloc(ptr noundef %.0229320, i64 noundef %37) #15
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %43

40:                                               ; preds = %34
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.4) #13
  call void @exit(i32 noundef 1) #14
  unreachable

43:                                               ; preds = %34
  %44 = sext i32 %.0227321 to i64
  %45 = getelementptr inbounds ptr, ptr %38, i64 %44
  br label %.sink.split

.sink.split:                                      ; preds = %31, %43
  %.sink = phi ptr [ %45, %43 ], [ %24, %31 ]
  %.1230.ph = phi ptr [ %38, %43 ], [ %.0229320, %31 ]
  %.1228.ph = phi i32 [ %35, %43 ], [ %.0227321, %31 ]
  %.1226.ph = phi i32 [ 0, %43 ], [ %.0225322, %31 ]
  store ptr %29, ptr %.sink, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %.sink.split, %26
  %.1230 = phi ptr [ %.0229320, %26 ], [ %.1230.ph, %.sink.split ]
  %.1228 = phi i32 [ %.0227321, %26 ], [ %.1228.ph, %.sink.split ]
  %.1226 = phi i32 [ %.0225322, %26 ], [ %.1226.ph, %.sink.split ]
  %47 = getelementptr inbounds i8, ptr %29, i64 1
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = icmp eq i8 %48, 45
  %spec.select = select i1 %49, ptr %47, ptr %29
  %50 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.5) #12
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %61, label %52

52:                                               ; preds = %46
  %53 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.6) #12
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %61, label %55

55:                                               ; preds = %52
  %56 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.7) #12
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %61, label %58

58:                                               ; preds = %55
  %59 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.8) #12
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %64

61:                                               ; preds = %58, %55, %52, %46
  %62 = add nsw i32 %.0215323, 1
  %63 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %62)
  br label %163

64:                                               ; preds = %58
  %65 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.9) #12
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %70

67:                                               ; preds = %64
  %68 = add nsw i32 %.0215323, 1
  %69 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %68)
  br label %163

70:                                               ; preds = %64
  %71 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.10) #12
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i32 0, ptr @stdin_is_interactive, align 4, !tbaa !9
  br label %163

74:                                               ; preds = %70
  %75 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.11) #12
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %74
  %78 = add nsw i32 %.0215323, 1
  %79 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %78)
  br label %163

80:                                               ; preds = %74
  %81 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.12) #12
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %99

83:                                               ; preds = %80
  %84 = add nsw i32 %.0215323, 1
  %85 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %84)
  %86 = call i64 @integerValue(ptr noundef %85)
  %87 = trunc i64 %86 to i32
  %spec.store.select = call i32 @llvm.smin.i32(i32 %87, i32 400000)
  %spec.store.select9 = call i32 @llvm.smax.i32(i32 %spec.store.select, i32 2500)
  %88 = add nsw i32 %.0215323, 2
  %89 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %88)
  %90 = call i64 @integerValue(ptr noundef %89)
  %91 = trunc i64 %90 to i32
  %spec.store.select2 = call i32 @llvm.smin.i32(i32 %91, i32 10)
  %spec.store.select12 = call i32 @llvm.smax.i32(i32 %spec.store.select2, i32 1)
  %92 = mul nuw nsw i32 %spec.store.select12, %spec.store.select9
  %93 = add nuw nsw i32 %92, 1
  %94 = zext nneg i32 %93 to i64
  %95 = call noalias ptr @malloc(i64 noundef %94) #16
  %96 = call i32 (i32, ...) @sqlite3_config(i32 noundef 6, ptr noundef %95, i32 noundef %spec.store.select9, i32 noundef %spec.store.select12) #11
  %97 = load i32, ptr %25, align 4, !tbaa !14
  %98 = or i32 %97, 1
  store i32 %98, ptr %25, align 4, !tbaa !14
  br label %163

99:                                               ; preds = %80
  %100 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.13) #12
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %122

102:                                              ; preds = %99
  %103 = add nsw i32 %.0215323, 1
  %104 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %103)
  %105 = call i64 @integerValue(ptr noundef %104)
  %106 = trunc i64 %105 to i32
  %spec.store.select3 = call i32 @llvm.smin.i32(i32 %106, i32 70000)
  %spec.store.select10 = call i32 @llvm.smax.i32(i32 %spec.store.select3, i32 0)
  %107 = add nsw i32 %.0215323, 2
  %108 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %107)
  %109 = call i64 @integerValue(ptr noundef %108)
  %110 = trunc i64 %109 to i32
  %111 = icmp sgt i32 %110, 0
  %112 = icmp sgt i32 %106, 0
  %or.cond5 = select i1 %111, i1 %112, i1 false
  br i1 %or.cond5, label %113, label %117

113:                                              ; preds = %102
  %114 = mul nuw nsw i32 %spec.store.select10, %110
  %115 = zext nneg i32 %114 to i64
  %116 = call noalias ptr @malloc(i64 noundef %115) #16
  br label %117

117:                                              ; preds = %102, %113
  %118 = phi ptr [ %116, %113 ], [ null, %102 ]
  %119 = call i32 (i32, ...) @sqlite3_config(i32 noundef 7, ptr noundef %118, i32 noundef %spec.store.select10, i32 noundef %110) #11
  %120 = load i32, ptr %25, align 4, !tbaa !14
  %121 = or i32 %120, 2
  store i32 %121, ptr %25, align 4, !tbaa !14
  br label %163

122:                                              ; preds = %99
  %123 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.14) #12
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %140

125:                                              ; preds = %122
  %126 = add nsw i32 %.0215323, 1
  %127 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %126)
  %128 = call i64 @integerValue(ptr noundef %127)
  %129 = trunc i64 %128 to i32
  %spec.store.select6 = call i32 @llvm.smax.i32(i32 %129, i32 0)
  %130 = add nsw i32 %.0215323, 2
  %131 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %130)
  %132 = call i64 @integerValue(ptr noundef %131)
  %133 = trunc i64 %132 to i32
  %spec.store.select11 = call i32 @llvm.smax.i32(i32 %133, i32 0)
  %134 = call i32 (i32, ...) @sqlite3_config(i32 noundef 13, i32 noundef %spec.store.select6, i32 noundef %spec.store.select11) #11
  %135 = mul nuw nsw i32 %spec.store.select11, %spec.store.select6
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %137, label %163

137:                                              ; preds = %125
  %138 = load i32, ptr %25, align 4, !tbaa !14
  %139 = and i32 %138, -5
  store i32 %139, ptr %25, align 4, !tbaa !14
  br label %163

140:                                              ; preds = %122
  %141 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.15) #12
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %148

143:                                              ; preds = %140
  %144 = add nsw i32 %.0215323, 1
  %145 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %144)
  %146 = call i64 @integerValue(ptr noundef %145)
  %147 = call i32 (i32, ...) @sqlite3_config(i32 noundef 22, i64 noundef %146, i64 noundef %146) #11
  br label %163

148:                                              ; preds = %140
  %149 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.16) #12
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %163

151:                                              ; preds = %148
  %152 = add nsw i32 %.0215323, 1
  %153 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %152)
  %154 = call ptr @sqlite3_vfs_find(ptr noundef %153) #11
  %.not270 = icmp eq ptr %154, null
  br i1 %.not270, label %157, label %155

155:                                              ; preds = %151
  %156 = call i32 @sqlite3_vfs_register(ptr noundef nonnull %154, i32 noundef 1) #11
  br label %163

157:                                              ; preds = %151
  %158 = load ptr, ptr @stderr, align 8, !tbaa !5
  %159 = sext i32 %152 to i64
  %160 = getelementptr inbounds ptr, ptr %1, i64 %159
  %161 = load ptr, ptr %160, align 8, !tbaa !5
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef nonnull @.str.17, ptr noundef %161) #13
  call void @exit(i32 noundef 1) #14
  unreachable

163:                                              ; preds = %125, %137, %67, %77, %117, %143, %155, %148, %83, %73, %61
  %.1216 = phi i32 [ %62, %61 ], [ %68, %67 ], [ %.0215323, %73 ], [ %78, %77 ], [ %88, %83 ], [ %107, %117 ], [ %144, %143 ], [ %152, %155 ], [ %.0215323, %148 ], [ %130, %137 ], [ %130, %125 ]
  %.1212 = phi ptr [ %.0211324, %61 ], [ %69, %67 ], [ %.0211324, %73 ], [ %.0211324, %77 ], [ %.0211324, %83 ], [ %.0211324, %117 ], [ %.0211324, %143 ], [ %.0211324, %155 ], [ %.0211324, %148 ], [ %.0211324, %137 ], [ %.0211324, %125 ]
  %164 = add nsw i32 %.1216, 1
  %165 = icmp slt i32 %164, %0
  br i1 %165, label %26, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %163, %21
  %.0229.lcssa = phi ptr [ null, %21 ], [ %.1230, %163 ]
  %.0227.lcssa = phi i32 [ 0, %21 ], [ %.1228, %163 ]
  %.0225.lcssa = phi i32 [ 1, %21 ], [ %.1226, %163 ]
  %.0211.lcssa = phi ptr [ null, %21 ], [ %.1212, %163 ]
  %166 = getelementptr inbounds i8, ptr %4, i64 5096
  %167 = load ptr, ptr %166, align 8, !tbaa !12
  %168 = icmp eq ptr %167, null
  br i1 %168, label %169, label %171

169:                                              ; preds = %._crit_edge
  store ptr @.str.18, ptr %166, align 8, !tbaa !12
  %170 = icmp ne i32 %0, 1
  br label %171

171:                                              ; preds = %169, %._crit_edge
  %172 = phi ptr [ @.str.18, %169 ], [ %167, %._crit_edge ]
  %.0224 = phi i1 [ %170, %169 ], [ true, %._crit_edge ]
  %173 = load ptr, ptr @stdout, align 8, !tbaa !5
  %174 = getelementptr inbounds i8, ptr %4, i64 48
  store ptr %173, ptr %174, align 8, !tbaa !17
  %175 = call i32 @access(ptr noundef nonnull %172, i32 noundef 0) #11
  %176 = icmp eq i32 %175, 0
  br i1 %176, label %177, label %178

177:                                              ; preds = %171
  call void @open_db(ptr noundef nonnull %4, i32 noundef 0)
  br label %178

178:                                              ; preds = %177, %171
  call void @process_sqliterc(ptr noundef nonnull %4, ptr noundef %.0211.lcssa)
  br i1 %23, label %.lr.ph331, label %._crit_edge332

.lr.ph331:                                        ; preds = %178
  %179 = add nsw i32 %0, -1
  %180 = getelementptr inbounds i8, ptr %4, i64 32
  %181 = getelementptr inbounds i8, ptr %4, i64 24
  %182 = getelementptr inbounds i8, ptr %4, i64 20
  %183 = getelementptr inbounds i8, ptr %4, i64 16
  %184 = getelementptr inbounds i8, ptr %4, i64 8
  %185 = getelementptr inbounds i8, ptr %4, i64 84
  %186 = getelementptr inbounds i8, ptr %4, i64 976
  %187 = getelementptr inbounds i8, ptr %4, i64 154
  %188 = getelementptr inbounds i8, ptr %4, i64 134
  %189 = getelementptr inbounds i8, ptr %4, i64 68
  %190 = load i16, ptr @.str.24, align 1
  %191 = getelementptr inbounds i8, ptr %4, i64 72
  br label %192

192:                                              ; preds = %.lr.ph331, %378
  %.2217329 = phi i32 [ 1, %.lr.ph331 ], [ %379, %378 ]
  %.0218328 = phi i32 [ 0, %.lr.ph331 ], [ %.2220.ph, %378 ]
  %193 = sext i32 %.2217329 to i64
  %194 = getelementptr inbounds ptr, ptr %1, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !5
  %196 = load i8, ptr %195, align 1, !tbaa !11
  %.not252 = icmp eq i8 %196, 45
  br i1 %.not252, label %197, label %378

197:                                              ; preds = %192
  %198 = getelementptr inbounds i8, ptr %195, i64 1
  %199 = load i8, ptr %198, align 1, !tbaa !11
  %200 = icmp eq i8 %199, 45
  %spec.select271 = select i1 %200, ptr %198, ptr %195
  %201 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.9) #12
  %202 = icmp eq i32 %201, 0
  br i1 %202, label %203, label %205

203:                                              ; preds = %197
  %204 = add nsw i32 %.2217329, 1
  br label %376

205:                                              ; preds = %197
  %206 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.19) #12
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %208, label %209

208:                                              ; preds = %205
  store i32 4, ptr %189, align 4, !tbaa !18
  br label %376

209:                                              ; preds = %205
  %210 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.20) #12
  %211 = icmp eq i32 %210, 0
  br i1 %211, label %212, label %213

212:                                              ; preds = %209
  store i32 2, ptr %189, align 4, !tbaa !18
  br label %376

213:                                              ; preds = %209
  %214 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.21) #12
  %215 = icmp eq i32 %214, 0
  br i1 %215, label %216, label %217

216:                                              ; preds = %213
  store i32 0, ptr %189, align 4, !tbaa !18
  br label %376

217:                                              ; preds = %213
  %218 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.22) #12
  %219 = icmp eq i32 %218, 0
  br i1 %219, label %220, label %221

220:                                              ; preds = %217
  store i32 1, ptr %189, align 4, !tbaa !18
  br label %376

221:                                              ; preds = %217
  %222 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.23) #12
  %223 = icmp eq i32 %222, 0
  br i1 %223, label %224, label %225

224:                                              ; preds = %221
  store i32 8, ptr %189, align 4, !tbaa !18
  store i16 %190, ptr %188, align 2
  br label %376

225:                                              ; preds = %221
  %226 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.25) #12
  %227 = icmp eq i32 %226, 0
  br i1 %227, label %228, label %231

228:                                              ; preds = %225
  store i32 10, ptr %189, align 4, !tbaa !18
  %229 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %188, ptr noundef nonnull @.str.26) #11
  %230 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %187, ptr noundef nonnull @.str.27) #11
  br label %376

231:                                              ; preds = %225
  %232 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.5) #12
  %233 = icmp eq i32 %232, 0
  br i1 %233, label %234, label %238

234:                                              ; preds = %231
  %235 = add nsw i32 %.2217329, 1
  %236 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %235)
  %237 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %188, ptr noundef nonnull @.str.28, ptr noundef %236) #11
  br label %376

238:                                              ; preds = %231
  %239 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.7) #12
  %240 = icmp eq i32 %239, 0
  br i1 %240, label %241, label %245

241:                                              ; preds = %238
  %242 = add nsw i32 %.2217329, 1
  %243 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %242)
  %244 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %187, ptr noundef nonnull @.str.28, ptr noundef %243) #11
  br label %376

245:                                              ; preds = %238
  %246 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.6) #12
  %247 = icmp eq i32 %246, 0
  br i1 %247, label %248, label %252

248:                                              ; preds = %245
  %249 = add nsw i32 %.2217329, 1
  %250 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %249)
  %251 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %186, ptr noundef nonnull @.str.28, ptr noundef %250) #11
  br label %376

252:                                              ; preds = %245
  %253 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.29) #12
  %254 = icmp eq i32 %253, 0
  br i1 %254, label %255, label %256

255:                                              ; preds = %252
  store i32 1, ptr %185, align 4, !tbaa !19
  br label %376

256:                                              ; preds = %252
  %257 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.30) #12
  %258 = icmp eq i32 %257, 0
  br i1 %258, label %259, label %260

259:                                              ; preds = %256
  store i32 0, ptr %185, align 4, !tbaa !19
  br label %376

260:                                              ; preds = %256
  %261 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.31) #12
  %262 = icmp eq i32 %261, 0
  br i1 %262, label %263, label %264

263:                                              ; preds = %260
  store i32 1, ptr %184, align 8, !tbaa !20
  br label %376

264:                                              ; preds = %260
  %265 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.32) #12
  %266 = icmp eq i32 %265, 0
  br i1 %266, label %267, label %268

267:                                              ; preds = %264
  store i32 1, ptr %183, align 8, !tbaa !21
  br label %376

268:                                              ; preds = %264
  %269 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.33) #12
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %272

271:                                              ; preds = %268
  store i32 2, ptr %183, align 8, !tbaa !21
  br label %376

272:                                              ; preds = %268
  %273 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.34) #12
  %274 = icmp eq i32 %273, 0
  br i1 %274, label %275, label %276

275:                                              ; preds = %272
  store i32 1, ptr %182, align 4, !tbaa !22
  br label %376

276:                                              ; preds = %272
  %277 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.35) #12
  %278 = icmp eq i32 %277, 0
  br i1 %278, label %279, label %280

279:                                              ; preds = %276
  store i32 1, ptr %181, align 8, !tbaa !23
  br label %376

280:                                              ; preds = %276
  %281 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.36) #12
  %282 = icmp eq i32 %281, 0
  br i1 %282, label %283, label %284

283:                                              ; preds = %280
  store i32 1, ptr %180, align 8, !tbaa !24
  br label %376

284:                                              ; preds = %280
  %285 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.37) #12
  %286 = icmp eq i32 %285, 0
  br i1 %286, label %287, label %288

287:                                              ; preds = %284
  store i32 1, ptr @bail_on_error, align 4, !tbaa !9
  br label %376

288:                                              ; preds = %284
  %289 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.38) #12
  %290 = icmp eq i32 %289, 0
  br i1 %290, label %291, label %295

291:                                              ; preds = %288
  %292 = call ptr @sqlite3_libversion() #11
  %293 = call ptr @sqlite3_sourceid() #11
  %294 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39, ptr noundef %292, ptr noundef %293)
  br label %.thread

295:                                              ; preds = %288
  %296 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.40) #12
  %297 = icmp eq i32 %296, 0
  br i1 %297, label %298, label %299

298:                                              ; preds = %295
  store i32 1, ptr @stdin_is_interactive, align 4, !tbaa !9
  br label %376

299:                                              ; preds = %295
  %300 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.10) #12
  %301 = icmp eq i32 %300, 0
  br i1 %301, label %302, label %303

302:                                              ; preds = %299
  store i32 0, ptr @stdin_is_interactive, align 4, !tbaa !9
  br label %376

303:                                              ; preds = %299
  %304 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.11) #12
  %305 = icmp eq i32 %304, 0
  br i1 %305, label %306, label %308

306:                                              ; preds = %303
  %307 = add nsw i32 %.2217329, 1
  br label %376

308:                                              ; preds = %303
  %309 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.12) #12
  %310 = icmp eq i32 %309, 0
  br i1 %310, label %311, label %313

311:                                              ; preds = %308
  %312 = add nsw i32 %.2217329, 2
  br label %376

313:                                              ; preds = %308
  %314 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.13) #12
  %315 = icmp eq i32 %314, 0
  br i1 %315, label %316, label %318

316:                                              ; preds = %313
  %317 = add nsw i32 %.2217329, 2
  br label %376

318:                                              ; preds = %313
  %319 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.14) #12
  %320 = icmp eq i32 %319, 0
  br i1 %320, label %321, label %323

321:                                              ; preds = %318
  %322 = add nsw i32 %.2217329, 2
  br label %376

323:                                              ; preds = %318
  %324 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.15) #12
  %325 = icmp eq i32 %324, 0
  br i1 %325, label %326, label %328

326:                                              ; preds = %323
  %327 = add nsw i32 %.2217329, 1
  br label %376

328:                                              ; preds = %323
  %329 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.16) #12
  %330 = icmp eq i32 %329, 0
  br i1 %330, label %331, label %333

331:                                              ; preds = %328
  %332 = add nsw i32 %.2217329, 1
  br label %376

333:                                              ; preds = %328
  %334 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.41) #12
  %335 = icmp eq i32 %334, 0
  br i1 %335, label %336, label %337

336:                                              ; preds = %333
  call void @usage(i32 noundef 1)
  br label %376

337:                                              ; preds = %333
  %338 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select271, ptr noundef nonnull dereferenceable(1) @.str.8) #12
  %339 = icmp eq i32 %338, 0
  br i1 %339, label %340, label %370

340:                                              ; preds = %337
  %341 = icmp eq i32 %.2217329, %179
  br i1 %341, label %._crit_edge332, label %342

342:                                              ; preds = %340
  %343 = add nsw i32 %.2217329, 1
  %344 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %343)
  %345 = load i8, ptr %344, align 1, !tbaa !11
  %346 = icmp eq i8 %345, 46
  br i1 %346, label %347, label %355

347:                                              ; preds = %342
  %348 = call i32 @do_meta_command(ptr noundef nonnull %344, ptr noundef nonnull %4)
  %349 = icmp ne i32 %348, 0
  %350 = load i32, ptr @bail_on_error, align 4
  %351 = icmp ne i32 %350, 0
  %or.cond8 = select i1 %349, i1 %351, i1 false
  br i1 %or.cond8, label %352, label %376

352:                                              ; preds = %347
  %353 = icmp eq i32 %348, 2
  %354 = select i1 %353, i32 0, i32 %348
  br label %.thread

355:                                              ; preds = %342
  call void @open_db(ptr noundef nonnull %4, i32 noundef 0)
  %356 = load ptr, ptr %4, align 8, !tbaa !25
  %357 = call i32 @shell_exec(ptr noundef %356, ptr noundef nonnull %344, ptr noundef nonnull @shell_callback, ptr noundef nonnull %4, ptr noundef nonnull %3)
  %358 = load ptr, ptr %3, align 8, !tbaa !5
  %.not253 = icmp eq ptr %358, null
  br i1 %.not253, label %365, label %359

359:                                              ; preds = %355
  %360 = load ptr, ptr @stderr, align 8, !tbaa !5
  %361 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %360, ptr noundef nonnull @.str.42, ptr noundef nonnull %358) #13
  %362 = load i32, ptr @bail_on_error, align 4, !tbaa !9
  %.not256 = icmp eq i32 %362, 0
  br i1 %.not256, label %376, label %363

363:                                              ; preds = %359
  %364 = call i32 @llvm.umax.i32(i32 %357, i32 1)
  br label %.thread

365:                                              ; preds = %355
  %.not254 = icmp eq i32 %357, 0
  br i1 %.not254, label %376, label %366

366:                                              ; preds = %365
  %367 = load ptr, ptr @stderr, align 8, !tbaa !5
  %368 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %367, ptr noundef nonnull @.str.43, ptr noundef nonnull %344) #13
  %369 = load i32, ptr @bail_on_error, align 4, !tbaa !9
  %.not255 = icmp eq i32 %369, 0
  br i1 %.not255, label %376, label %.thread

370:                                              ; preds = %337
  %371 = load ptr, ptr @stderr, align 8, !tbaa !5
  %372 = load ptr, ptr @Argv0, align 8, !tbaa !5
  %373 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %371, ptr noundef nonnull @.str.44, ptr noundef %372, ptr noundef nonnull %spec.select271) #13
  %374 = load ptr, ptr @stderr, align 8, !tbaa !5
  %375 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %374, ptr noundef nonnull @.str.45) #13
  br label %.thread

376:                                              ; preds = %208, %216, %224, %234, %248, %259, %267, %275, %283, %302, %311, %321, %331, %359, %366, %365, %347, %336, %326, %316, %306, %298, %287, %279, %271, %263, %255, %241, %228, %220, %212, %203
  %.1219 = phi i32 [ %.0218328, %203 ], [ %.0218328, %208 ], [ %.0218328, %212 ], [ %.0218328, %216 ], [ %.0218328, %220 ], [ %.0218328, %224 ], [ %.0218328, %228 ], [ %.0218328, %234 ], [ %.0218328, %241 ], [ %.0218328, %248 ], [ %.0218328, %255 ], [ %.0218328, %259 ], [ %.0218328, %263 ], [ %.0218328, %267 ], [ %.0218328, %271 ], [ %.0218328, %275 ], [ %.0218328, %279 ], [ %.0218328, %283 ], [ %.0218328, %287 ], [ %.0218328, %298 ], [ %.0218328, %302 ], [ %.0218328, %306 ], [ %.0218328, %311 ], [ %.0218328, %316 ], [ %.0218328, %321 ], [ %.0218328, %326 ], [ %.0218328, %331 ], [ %.0218328, %336 ], [ %348, %347 ], [ %357, %359 ], [ %357, %366 ], [ 0, %365 ]
  %.3 = phi i32 [ %204, %203 ], [ %.2217329, %208 ], [ %.2217329, %212 ], [ %.2217329, %216 ], [ %.2217329, %220 ], [ %.2217329, %224 ], [ %.2217329, %228 ], [ %235, %234 ], [ %242, %241 ], [ %249, %248 ], [ %.2217329, %255 ], [ %.2217329, %259 ], [ %.2217329, %263 ], [ %.2217329, %267 ], [ %.2217329, %271 ], [ %.2217329, %275 ], [ %.2217329, %279 ], [ %.2217329, %283 ], [ %.2217329, %287 ], [ %.2217329, %298 ], [ %.2217329, %302 ], [ %307, %306 ], [ %312, %311 ], [ %317, %316 ], [ %322, %321 ], [ %327, %326 ], [ %332, %331 ], [ %.2217329, %336 ], [ %343, %347 ], [ %343, %359 ], [ %343, %366 ], [ %343, %365 ]
  %377 = load i32, ptr %189, align 4, !tbaa !18
  store i32 %377, ptr %191, align 8, !tbaa !26
  br label %378

378:                                              ; preds = %376, %192
  %.2220.ph = phi i32 [ %.0218328, %192 ], [ %.1219, %376 ]
  %.4.ph = phi i32 [ %.2217329, %192 ], [ %.3, %376 ]
  %379 = add nsw i32 %.4.ph, 1
  %380 = icmp slt i32 %379, %0
  br i1 %380, label %192, label %._crit_edge332, !llvm.loop !27

._crit_edge332:                                   ; preds = %378, %340, %178
  %.0218.lcssa = phi i32 [ 0, %178 ], [ %.0218328, %340 ], [ %.2220.ph, %378 ]
  %.not258 = icmp eq i32 %.0225.lcssa, 0
  br i1 %.not258, label %.preheader, label %406

.preheader:                                       ; preds = %._crit_edge332
  %381 = icmp sgt i32 %.0227.lcssa, 0
  br i1 %381, label %.lr.ph337.preheader, label %._crit_edge338

.lr.ph337.preheader:                              ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %.0227.lcssa to i64
  br label %.lr.ph337

.lr.ph337:                                        ; preds = %.lr.ph337.preheader, %405
  %indvars.iv = phi i64 [ 0, %.lr.ph337.preheader ], [ %indvars.iv.next, %405 ]
  %382 = getelementptr inbounds ptr, ptr %.0229.lcssa, i64 %indvars.iv
  %383 = load ptr, ptr %382, align 8, !tbaa !5
  %384 = load i8, ptr %383, align 1, !tbaa !11
  %385 = icmp eq i8 %384, 46
  br i1 %385, label %386, label %391

386:                                              ; preds = %.lr.ph337
  %387 = call i32 @do_meta_command(ptr noundef nonnull %383, ptr noundef nonnull %4)
  %.not262 = icmp eq i32 %387, 0
  br i1 %.not262, label %405, label %388

388:                                              ; preds = %386
  %389 = icmp eq i32 %387, 2
  %390 = select i1 %389, i32 0, i32 %387
  br label %.thread

391:                                              ; preds = %.lr.ph337
  call void @open_db(ptr noundef nonnull %4, i32 noundef 0)
  %392 = load ptr, ptr %4, align 8, !tbaa !25
  %393 = load ptr, ptr %382, align 8, !tbaa !5
  %394 = call i32 @shell_exec(ptr noundef %392, ptr noundef %393, ptr noundef nonnull @shell_callback, ptr noundef nonnull %4, ptr noundef nonnull %3)
  %395 = load ptr, ptr %3, align 8, !tbaa !5
  %.not259 = icmp eq ptr %395, null
  br i1 %.not259, label %400, label %396

396:                                              ; preds = %391
  %397 = load ptr, ptr @stderr, align 8, !tbaa !5
  %398 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %397, ptr noundef nonnull @.str.42, ptr noundef nonnull %395) #13
  %399 = call i32 @llvm.umax.i32(i32 %394, i32 1)
  br label %.thread

400:                                              ; preds = %391
  %.not260 = icmp eq i32 %394, 0
  br i1 %.not260, label %405, label %401

401:                                              ; preds = %400
  %402 = load ptr, ptr @stderr, align 8, !tbaa !5
  %403 = load ptr, ptr %382, align 8, !tbaa !5
  %404 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %402, ptr noundef nonnull @.str.46, ptr noundef %403) #13
  br label %.thread

405:                                              ; preds = %386, %400
  %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_edge338, label %.lr.ph337, !llvm.loop !28

._crit_edge338:                                   ; preds = %405, %.preheader
  %.4222.lcssa = phi i32 [ %.0218.lcssa, %.preheader ], [ 0, %405 ]
  call void @free(ptr noundef %.0229.lcssa) #11
  br label %429

406:                                              ; preds = %._crit_edge332
  %407 = load i32, ptr @stdin_is_interactive, align 4, !tbaa !9
  %.not263 = icmp eq i32 %407, 0
  br i1 %.not263, label %426, label %408

408:                                              ; preds = %406
  %409 = call ptr @sqlite3_libversion() #11
  %410 = call ptr @sqlite3_sourceid() #11
  %411 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47, ptr noundef %409, ptr noundef %410)
  br i1 %.0224, label %415, label %412

412:                                              ; preds = %408
  %413 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48)
  call void @printBold(ptr noundef nonnull @.str.49)
  %414 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50)
  br label %415

415:                                              ; preds = %412, %408
  %416 = call ptr @find_home_dir(i32 noundef 0)
  %.not265 = icmp eq ptr %416, null
  br i1 %.not265, label %.thread286, label %417

417:                                              ; preds = %415
  %418 = call i32 @strlen30(ptr noundef nonnull %416)
  %419 = add nsw i32 %418, 20
  %420 = sext i32 %419 to i64
  %421 = call noalias ptr @malloc(i64 noundef %420) #16
  %.not266 = icmp eq ptr %421, null
  br i1 %.not266, label %.thread286, label %423

.thread286:                                       ; preds = %417, %415
  %422 = call i32 @process_input(ptr noundef nonnull %4, ptr noundef null)
  br label %429

423:                                              ; preds = %417
  %424 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef %419, ptr noundef nonnull %421, ptr noundef nonnull @.str.51, ptr noundef nonnull %416) #11
  %425 = call i32 @process_input(ptr noundef nonnull %4, ptr noundef null)
  call void @free(ptr noundef nonnull %421) #11
  br label %429

426:                                              ; preds = %406
  %427 = load ptr, ptr @stdin, align 8, !tbaa !5
  %428 = call i32 @process_input(ptr noundef nonnull %4, ptr noundef %427)
  br label %429

429:                                              ; preds = %.thread286, %423, %426, %._crit_edge338
  %.6 = phi i32 [ %428, %426 ], [ %.4222.lcssa, %._crit_edge338 ], [ %425, %423 ], [ %422, %.thread286 ]
  call void @set_table_name(ptr noundef nonnull %4, ptr noundef null)
  %430 = load ptr, ptr %4, align 8, !tbaa !25
  %.not268 = icmp eq ptr %430, null
  br i1 %.not268, label %433, label %431

431:                                              ; preds = %429
  %432 = call i32 @sqlite3_close(ptr noundef nonnull %430) #11
  br label %433

433:                                              ; preds = %431, %429
  %434 = getelementptr inbounds i8, ptr %4, i64 5104
  %435 = load ptr, ptr %434, align 8, !tbaa !29
  call void @sqlite3_free(ptr noundef %435) #11
  %436 = call ptr @find_home_dir(i32 noundef 1)
  br label %.thread

.thread:                                          ; preds = %366, %370, %363, %352, %291, %433, %401, %396, %388
  %.2 = phi i32 [ %.6, %433 ], [ %390, %388 ], [ %399, %396 ], [ %394, %401 ], [ 1, %370 ], [ %364, %363 ], [ %354, %352 ], [ 0, %291 ], [ %357, %366 ]
  call void @llvm.lifetime.end.p0(i64 5152, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #11
  ret i32 %.2
}

; Function Attrs: nofree nounwind
declare noundef i32 @setvbuf(ptr nocapture noundef, ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @isatty(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

declare ptr @sqlite3_sourceid() local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #6

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @interrupt_handler(i32 noundef) #1

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare hidden ptr @cmdline_option_value(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @integerValue(ptr noundef) local_unnamed_addr #1

declare i32 @sqlite3_config(i32 noundef, ...) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #8

declare ptr @sqlite3_vfs_find(ptr noundef) local_unnamed_addr #5

declare i32 @sqlite3_vfs_register(ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @access(ptr nocapture noundef readonly, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @open_db(ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare ptr @sqlite3_snprintf(i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare ptr @sqlite3_libversion() local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden void @usage(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @do_meta_command(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @shell_exec(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @shell_callback(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #9

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

; Function Attrs: nounwind uwtable
declare hidden ptr @find_home_dir(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @strlen30(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @process_input(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @sqlite3_close(ptr noundef) local_unnamed_addr #5

declare void @sqlite3_free(ptr noundef) local_unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #10

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #10

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #10

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nofree nounwind "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 "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 #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #5 = { "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 #6 = { noreturn nounwind "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 #7 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #9 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { cold nounwind }
attributes #14 = { noreturn nounwind }
attributes #15 = { nounwind allocsize(1) }
attributes #16 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 5096}
!13 = !{!"ShellState", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !6, i64 96, !7, i64 104, !7, i64 134, !7, i64 154, !7, i64 176, !7, i64 576, !7, i64 976, !7, i64 996, !6, i64 5096, !6, i64 5104, !6, i64 5112, !6, i64 5120, !6, i64 5128, !6, i64 5136, !10, i64 5144, !10, i64 5148}
!14 = !{!13, !10, i64 92}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!13, !6, i64 48}
!18 = !{!13, !10, i64 68}
!19 = !{!13, !10, i64 84}
!20 = !{!13, !10, i64 8}
!21 = !{!13, !10, i64 16}
!22 = !{!13, !10, i64 20}
!23 = !{!13, !10, i64 24}
!24 = !{!13, !10, i64 32}
!25 = !{!13, !6, i64 0}
!26 = !{!13, !10, i64 72}
!27 = distinct !{!27, !16}
!28 = distinct !{!28, !16}
!29 = !{!13, !6, i64 5104}


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