; LLVM IR from gigimushroom/DatabaseBackendEngine :: src/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, 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 [85 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 [87 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 [7 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [6 x i8], align 1
@bail_on_error = external hidden global i32, align 4
@.str.39 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.56 = 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
  %29 = 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 5136, 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
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = call i32 @setvbuf(ptr noundef %30, ptr noundef null, i32 noundef 2, i64 noundef 0) #9
  %32 = call i32 @isatty(i32 noundef 0) #9
  store i32 %32, ptr @stdin_is_interactive, align 4, !tbaa !5
  %33 = call i32 @isatty(i32 noundef 1) #9
  store i32 %33, ptr @stdout_is_console, align 4, !tbaa !5
  %34 = call ptr @sqlite3_sourceid()
  %35 = call i32 @strcmp(ptr noundef %34, ptr noundef @.str) #10
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %41

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

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

44:                                               ; preds = %41
  %45 = load ptr, ptr %5, align 8, !tbaa !9
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %53

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

52:                                               ; preds = %47
  br label %54

53:                                               ; preds = %47, %44, %41
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 7316, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

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

59:                                               ; preds = %339, %54
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %63, label %342

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

74:                                               ; preds = %63
  %75 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 25
  %76 = load ptr, ptr %75, align 8, !tbaa !12
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %81

78:                                               ; preds = %74
  %79 = load ptr, ptr %15, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 25
  store ptr %79, ptr %80, align 8, !tbaa !12
  br label %101

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

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

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

101:                                              ; preds = %94, %78
  br label %102

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

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

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

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

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

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

127:                                              ; preds = %123, %119, %115, %111
  %128 = load i32, ptr %4, align 4, !tbaa !5
  %129 = load ptr, ptr %5, align 8, !tbaa !9
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %9, align 4, !tbaa !5
  %132 = call ptr @cmdline_option_value(i32 noundef %128, ptr noundef %129, i32 noundef %131)
  br label %338

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

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

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

147:                                              ; preds = %143
  store i32 0, ptr @stdin_is_interactive, align 4, !tbaa !5
  br label %336

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

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

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

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

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

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

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

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

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

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

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

192:                                              ; preds = %191, %188
  %193 = load i32, ptr %16, align 4, !tbaa !5
  %194 = load i32, ptr %17, align 4, !tbaa !5
  %195 = mul nsw i32 %193, %194
  %196 = add nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = call noalias ptr @malloc(i64 noundef %197) #13
  %199 = load i32, ptr %17, align 4, !tbaa !5
  %200 = load i32, ptr %16, align 4, !tbaa !5
  %201 = call i32 (i32, ...) @sqlite3_config(i32 noundef 6, ptr noundef %198, i32 noundef %199, i32 noundef %200)
  %202 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 16
  %203 = load i32, ptr %202, align 4, !tbaa !14
  %204 = or i32 %203, 1
  store i32 %204, ptr %202, 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 %334

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

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

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

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

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

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

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

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

243:                                              ; preds = %234, %224
  br label %244

244:                                              ; preds = %243, %237
  %245 = phi ptr [ %242, %237 ], [ null, %243 ]
  %246 = load i32, ptr %19, align 4, !tbaa !5
  %247 = load i32, ptr %18, align 4, !tbaa !5
  %248 = call i32 (i32, ...) @sqlite3_config(i32 noundef 7, ptr noundef %245, i32 noundef %246, i32 noundef %247)
  %249 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 16
  %250 = load i32, ptr %249, align 4, !tbaa !14
  %251 = or i32 %250, 2
  store i32 %251, ptr %249, 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 %333

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

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

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

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

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

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

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

290:                                              ; preds = %286, %278
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %332

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

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

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

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

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

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

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

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

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

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

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

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

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

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

337:                                              ; preds = %336, %137
  br label %338

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

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

342:                                              ; preds = %59
  %343 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 25
  %344 = load ptr, ptr %343, align 8, !tbaa !12
  %345 = icmp eq ptr %344, null
  br i1 %345, label %346, label %351

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

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

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

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

361:                                              ; preds = %723, %359
  %362 = load i32, ptr %9, align 4, !tbaa !5
  %363 = load i32, ptr %4, align 4, !tbaa !5
  %364 = icmp slt i32 %362, %363
  br i1 %364, label %365, label %726

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

376:                                              ; preds = %365
  store i32 7, ptr %25, align 4
  br label %720

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

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

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

390:                                              ; preds = %386
  %391 = load i32, ptr %9, align 4, !tbaa !5
  %392 = add nsw i32 %391, 1
  store i32 %392, ptr %9, align 4, !tbaa !5
  br label %716

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

397:                                              ; preds = %393
  %398 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store i32 4, ptr %398, align 4, !tbaa !20
  br label %715

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

403:                                              ; preds = %399
  %404 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store i32 2, ptr %404, align 4, !tbaa !20
  br label %714

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

409:                                              ; preds = %405
  %410 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store i32 6, ptr %410, align 4, !tbaa !20
  br label %713

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

415:                                              ; preds = %411
  %416 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store i32 0, ptr %416, align 4, !tbaa !20
  br label %712

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

421:                                              ; preds = %417
  %422 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store i32 1, ptr %422, align 4, !tbaa !20
  br label %711

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

427:                                              ; preds = %423
  %428 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store i32 8, ptr %428, align 4, !tbaa !20
  %429 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 19
  %430 = getelementptr inbounds [20 x i8], ptr %429, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %430, ptr align 1 @.str.25, i64 2, i1 false)
  br label %710

431:                                              ; preds = %423
  %432 = load ptr, ptr %24, align 8, !tbaa !9
  %433 = call i32 @strcmp(ptr noundef %432, ptr noundef @.str.26) #10
  %434 = icmp eq i32 %433, 0
  br i1 %434, label %435, label %443

435:                                              ; preds = %431
  %436 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  store i32 10, ptr %436, align 4, !tbaa !20
  %437 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 19
  %438 = getelementptr inbounds [20 x i8], ptr %437, i64 0, i64 0
  %439 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %438, ptr noundef @.str.27)
  %440 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 20
  %441 = getelementptr inbounds [20 x i8], ptr %440, i64 0, i64 0
  %442 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %441, ptr noundef @.str.28)
  br label %709

443:                                              ; preds = %431
  %444 = load ptr, ptr %24, align 8, !tbaa !9
  %445 = call i32 @strcmp(ptr noundef %444, ptr noundef @.str.5) #10
  %446 = icmp eq i32 %445, 0
  br i1 %446, label %447, label %456

447:                                              ; preds = %443
  %448 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 19
  %449 = getelementptr inbounds [20 x i8], ptr %448, i64 0, i64 0
  %450 = load i32, ptr %4, align 4, !tbaa !5
  %451 = load ptr, ptr %5, align 8, !tbaa !9
  %452 = load i32, ptr %9, align 4, !tbaa !5
  %453 = add nsw i32 %452, 1
  store i32 %453, ptr %9, align 4, !tbaa !5
  %454 = call ptr @cmdline_option_value(i32 noundef %450, ptr noundef %451, i32 noundef %453)
  %455 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %449, ptr noundef @.str.29, ptr noundef %454)
  br label %708

456:                                              ; preds = %443
  %457 = load ptr, ptr %24, align 8, !tbaa !9
  %458 = call i32 @strcmp(ptr noundef %457, ptr noundef @.str.7) #10
  %459 = icmp eq i32 %458, 0
  br i1 %459, label %460, label %469

460:                                              ; preds = %456
  %461 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 20
  %462 = getelementptr inbounds [20 x i8], ptr %461, i64 0, i64 0
  %463 = load i32, ptr %4, align 4, !tbaa !5
  %464 = load ptr, ptr %5, align 8, !tbaa !9
  %465 = load i32, ptr %9, align 4, !tbaa !5
  %466 = add nsw i32 %465, 1
  store i32 %466, ptr %9, align 4, !tbaa !5
  %467 = call ptr @cmdline_option_value(i32 noundef %463, ptr noundef %464, i32 noundef %466)
  %468 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %462, ptr noundef @.str.29, ptr noundef %467)
  br label %707

469:                                              ; preds = %456
  %470 = load ptr, ptr %24, align 8, !tbaa !9
  %471 = call i32 @strcmp(ptr noundef %470, ptr noundef @.str.6) #10
  %472 = icmp eq i32 %471, 0
  br i1 %472, label %473, label %482

473:                                              ; preds = %469
  %474 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 23
  %475 = getelementptr inbounds [20 x i8], ptr %474, i64 0, i64 0
  %476 = load i32, ptr %4, align 4, !tbaa !5
  %477 = load ptr, ptr %5, align 8, !tbaa !9
  %478 = load i32, ptr %9, align 4, !tbaa !5
  %479 = add nsw i32 %478, 1
  store i32 %479, ptr %9, align 4, !tbaa !5
  %480 = call ptr @cmdline_option_value(i32 noundef %476, ptr noundef %477, i32 noundef %479)
  %481 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef %475, ptr noundef @.str.29, ptr noundef %480)
  br label %706

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

486:                                              ; preds = %482
  %487 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 14
  store i32 1, ptr %487, align 4, !tbaa !21
  br label %705

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

492:                                              ; preds = %488
  %493 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 14
  store i32 0, ptr %493, align 4, !tbaa !21
  br label %704

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

498:                                              ; preds = %494
  %499 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 16
  %500 = load i32, ptr %499, align 4, !tbaa !14
  %501 = or i32 %500, 64
  store i32 %501, ptr %499, align 4, !tbaa !14
  br label %703

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

506:                                              ; preds = %502
  %507 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 2
  store i32 1, ptr %507, align 4, !tbaa !22
  br label %702

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

512:                                              ; preds = %508
  %513 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 2
  store i32 2, ptr %513, align 4, !tbaa !22
  br label %701

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

518:                                              ; preds = %514
  %519 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 3
  store i32 1, ptr %519, align 8, !tbaa !23
  br label %700

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

524:                                              ; preds = %520
  %525 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 4
  store i32 1, ptr %525, align 4, !tbaa !24
  br label %699

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

530:                                              ; preds = %526
  %531 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 16
  %532 = load i32, ptr %531, align 4, !tbaa !14
  %533 = or i32 %532, 8
  store i32 %533, ptr %531, align 4, !tbaa !14
  br label %698

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

538:                                              ; preds = %534
  store i32 1, ptr @bail_on_error, align 4, !tbaa !5
  br label %697

539:                                              ; preds = %534
  %540 = load ptr, ptr %24, align 8, !tbaa !9
  %541 = call i32 @strcmp(ptr noundef %540, ptr noundef @.str.39) #10
  %542 = icmp eq i32 %541, 0
  br i1 %542, label %543, label %547

543:                                              ; preds = %539
  %544 = call ptr @sqlite3_libversion()
  %545 = call ptr @sqlite3_sourceid()
  %546 = call i32 (ptr, ...) @printf(ptr noundef @.str.40, ptr noundef %544, ptr noundef %545)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %720

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

551:                                              ; preds = %547
  store i32 1, ptr @stdin_is_interactive, align 4, !tbaa !5
  br label %695

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

556:                                              ; preds = %552
  store i32 0, ptr @stdin_is_interactive, align 4, !tbaa !5
  br label %694

557:                                              ; preds = %552
  %558 = load ptr, ptr %24, align 8, !tbaa !9
  %559 = call i32 @strcmp(ptr noundef %558, ptr noundef @.str.11) #10
  %560 = icmp eq i32 %559, 0
  br i1 %560, label %561, label %564

561:                                              ; preds = %557
  %562 = load i32, ptr %9, align 4, !tbaa !5
  %563 = add nsw i32 %562, 1
  store i32 %563, ptr %9, align 4, !tbaa !5
  br label %693

564:                                              ; preds = %557
  %565 = load ptr, ptr %24, align 8, !tbaa !9
  %566 = call i32 @strcmp(ptr noundef %565, ptr noundef @.str.12) #10
  %567 = icmp eq i32 %566, 0
  br i1 %567, label %568, label %571

568:                                              ; preds = %564
  %569 = load i32, ptr %9, align 4, !tbaa !5
  %570 = add nsw i32 %569, 2
  store i32 %570, ptr %9, align 4, !tbaa !5
  br label %692

571:                                              ; preds = %564
  %572 = load ptr, ptr %24, align 8, !tbaa !9
  %573 = call i32 @strcmp(ptr noundef %572, ptr noundef @.str.13) #10
  %574 = icmp eq i32 %573, 0
  br i1 %574, label %575, label %578

575:                                              ; preds = %571
  %576 = load i32, ptr %9, align 4, !tbaa !5
  %577 = add nsw i32 %576, 2
  store i32 %577, ptr %9, align 4, !tbaa !5
  br label %691

578:                                              ; preds = %571
  %579 = load ptr, ptr %24, align 8, !tbaa !9
  %580 = call i32 @strcmp(ptr noundef %579, ptr noundef @.str.14) #10
  %581 = icmp eq i32 %580, 0
  br i1 %581, label %582, label %585

582:                                              ; preds = %578
  %583 = load i32, ptr %9, align 4, !tbaa !5
  %584 = add nsw i32 %583, 2
  store i32 %584, ptr %9, align 4, !tbaa !5
  br label %690

585:                                              ; preds = %578
  %586 = load ptr, ptr %24, align 8, !tbaa !9
  %587 = call i32 @strcmp(ptr noundef %586, ptr noundef @.str.15) #10
  %588 = icmp eq i32 %587, 0
  br i1 %588, label %589, label %592

589:                                              ; preds = %585
  %590 = load i32, ptr %9, align 4, !tbaa !5
  %591 = add nsw i32 %590, 1
  store i32 %591, ptr %9, align 4, !tbaa !5
  br label %689

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

596:                                              ; preds = %592
  %597 = load i32, ptr %9, align 4, !tbaa !5
  %598 = add nsw i32 %597, 1
  store i32 %598, ptr %9, align 4, !tbaa !5
  br label %688

599:                                              ; preds = %592
  %600 = load ptr, ptr %24, align 8, !tbaa !9
  %601 = call i32 @strcmp(ptr noundef %600, ptr noundef @.str.42) #10
  %602 = icmp eq i32 %601, 0
  br i1 %602, label %603, label %604

603:                                              ; preds = %599
  call void @usage(i32 noundef 1)
  br label %687

604:                                              ; preds = %599
  %605 = load ptr, ptr %24, align 8, !tbaa !9
  %606 = call i32 @strcmp(ptr noundef %605, ptr noundef @.str.8) #10
  %607 = icmp eq i32 %606, 0
  br i1 %607, label %608, label %679

608:                                              ; preds = %604
  %609 = load i32, ptr %9, align 4, !tbaa !5
  %610 = load i32, ptr %4, align 4, !tbaa !5
  %611 = sub nsw i32 %610, 1
  %612 = icmp eq i32 %609, %611
  br i1 %612, label %613, label %614

613:                                              ; preds = %608
  store i32 5, ptr %25, align 4
  br label %720

614:                                              ; preds = %608
  %615 = load i32, ptr %4, align 4, !tbaa !5
  %616 = load ptr, ptr %5, align 8, !tbaa !9
  %617 = load i32, ptr %9, align 4, !tbaa !5
  %618 = add nsw i32 %617, 1
  store i32 %618, ptr %9, align 4, !tbaa !5
  %619 = call ptr @cmdline_option_value(i32 noundef %615, ptr noundef %616, i32 noundef %618)
  store ptr %619, ptr %24, align 8, !tbaa !9
  %620 = load ptr, ptr %24, align 8, !tbaa !9
  %621 = getelementptr inbounds i8, ptr %620, i64 0
  %622 = load i8, ptr %621, align 1, !tbaa !11
  %623 = sext i8 %622 to i32
  %624 = icmp eq i32 %623, 46
  br i1 %624, label %625, label %642

625:                                              ; preds = %614
  %626 = load ptr, ptr %24, align 8, !tbaa !9
  %627 = call i32 @do_meta_command(ptr noundef %626, ptr noundef %7)
  store i32 %627, ptr %10, align 4, !tbaa !5
  %628 = load i32, ptr %10, align 4, !tbaa !5
  %629 = icmp ne i32 %628, 0
  br i1 %629, label %630, label %641

630:                                              ; preds = %625
  %631 = load i32, ptr @bail_on_error, align 4, !tbaa !5
  %632 = icmp ne i32 %631, 0
  br i1 %632, label %633, label %641

633:                                              ; preds = %630
  %634 = load i32, ptr %10, align 4, !tbaa !5
  %635 = icmp eq i32 %634, 2
  br i1 %635, label %636, label %637

636:                                              ; preds = %633
  br label %639

637:                                              ; preds = %633
  %638 = load i32, ptr %10, align 4, !tbaa !5
  br label %639

639:                                              ; preds = %637, %636
  %640 = phi i32 [ 0, %636 ], [ %638, %637 ]
  store i32 %640, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %720

641:                                              ; preds = %630, %625
  br label %678

642:                                              ; preds = %614
  call void @open_db(ptr noundef %7, i32 noundef 0)
  %643 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %644 = load ptr, ptr %643, align 8, !tbaa !25
  %645 = load ptr, ptr %24, align 8, !tbaa !9
  %646 = call i32 @shell_exec(ptr noundef %644, ptr noundef %645, ptr noundef @shell_callback, ptr noundef %7, ptr noundef %6)
  store i32 %646, ptr %10, align 4, !tbaa !5
  %647 = load ptr, ptr %6, align 8, !tbaa !9
  %648 = icmp ne ptr %647, null
  br i1 %648, label %649, label %664

649:                                              ; preds = %642
  %650 = load ptr, ptr @stderr, align 8, !tbaa !9
  %651 = load ptr, ptr %6, align 8, !tbaa !9
  %652 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %650, ptr noundef @.str.43, ptr noundef %651) #9
  %653 = load i32, ptr @bail_on_error, align 4, !tbaa !5
  %654 = icmp ne i32 %653, 0
  br i1 %654, label %655, label %663

655:                                              ; preds = %649
  %656 = load i32, ptr %10, align 4, !tbaa !5
  %657 = icmp ne i32 %656, 0
  br i1 %657, label %658, label %660

658:                                              ; preds = %655
  %659 = load i32, ptr %10, align 4, !tbaa !5
  br label %661

660:                                              ; preds = %655
  br label %661

661:                                              ; preds = %660, %658
  %662 = phi i32 [ %659, %658 ], [ 1, %660 ]
  store i32 %662, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %720

663:                                              ; preds = %649
  br label %677

664:                                              ; preds = %642
  %665 = load i32, ptr %10, align 4, !tbaa !5
  %666 = icmp ne i32 %665, 0
  br i1 %666, label %667, label %676

667:                                              ; preds = %664
  %668 = load ptr, ptr @stderr, align 8, !tbaa !9
  %669 = load ptr, ptr %24, align 8, !tbaa !9
  %670 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %668, ptr noundef @.str.44, ptr noundef %669) #9
  %671 = load i32, ptr @bail_on_error, align 4, !tbaa !5
  %672 = icmp ne i32 %671, 0
  br i1 %672, label %673, label %675

673:                                              ; preds = %667
  %674 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %674, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %720

675:                                              ; preds = %667
  br label %676

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

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

678:                                              ; preds = %677, %641
  br label %686

679:                                              ; preds = %604
  %680 = load ptr, ptr @stderr, align 8, !tbaa !9
  %681 = load ptr, ptr @Argv0, align 8, !tbaa !9
  %682 = load ptr, ptr %24, align 8, !tbaa !9
  %683 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %680, ptr noundef @.str.45, ptr noundef %681, ptr noundef %682) #9
  %684 = load ptr, ptr @stderr, align 8, !tbaa !9
  %685 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %684, ptr noundef @.str.46) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %720

686:                                              ; preds = %678
  br label %687

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

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

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

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

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

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

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

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

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

696:                                              ; preds = %695
  br label %697

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

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

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

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

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

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

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

704:                                              ; preds = %703, %492
  br label %705

705:                                              ; preds = %704, %486
  br label %706

706:                                              ; preds = %705, %473
  br label %707

707:                                              ; preds = %706, %460
  br label %708

708:                                              ; preds = %707, %447
  br label %709

709:                                              ; preds = %708, %435
  br label %710

710:                                              ; preds = %709, %427
  br label %711

711:                                              ; preds = %710, %421
  br label %712

712:                                              ; preds = %711, %415
  br label %713

713:                                              ; preds = %712, %409
  br label %714

714:                                              ; preds = %713, %403
  br label %715

715:                                              ; preds = %714, %397
  br label %716

716:                                              ; preds = %715, %390
  %717 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 10
  %718 = load i32, ptr %717, align 4, !tbaa !20
  %719 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 11
  store i32 %718, ptr %719, align 8, !tbaa !26
  store i32 0, ptr %25, align 4
  br label %720

720:                                              ; preds = %716, %679, %673, %661, %639, %613, %543, %376
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  %721 = load i32, ptr %25, align 4
  switch i32 %721, label %883 [
    i32 0, label %722
    i32 7, label %723
    i32 5, label %726
  ]

722:                                              ; preds = %720
  br label %723

723:                                              ; preds = %722, %720
  %724 = load i32, ptr %9, align 4, !tbaa !5
  %725 = add nsw i32 %724, 1
  store i32 %725, ptr %9, align 4, !tbaa !5
  br label %361, !llvm.loop !27

726:                                              ; preds = %720, %361
  %727 = load i32, ptr %12, align 4, !tbaa !5
  %728 = icmp ne i32 %727, 0
  br i1 %728, label %804, label %729

729:                                              ; preds = %726
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %730

730:                                              ; preds = %799, %729
  %731 = load i32, ptr %9, align 4, !tbaa !5
  %732 = load i32, ptr %13, align 4, !tbaa !5
  %733 = icmp slt i32 %731, %732
  br i1 %733, label %734, label %802

734:                                              ; preds = %730
  %735 = load ptr, ptr %14, align 8, !tbaa !9
  %736 = load i32, ptr %9, align 4, !tbaa !5
  %737 = sext i32 %736 to i64
  %738 = getelementptr inbounds ptr, ptr %735, i64 %737
  %739 = load ptr, ptr %738, align 8, !tbaa !9
  %740 = getelementptr inbounds i8, ptr %739, i64 0
  %741 = load i8, ptr %740, align 1, !tbaa !11
  %742 = sext i8 %741 to i32
  %743 = icmp eq i32 %742, 46
  br i1 %743, label %744, label %762

744:                                              ; preds = %734
  %745 = load ptr, ptr %14, align 8, !tbaa !9
  %746 = load i32, ptr %9, align 4, !tbaa !5
  %747 = sext i32 %746 to i64
  %748 = getelementptr inbounds ptr, ptr %745, i64 %747
  %749 = load ptr, ptr %748, align 8, !tbaa !9
  %750 = call i32 @do_meta_command(ptr noundef %749, ptr noundef %7)
  store i32 %750, ptr %10, align 4, !tbaa !5
  %751 = load i32, ptr %10, align 4, !tbaa !5
  %752 = icmp ne i32 %751, 0
  br i1 %752, label %753, label %761

753:                                              ; preds = %744
  %754 = load i32, ptr %10, align 4, !tbaa !5
  %755 = icmp eq i32 %754, 2
  br i1 %755, label %756, label %757

756:                                              ; preds = %753
  br label %759

757:                                              ; preds = %753
  %758 = load i32, ptr %10, align 4, !tbaa !5
  br label %759

759:                                              ; preds = %757, %756
  %760 = phi i32 [ 0, %756 ], [ %758, %757 ]
  store i32 %760, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %883

761:                                              ; preds = %744
  br label %798

762:                                              ; preds = %734
  call void @open_db(ptr noundef %7, i32 noundef 0)
  %763 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %764 = load ptr, ptr %763, align 8, !tbaa !25
  %765 = load ptr, ptr %14, align 8, !tbaa !9
  %766 = load i32, ptr %9, align 4, !tbaa !5
  %767 = sext i32 %766 to i64
  %768 = getelementptr inbounds ptr, ptr %765, i64 %767
  %769 = load ptr, ptr %768, align 8, !tbaa !9
  %770 = call i32 @shell_exec(ptr noundef %764, ptr noundef %769, ptr noundef @shell_callback, ptr noundef %7, ptr noundef %6)
  store i32 %770, ptr %10, align 4, !tbaa !5
  %771 = load ptr, ptr %6, align 8, !tbaa !9
  %772 = icmp ne ptr %771, null
  br i1 %772, label %773, label %784

773:                                              ; preds = %762
  %774 = load ptr, ptr @stderr, align 8, !tbaa !9
  %775 = load ptr, ptr %6, align 8, !tbaa !9
  %776 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %774, ptr noundef @.str.43, ptr noundef %775) #9
  %777 = load i32, ptr %10, align 4, !tbaa !5
  %778 = icmp ne i32 %777, 0
  br i1 %778, label %779, label %781

779:                                              ; preds = %773
  %780 = load i32, ptr %10, align 4, !tbaa !5
  br label %782

781:                                              ; preds = %773
  br label %782

782:                                              ; preds = %781, %779
  %783 = phi i32 [ %780, %779 ], [ 1, %781 ]
  store i32 %783, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %883

784:                                              ; preds = %762
  %785 = load i32, ptr %10, align 4, !tbaa !5
  %786 = icmp ne i32 %785, 0
  br i1 %786, label %787, label %796

787:                                              ; preds = %784
  %788 = load ptr, ptr @stderr, align 8, !tbaa !9
  %789 = load ptr, ptr %14, align 8, !tbaa !9
  %790 = load i32, ptr %9, align 4, !tbaa !5
  %791 = sext i32 %790 to i64
  %792 = getelementptr inbounds ptr, ptr %789, i64 %791
  %793 = load ptr, ptr %792, align 8, !tbaa !9
  %794 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %788, ptr noundef @.str.47, ptr noundef %793) #9
  %795 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %795, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %883

796:                                              ; preds = %784
  br label %797

797:                                              ; preds = %796
  br label %798

798:                                              ; preds = %797, %761
  br label %799

799:                                              ; preds = %798
  %800 = load i32, ptr %9, align 4, !tbaa !5
  %801 = add nsw i32 %800, 1
  store i32 %801, ptr %9, align 4, !tbaa !5
  br label %730, !llvm.loop !28

802:                                              ; preds = %730
  %803 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %803) #9
  br label %870

804:                                              ; preds = %726
  %805 = load i32, ptr @stdin_is_interactive, align 4, !tbaa !5
  %806 = icmp ne i32 %805, 0
  br i1 %806, label %807, label %866

807:                                              ; preds = %804
  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
  %808 = call i32 (ptr, ...) @printf(ptr noundef @.str.48)
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %809

809:                                              ; preds = %814, %807
  %810 = load i32, ptr %29, align 4, !tbaa !5
  %811 = icmp slt i32 %810, 32
  br i1 %811, label %812, label %817

812:                                              ; preds = %809
  %813 = call i32 (ptr, ...) @printf(ptr noundef @.str.49)
  br label %814

814:                                              ; preds = %812
  %815 = load i32, ptr %29, align 4, !tbaa !5
  %816 = add nsw i32 %815, 1
  store i32 %816, ptr %29, align 4, !tbaa !5
  br label %809, !llvm.loop !29

817:                                              ; preds = %809
  %818 = call i32 (ptr, ...) @printf(ptr noundef @.str.50)
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %819

819:                                              ; preds = %824, %817
  %820 = load i32, ptr %29, align 4, !tbaa !5
  %821 = icmp slt i32 %820, 32
  br i1 %821, label %822, label %827

822:                                              ; preds = %819
  %823 = call i32 (ptr, ...) @printf(ptr noundef @.str.49)
  br label %824

824:                                              ; preds = %822
  %825 = load i32, ptr %29, align 4, !tbaa !5
  %826 = add nsw i32 %825, 1
  store i32 %826, ptr %29, align 4, !tbaa !5
  br label %819, !llvm.loop !30

827:                                              ; preds = %819
  %828 = call i32 (ptr, ...) @printf(ptr noundef @.str.51)
  %829 = call ptr @sqlite3_libversion()
  %830 = call ptr @sqlite3_sourceid()
  %831 = call i32 (ptr, ...) @printf(ptr noundef @.str.52, ptr noundef %829, ptr noundef %830)
  %832 = load i32, ptr %11, align 4, !tbaa !5
  %833 = icmp ne i32 %832, 0
  br i1 %833, label %834, label %837

834:                                              ; preds = %827
  %835 = call i32 (ptr, ...) @printf(ptr noundef @.str.53)
  call void @printBold(ptr noundef @.str.54)
  %836 = call i32 (ptr, ...) @printf(ptr noundef @.str.55)
  br label %837

837:                                              ; preds = %834, %827
  %838 = call ptr @find_home_dir(i32 noundef 0)
  store ptr %838, ptr %26, align 8, !tbaa !9
  %839 = load ptr, ptr %26, align 8, !tbaa !9
  %840 = icmp ne ptr %839, null
  br i1 %840, label %841, label %855

841:                                              ; preds = %837
  %842 = load ptr, ptr %26, align 8, !tbaa !9
  %843 = call i32 @strlen30(ptr noundef %842)
  %844 = add nsw i32 %843, 20
  store i32 %844, ptr %28, align 4, !tbaa !5
  %845 = load i32, ptr %28, align 4, !tbaa !5
  %846 = sext i32 %845 to i64
  %847 = call noalias ptr @malloc(i64 noundef %846) #13
  store ptr %847, ptr %27, align 8, !tbaa !9
  %848 = icmp ne ptr %847, null
  br i1 %848, label %849, label %854

849:                                              ; preds = %841
  %850 = load i32, ptr %28, align 4, !tbaa !5
  %851 = load ptr, ptr %27, align 8, !tbaa !9
  %852 = load ptr, ptr %26, align 8, !tbaa !9
  %853 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef %850, ptr noundef %851, ptr noundef @.str.56, ptr noundef %852)
  br label %854

854:                                              ; preds = %849, %841
  br label %855

855:                                              ; preds = %854, %837
  %856 = load ptr, ptr %27, align 8, !tbaa !9
  %857 = icmp ne ptr %856, null
  br i1 %857, label %858, label %859

858:                                              ; preds = %855
  br label %859

859:                                              ; preds = %858, %855
  %860 = call i32 @process_input(ptr noundef %7, ptr noundef null)
  store i32 %860, ptr %10, align 4, !tbaa !5
  %861 = load ptr, ptr %27, align 8, !tbaa !9
  %862 = icmp ne ptr %861, null
  br i1 %862, label %863, label %865

863:                                              ; preds = %859
  %864 = load ptr, ptr %27, align 8, !tbaa !9
  call void @free(ptr noundef %864) #9
  br label %865

865:                                              ; preds = %863, %859
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  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 %869

866:                                              ; preds = %804
  %867 = load ptr, ptr @stdin, align 8, !tbaa !9
  %868 = call i32 @process_input(ptr noundef %7, ptr noundef %867)
  store i32 %868, ptr %10, align 4, !tbaa !5
  br label %869

869:                                              ; preds = %866, %865
  br label %870

870:                                              ; preds = %869, %802
  call void @set_table_name(ptr noundef %7, ptr noundef null)
  %871 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %872 = load ptr, ptr %871, align 8, !tbaa !25
  %873 = icmp ne ptr %872, null
  br i1 %873, label %874, label %878

874:                                              ; preds = %870
  %875 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 0
  %876 = load ptr, ptr %875, align 8, !tbaa !25
  %877 = call i32 @sqlite3_close(ptr noundef %876)
  br label %878

878:                                              ; preds = %874, %870
  %879 = getelementptr inbounds %struct.ShellState, ptr %7, i32 0, i32 26
  %880 = load ptr, ptr %879, align 8, !tbaa !31
  call void @sqlite3_free(ptr noundef %880)
  %881 = call ptr @find_home_dir(i32 noundef 1)
  %882 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %882, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %883

883:                                              ; preds = %878, %787, %782, %759, %720
  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 5136, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  %884 = load i32, ptr %3, align 4
  ret i32 %884
}

; 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 5080}
!13 = !{!"ShellState", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !10, i64 32, !10, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !10, i64 80, !7, i64 88, !7, i64 118, !7, i64 138, !7, i64 160, !7, i64 560, !7, i64 960, !7, i64 980, !10, i64 5080, !10, i64 5088, !10, i64 5096, !10, i64 5104, !10, i64 5112, !10, i64 5120, !6, i64 5128, !6, i64 5132}
!14 = !{!13, !6, i64 76}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!13, !10, i64 32}
!20 = !{!13, !6, i64 52}
!21 = !{!13, !6, i64 68}
!22 = !{!13, !6, i64 12}
!23 = !{!13, !6, i64 16}
!24 = !{!13, !6, i64 20}
!25 = !{!13, !10, i64 0}
!26 = !{!13, !6, i64 56}
!27 = distinct !{!27, !18}
!28 = distinct !{!28, !18}
!29 = distinct !{!29, !18}
!30 = distinct !{!30, !18}
!31 = !{!13, !10, i64 5088}


; 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, 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 [85 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 [87 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 [7 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [6 x i8], align 1
@bail_on_error = external hidden local_unnamed_addr global i32, align 4
@.str.39 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.56 = 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 5136, 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
  %.not258 = icmp eq ptr %19, null
  br i1 %.not258, label %20, label %21

20:                                               ; preds = %18, %15
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 7316, 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 5080
  %25 = getelementptr inbounds i8, ptr %4, i64 76
  br label %26

26:                                               ; preds = %.lr.ph, %163
  %.0218331 = phi ptr [ null, %.lr.ph ], [ %.1219, %163 ]
  %.0222330 = phi i32 [ 1, %.lr.ph ], [ %164, %163 ]
  %.0232329 = phi i32 [ 1, %.lr.ph ], [ %.1233, %163 ]
  %.0234328 = phi i32 [ 0, %.lr.ph ], [ %.1235, %163 ]
  %.0236327 = phi ptr [ null, %.lr.ph ], [ %.1237, %163 ]
  %27 = sext i32 %.0222330 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
  %.not276 = icmp eq i8 %30, 45
  br i1 %.not276, 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 %.0234328, 1
  %36 = sext i32 %35 to i64
  %37 = shl nsw i64 %36, 3
  %38 = call ptr @realloc(ptr noundef %.0236327, 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 %.0234328 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 ]
  %.1237.ph = phi ptr [ %38, %43 ], [ %.0236327, %31 ]
  %.1235.ph = phi i32 [ %35, %43 ], [ %.0234328, %31 ]
  %.1233.ph = phi i32 [ 0, %43 ], [ %.0232329, %31 ]
  store ptr %29, ptr %.sink, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %.sink.split, %26
  %.1237 = phi ptr [ %.0236327, %26 ], [ %.1237.ph, %.sink.split ]
  %.1235 = phi i32 [ %.0234328, %26 ], [ %.1235.ph, %.sink.split ]
  %.1233 = phi i32 [ %.0232329, %26 ], [ %.1233.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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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 %.0222330, 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
  %.not277 = icmp eq ptr %154, null
  br i1 %.not277, 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
  %.1223 = phi i32 [ %62, %61 ], [ %68, %67 ], [ %.0222330, %73 ], [ %78, %77 ], [ %88, %83 ], [ %107, %117 ], [ %144, %143 ], [ %152, %155 ], [ %.0222330, %148 ], [ %130, %137 ], [ %130, %125 ]
  %.1219 = phi ptr [ %.0218331, %61 ], [ %69, %67 ], [ %.0218331, %73 ], [ %.0218331, %77 ], [ %.0218331, %83 ], [ %.0218331, %117 ], [ %.0218331, %143 ], [ %.0218331, %155 ], [ %.0218331, %148 ], [ %.0218331, %137 ], [ %.0218331, %125 ]
  %164 = add nsw i32 %.1223, 1
  %165 = icmp slt i32 %164, %0
  br i1 %165, label %26, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %163, %21
  %.0236.lcssa = phi ptr [ null, %21 ], [ %.1237, %163 ]
  %.0234.lcssa = phi i32 [ 0, %21 ], [ %.1235, %163 ]
  %.0232.lcssa = phi i32 [ 1, %21 ], [ %.1233, %163 ]
  %.0218.lcssa = phi ptr [ null, %21 ], [ %.1219, %163 ]
  %166 = getelementptr inbounds i8, ptr %4, i64 5080
  %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 ]
  %.0231 = phi i1 [ %170, %169 ], [ true, %._crit_edge ]
  %173 = load ptr, ptr @stdout, align 8, !tbaa !5
  %174 = getelementptr inbounds i8, ptr %4, i64 32
  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 %.0218.lcssa)
  br i1 %23, label %.lr.ph338, label %._crit_edge339

.lr.ph338:                                        ; preds = %178
  %179 = add nsw i32 %0, -1
  %180 = getelementptr inbounds i8, ptr %4, i64 76
  %181 = getelementptr inbounds i8, ptr %4, i64 20
  %182 = getelementptr inbounds i8, ptr %4, i64 16
  %183 = getelementptr inbounds i8, ptr %4, i64 12
  %184 = getelementptr inbounds i8, ptr %4, i64 68
  %185 = getelementptr inbounds i8, ptr %4, i64 960
  %186 = getelementptr inbounds i8, ptr %4, i64 138
  %187 = getelementptr inbounds i8, ptr %4, i64 118
  %188 = getelementptr inbounds i8, ptr %4, i64 52
  %189 = load i16, ptr @.str.25, align 1
  %190 = getelementptr inbounds i8, ptr %4, i64 56
  br label %191

191:                                              ; preds = %.lr.ph338, %385
  %.2224336 = phi i32 [ 1, %.lr.ph338 ], [ %386, %385 ]
  %.0225335 = phi i32 [ 0, %.lr.ph338 ], [ %.2227.ph, %385 ]
  %192 = sext i32 %.2224336 to i64
  %193 = getelementptr inbounds ptr, ptr %1, i64 %192
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = load i8, ptr %194, align 1, !tbaa !11
  %.not259 = icmp eq i8 %195, 45
  br i1 %.not259, label %196, label %385

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

202:                                              ; preds = %196
  %203 = add nsw i32 %.2224336, 1
  br label %383

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

207:                                              ; preds = %204
  store i32 4, ptr %188, align 4, !tbaa !18
  br label %383

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

211:                                              ; preds = %208
  store i32 2, ptr %188, align 4, !tbaa !18
  br label %383

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

215:                                              ; preds = %212
  store i32 6, ptr %188, align 4, !tbaa !18
  br label %383

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

219:                                              ; preds = %216
  store i32 0, ptr %188, align 4, !tbaa !18
  br label %383

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

223:                                              ; preds = %220
  store i32 1, ptr %188, align 4, !tbaa !18
  br label %383

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

227:                                              ; preds = %224
  store i32 8, ptr %188, align 4, !tbaa !18
  store i16 %189, ptr %187, align 2
  br label %383

228:                                              ; preds = %224
  %229 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.26) #12
  %230 = icmp eq i32 %229, 0
  br i1 %230, label %231, label %234

231:                                              ; preds = %228
  store i32 10, ptr %188, align 4, !tbaa !18
  %232 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %187, ptr noundef nonnull @.str.27) #11
  %233 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %186, ptr noundef nonnull @.str.28) #11
  br label %383

234:                                              ; preds = %228
  %235 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.5) #12
  %236 = icmp eq i32 %235, 0
  br i1 %236, label %237, label %241

237:                                              ; preds = %234
  %238 = add nsw i32 %.2224336, 1
  %239 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %238)
  %240 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %187, ptr noundef nonnull @.str.29, ptr noundef %239) #11
  br label %383

241:                                              ; preds = %234
  %242 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.7) #12
  %243 = icmp eq i32 %242, 0
  br i1 %243, label %244, label %248

244:                                              ; preds = %241
  %245 = add nsw i32 %.2224336, 1
  %246 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %245)
  %247 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %186, ptr noundef nonnull @.str.29, ptr noundef %246) #11
  br label %383

248:                                              ; preds = %241
  %249 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.6) #12
  %250 = icmp eq i32 %249, 0
  br i1 %250, label %251, label %255

251:                                              ; preds = %248
  %252 = add nsw i32 %.2224336, 1
  %253 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %252)
  %254 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef 20, ptr noundef nonnull %185, ptr noundef nonnull @.str.29, ptr noundef %253) #11
  br label %383

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

258:                                              ; preds = %255
  store i32 1, ptr %184, align 4, !tbaa !19
  br label %383

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

262:                                              ; preds = %259
  store i32 0, ptr %184, align 4, !tbaa !19
  br label %383

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

266:                                              ; preds = %263
  %267 = load i32, ptr %180, align 4, !tbaa !14
  %268 = or i32 %267, 64
  store i32 %268, ptr %180, align 4, !tbaa !14
  br label %383

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

272:                                              ; preds = %269
  store i32 1, ptr %183, align 4, !tbaa !20
  br label %383

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

276:                                              ; preds = %273
  store i32 2, ptr %183, align 4, !tbaa !20
  br label %383

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

280:                                              ; preds = %277
  store i32 1, ptr %182, align 8, !tbaa !21
  br label %383

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

284:                                              ; preds = %281
  store i32 1, ptr %181, align 4, !tbaa !22
  br label %383

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

288:                                              ; preds = %285
  %289 = load i32, ptr %180, align 4, !tbaa !14
  %290 = or i32 %289, 8
  store i32 %290, ptr %180, align 4, !tbaa !14
  br label %383

291:                                              ; preds = %285
  %292 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.38) #12
  %293 = icmp eq i32 %292, 0
  br i1 %293, label %294, label %295

294:                                              ; preds = %291
  store i32 1, ptr @bail_on_error, align 4, !tbaa !9
  br label %383

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

298:                                              ; preds = %295
  %299 = call ptr @sqlite3_libversion() #11
  %300 = call ptr @sqlite3_sourceid() #11
  %301 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.40, ptr noundef %299, ptr noundef %300)
  br label %.thread

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

305:                                              ; preds = %302
  store i32 1, ptr @stdin_is_interactive, align 4, !tbaa !9
  br label %383

306:                                              ; preds = %302
  %307 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.10) #12
  %308 = icmp eq i32 %307, 0
  br i1 %308, label %309, label %310

309:                                              ; preds = %306
  store i32 0, ptr @stdin_is_interactive, align 4, !tbaa !9
  br label %383

310:                                              ; preds = %306
  %311 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.11) #12
  %312 = icmp eq i32 %311, 0
  br i1 %312, label %313, label %315

313:                                              ; preds = %310
  %314 = add nsw i32 %.2224336, 1
  br label %383

315:                                              ; preds = %310
  %316 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.12) #12
  %317 = icmp eq i32 %316, 0
  br i1 %317, label %318, label %320

318:                                              ; preds = %315
  %319 = add nsw i32 %.2224336, 2
  br label %383

320:                                              ; preds = %315
  %321 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.13) #12
  %322 = icmp eq i32 %321, 0
  br i1 %322, label %323, label %325

323:                                              ; preds = %320
  %324 = add nsw i32 %.2224336, 2
  br label %383

325:                                              ; preds = %320
  %326 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.14) #12
  %327 = icmp eq i32 %326, 0
  br i1 %327, label %328, label %330

328:                                              ; preds = %325
  %329 = add nsw i32 %.2224336, 2
  br label %383

330:                                              ; preds = %325
  %331 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.15) #12
  %332 = icmp eq i32 %331, 0
  br i1 %332, label %333, label %335

333:                                              ; preds = %330
  %334 = add nsw i32 %.2224336, 1
  br label %383

335:                                              ; preds = %330
  %336 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.16) #12
  %337 = icmp eq i32 %336, 0
  br i1 %337, label %338, label %340

338:                                              ; preds = %335
  %339 = add nsw i32 %.2224336, 1
  br label %383

340:                                              ; preds = %335
  %341 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.42) #12
  %342 = icmp eq i32 %341, 0
  br i1 %342, label %343, label %344

343:                                              ; preds = %340
  call void @usage(i32 noundef 1)
  br label %383

344:                                              ; preds = %340
  %345 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %spec.select278, ptr noundef nonnull dereferenceable(1) @.str.8) #12
  %346 = icmp eq i32 %345, 0
  br i1 %346, label %347, label %377

347:                                              ; preds = %344
  %348 = icmp eq i32 %.2224336, %179
  br i1 %348, label %._crit_edge339, label %349

349:                                              ; preds = %347
  %350 = add nsw i32 %.2224336, 1
  %351 = call ptr @cmdline_option_value(i32 noundef %0, ptr noundef nonnull %1, i32 noundef %350)
  %352 = load i8, ptr %351, align 1, !tbaa !11
  %353 = icmp eq i8 %352, 46
  br i1 %353, label %354, label %362

354:                                              ; preds = %349
  %355 = call i32 @do_meta_command(ptr noundef nonnull %351, ptr noundef nonnull %4)
  %356 = icmp ne i32 %355, 0
  %357 = load i32, ptr @bail_on_error, align 4
  %358 = icmp ne i32 %357, 0
  %or.cond8 = select i1 %356, i1 %358, i1 false
  br i1 %or.cond8, label %359, label %383

359:                                              ; preds = %354
  %360 = icmp eq i32 %355, 2
  %361 = select i1 %360, i32 0, i32 %355
  br label %.thread

362:                                              ; preds = %349
  call void @open_db(ptr noundef nonnull %4, i32 noundef 0)
  %363 = load ptr, ptr %4, align 8, !tbaa !23
  %364 = call i32 @shell_exec(ptr noundef %363, ptr noundef nonnull %351, ptr noundef nonnull @shell_callback, ptr noundef nonnull %4, ptr noundef nonnull %3)
  %365 = load ptr, ptr %3, align 8, !tbaa !5
  %.not260 = icmp eq ptr %365, null
  br i1 %.not260, label %372, label %366

366:                                              ; preds = %362
  %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 %365) #13
  %369 = load i32, ptr @bail_on_error, align 4, !tbaa !9
  %.not263 = icmp eq i32 %369, 0
  br i1 %.not263, label %383, label %370

370:                                              ; preds = %366
  %371 = call i32 @llvm.umax.i32(i32 %364, i32 1)
  br label %.thread

372:                                              ; preds = %362
  %.not261 = icmp eq i32 %364, 0
  br i1 %.not261, label %383, label %373

373:                                              ; preds = %372
  %374 = load ptr, ptr @stderr, align 8, !tbaa !5
  %375 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %374, ptr noundef nonnull @.str.44, ptr noundef nonnull %351) #13
  %376 = load i32, ptr @bail_on_error, align 4, !tbaa !9
  %.not262 = icmp eq i32 %376, 0
  br i1 %.not262, label %383, label %.thread

377:                                              ; preds = %344
  %378 = load ptr, ptr @stderr, align 8, !tbaa !5
  %379 = load ptr, ptr @Argv0, align 8, !tbaa !5
  %380 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %378, ptr noundef nonnull @.str.45, ptr noundef %379, ptr noundef nonnull %spec.select278) #13
  %381 = load ptr, ptr @stderr, align 8, !tbaa !5
  %382 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %381, ptr noundef nonnull @.str.46) #13
  br label %.thread

383:                                              ; preds = %207, %215, %223, %231, %244, %258, %266, %276, %284, %294, %305, %313, %323, %333, %343, %354, %372, %373, %366, %338, %328, %318, %309, %288, %280, %272, %262, %251, %237, %227, %219, %211, %202
  %.1226 = phi i32 [ %.0225335, %202 ], [ %.0225335, %207 ], [ %.0225335, %211 ], [ %.0225335, %215 ], [ %.0225335, %219 ], [ %.0225335, %223 ], [ %.0225335, %227 ], [ %.0225335, %231 ], [ %.0225335, %237 ], [ %.0225335, %244 ], [ %.0225335, %251 ], [ %.0225335, %258 ], [ %.0225335, %262 ], [ %.0225335, %266 ], [ %.0225335, %272 ], [ %.0225335, %276 ], [ %.0225335, %280 ], [ %.0225335, %284 ], [ %.0225335, %288 ], [ %.0225335, %294 ], [ %.0225335, %305 ], [ %.0225335, %309 ], [ %.0225335, %313 ], [ %.0225335, %318 ], [ %.0225335, %323 ], [ %.0225335, %328 ], [ %.0225335, %333 ], [ %.0225335, %338 ], [ %.0225335, %343 ], [ %355, %354 ], [ %364, %366 ], [ %364, %373 ], [ 0, %372 ]
  %.3 = phi i32 [ %203, %202 ], [ %.2224336, %207 ], [ %.2224336, %211 ], [ %.2224336, %215 ], [ %.2224336, %219 ], [ %.2224336, %223 ], [ %.2224336, %227 ], [ %.2224336, %231 ], [ %238, %237 ], [ %245, %244 ], [ %252, %251 ], [ %.2224336, %258 ], [ %.2224336, %262 ], [ %.2224336, %266 ], [ %.2224336, %272 ], [ %.2224336, %276 ], [ %.2224336, %280 ], [ %.2224336, %284 ], [ %.2224336, %288 ], [ %.2224336, %294 ], [ %.2224336, %305 ], [ %.2224336, %309 ], [ %314, %313 ], [ %319, %318 ], [ %324, %323 ], [ %329, %328 ], [ %334, %333 ], [ %339, %338 ], [ %.2224336, %343 ], [ %350, %354 ], [ %350, %366 ], [ %350, %373 ], [ %350, %372 ]
  %384 = load i32, ptr %188, align 4, !tbaa !18
  store i32 %384, ptr %190, align 8, !tbaa !24
  br label %385

385:                                              ; preds = %383, %191
  %.2227.ph = phi i32 [ %.0225335, %191 ], [ %.1226, %383 ]
  %.4.ph = phi i32 [ %.2224336, %191 ], [ %.3, %383 ]
  %386 = add nsw i32 %.4.ph, 1
  %387 = icmp slt i32 %386, %0
  br i1 %387, label %191, label %._crit_edge339, !llvm.loop !25

._crit_edge339:                                   ; preds = %385, %347, %178
  %.0225.lcssa = phi i32 [ 0, %178 ], [ %.0225335, %347 ], [ %.2227.ph, %385 ]
  %.not265 = icmp eq i32 %.0232.lcssa, 0
  br i1 %.not265, label %.preheader, label %413

.preheader:                                       ; preds = %._crit_edge339
  %388 = icmp sgt i32 %.0234.lcssa, 0
  br i1 %388, label %.lr.ph346.preheader, label %._crit_edge347

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

.lr.ph346:                                        ; preds = %.lr.ph346.preheader, %412
  %indvars.iv = phi i64 [ 0, %.lr.ph346.preheader ], [ %indvars.iv.next, %412 ]
  %389 = getelementptr inbounds ptr, ptr %.0236.lcssa, i64 %indvars.iv
  %390 = load ptr, ptr %389, align 8, !tbaa !5
  %391 = load i8, ptr %390, align 1, !tbaa !11
  %392 = icmp eq i8 %391, 46
  br i1 %392, label %393, label %398

393:                                              ; preds = %.lr.ph346
  %394 = call i32 @do_meta_command(ptr noundef nonnull %390, ptr noundef nonnull %4)
  %.not269 = icmp eq i32 %394, 0
  br i1 %.not269, label %412, label %395

395:                                              ; preds = %393
  %396 = icmp eq i32 %394, 2
  %397 = select i1 %396, i32 0, i32 %394
  br label %.thread

398:                                              ; preds = %.lr.ph346
  call void @open_db(ptr noundef nonnull %4, i32 noundef 0)
  %399 = load ptr, ptr %4, align 8, !tbaa !23
  %400 = load ptr, ptr %389, align 8, !tbaa !5
  %401 = call i32 @shell_exec(ptr noundef %399, ptr noundef %400, ptr noundef nonnull @shell_callback, ptr noundef nonnull %4, ptr noundef nonnull %3)
  %402 = load ptr, ptr %3, align 8, !tbaa !5
  %.not266 = icmp eq ptr %402, null
  br i1 %.not266, label %407, label %403

403:                                              ; preds = %398
  %404 = load ptr, ptr @stderr, align 8, !tbaa !5
  %405 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %404, ptr noundef nonnull @.str.43, ptr noundef nonnull %402) #13
  %406 = call i32 @llvm.umax.i32(i32 %401, i32 1)
  br label %.thread

407:                                              ; preds = %398
  %.not267 = icmp eq i32 %401, 0
  br i1 %.not267, label %412, label %408

408:                                              ; preds = %407
  %409 = load ptr, ptr @stderr, align 8, !tbaa !5
  %410 = load ptr, ptr %389, align 8, !tbaa !5
  %411 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %409, ptr noundef nonnull @.str.47, ptr noundef %410) #13
  br label %.thread

412:                                              ; preds = %393, %407
  %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_edge347, label %.lr.ph346, !llvm.loop !26

._crit_edge347:                                   ; preds = %412, %.preheader
  %.4229.lcssa = phi i32 [ %.0225.lcssa, %.preheader ], [ 0, %412 ]
  call void @free(ptr noundef %.0236.lcssa) #11
  br label %503

413:                                              ; preds = %._crit_edge339
  %414 = load i32, ptr @stdin_is_interactive, align 4, !tbaa !9
  %.not270 = icmp eq i32 %414, 0
  br i1 %.not270, label %500, label %415

415:                                              ; preds = %413
  %416 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48)
  %417 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %418 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %419 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %420 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %421 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %422 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %423 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %424 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %425 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %426 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %427 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %428 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %429 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %430 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %431 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %432 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %433 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %434 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %435 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %436 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %437 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %438 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %439 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %440 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %441 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %442 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %443 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %444 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %445 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %446 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %447 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %448 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %449 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50)
  %450 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %451 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %452 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %453 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %454 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %455 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %456 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %457 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %458 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %459 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %460 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %461 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %462 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %463 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %464 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %465 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %466 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %467 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %468 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %469 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %470 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %471 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %472 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %473 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %474 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %475 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %476 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %477 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %478 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %479 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %480 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %481 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %482 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %483 = call ptr @sqlite3_libversion() #11
  %484 = call ptr @sqlite3_sourceid() #11
  %485 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52, ptr noundef %483, ptr noundef %484)
  br i1 %.0231, label %489, label %486

486:                                              ; preds = %415
  %487 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.53)
  call void @printBold(ptr noundef nonnull @.str.54)
  %488 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55)
  br label %489

489:                                              ; preds = %486, %415
  %490 = call ptr @find_home_dir(i32 noundef 0)
  %.not272 = icmp eq ptr %490, null
  br i1 %.not272, label %.thread293, label %491

491:                                              ; preds = %489
  %492 = call i32 @strlen30(ptr noundef nonnull %490)
  %493 = add nsw i32 %492, 20
  %494 = sext i32 %493 to i64
  %495 = call noalias ptr @malloc(i64 noundef %494) #16
  %.not273 = icmp eq ptr %495, null
  br i1 %.not273, label %.thread293, label %497

.thread293:                                       ; preds = %491, %489
  %496 = call i32 @process_input(ptr noundef nonnull %4, ptr noundef null)
  br label %503

497:                                              ; preds = %491
  %498 = call ptr (i32, ptr, ptr, ...) @sqlite3_snprintf(i32 noundef %493, ptr noundef nonnull %495, ptr noundef nonnull @.str.56, ptr noundef nonnull %490) #11
  %499 = call i32 @process_input(ptr noundef nonnull %4, ptr noundef null)
  call void @free(ptr noundef nonnull %495) #11
  br label %503

500:                                              ; preds = %413
  %501 = load ptr, ptr @stdin, align 8, !tbaa !5
  %502 = call i32 @process_input(ptr noundef nonnull %4, ptr noundef %501)
  br label %503

503:                                              ; preds = %.thread293, %497, %500, %._crit_edge347
  %.6 = phi i32 [ %502, %500 ], [ %.4229.lcssa, %._crit_edge347 ], [ %499, %497 ], [ %496, %.thread293 ]
  call void @set_table_name(ptr noundef nonnull %4, ptr noundef null)
  %504 = load ptr, ptr %4, align 8, !tbaa !23
  %.not275 = icmp eq ptr %504, null
  br i1 %.not275, label %507, label %505

505:                                              ; preds = %503
  %506 = call i32 @sqlite3_close(ptr noundef nonnull %504) #11
  br label %507

507:                                              ; preds = %505, %503
  %508 = getelementptr inbounds i8, ptr %4, i64 5088
  %509 = load ptr, ptr %508, align 8, !tbaa !27
  call void @sqlite3_free(ptr noundef %509) #11
  %510 = call ptr @find_home_dir(i32 noundef 1)
  br label %.thread

.thread:                                          ; preds = %373, %377, %370, %359, %298, %507, %408, %403, %395
  %.2 = phi i32 [ %.6, %507 ], [ %397, %395 ], [ %406, %403 ], [ %401, %408 ], [ 1, %377 ], [ %371, %370 ], [ %361, %359 ], [ 0, %298 ], [ %364, %373 ]
  call void @llvm.lifetime.end.p0(i64 5136, 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 5080}
!13 = !{!"ShellState", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !6, i64 80, !7, i64 88, !7, i64 118, !7, i64 138, !7, i64 160, !7, i64 560, !7, i64 960, !7, i64 980, !6, i64 5080, !6, i64 5088, !6, i64 5096, !6, i64 5104, !6, i64 5112, !6, i64 5120, !10, i64 5128, !10, i64 5132}
!14 = !{!13, !10, i64 76}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!13, !6, i64 32}
!18 = !{!13, !10, i64 52}
!19 = !{!13, !10, i64 68}
!20 = !{!13, !10, i64 12}
!21 = !{!13, !10, i64 16}
!22 = !{!13, !10, i64 20}
!23 = !{!13, !6, i64 0}
!24 = !{!13, !10, i64 56}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16}
!27 = !{!13, !6, i64 5088}


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