; LLVM IR from ElsevierSoftwareX/SOFTX-D-20-00016 :: GameplayFootball/src/libs/sqlite3 (sqlite3)

; 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.Sqlite3Config = type { i32, i32, i32, i32, i32, i32, %struct.sqlite3_mem_methods, %struct.sqlite3_mutex_methods, %struct.sqlite3_pcache_methods, ptr, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr }
%struct.sqlite3_mem_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_mutex_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_pcache_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }

@sqlite3Config = external hidden global %struct.Sqlite3Config, 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
declare hidden i32 @sqlite3MisuseError(i32 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #2

; 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) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @sqlite3_config(i32 noundef %0, ...) #1 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [1 x %struct.__va_list_tag], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  %7 = load i32, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 21), align 8, !tbaa !9
  %8 = icmp ne i32 %7, 0
  br i1 %8, label %9, label %11

9:                                                ; preds = %1
  %10 = call i32 @sqlite3MisuseError(i32 noundef 104202)
  store i32 %10, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %312

11:                                               ; preds = %1
  %12 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %12)
  %13 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %13, label %308 [
    i32 1, label %14
    i32 2, label %15
    i32 3, label %16
    i32 10, label %17
    i32 11, label %34
    i32 4, label %51
    i32 5, label %68
    i32 9, label %89
    i32 6, label %106
    i32 7, label %155
    i32 14, label %204
    i32 15, label %221
    i32 13, label %242
    i32 16, label %275
  ]

14:                                               ; preds = %11
  store i32 0, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 1), align 4, !tbaa !15
  store i32 0, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 2), align 8, !tbaa !16
  br label %309

15:                                               ; preds = %11
  store i32 1, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 1), align 4, !tbaa !15
  store i32 0, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 2), align 8, !tbaa !16
  br label %309

16:                                               ; preds = %11
  store i32 1, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 1), align 4, !tbaa !15
  store i32 1, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 2), align 8, !tbaa !16
  br label %309

17:                                               ; preds = %11
  %18 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %19 = getelementptr inbounds %struct.__va_list_tag, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 16
  %21 = icmp ule i32 %20, 40
  br i1 %21, label %22, label %27

22:                                               ; preds = %17
  %23 = getelementptr inbounds %struct.__va_list_tag, ptr %18, i32 0, i32 3
  %24 = load ptr, ptr %23, align 16
  %25 = getelementptr i8, ptr %24, i32 %20
  %26 = add i32 %20, 8
  store i32 %26, ptr %19, align 16
  br label %31

27:                                               ; preds = %17
  %28 = getelementptr inbounds %struct.__va_list_tag, ptr %18, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8
  %30 = getelementptr i8, ptr %29, i32 8
  store ptr %30, ptr %28, align 8
  br label %31

31:                                               ; preds = %27, %22
  %32 = phi ptr [ %25, %22 ], [ %29, %27 ]
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 7), ptr align 8 %33, i64 72, i1 false), !tbaa.struct !18
  br label %309

34:                                               ; preds = %11
  %35 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %36 = getelementptr inbounds %struct.__va_list_tag, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 16
  %38 = icmp ule i32 %37, 40
  br i1 %38, label %39, label %44

39:                                               ; preds = %34
  %40 = getelementptr inbounds %struct.__va_list_tag, ptr %35, i32 0, i32 3
  %41 = load ptr, ptr %40, align 16
  %42 = getelementptr i8, ptr %41, i32 %37
  %43 = add i32 %37, 8
  store i32 %43, ptr %36, align 16
  br label %48

44:                                               ; preds = %34
  %45 = getelementptr inbounds %struct.__va_list_tag, ptr %35, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8
  %47 = getelementptr i8, ptr %46, i32 8
  store ptr %47, ptr %45, align 8
  br label %48

48:                                               ; preds = %44, %39
  %49 = phi ptr [ %42, %39 ], [ %46, %44 ]
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %50, ptr align 8 getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 7), i64 72, i1 false), !tbaa.struct !18
  br label %309

51:                                               ; preds = %11
  %52 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %53 = getelementptr inbounds %struct.__va_list_tag, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 16
  %55 = icmp ule i32 %54, 40
  br i1 %55, label %56, label %61

56:                                               ; preds = %51
  %57 = getelementptr inbounds %struct.__va_list_tag, ptr %52, i32 0, i32 3
  %58 = load ptr, ptr %57, align 16
  %59 = getelementptr i8, ptr %58, i32 %54
  %60 = add i32 %54, 8
  store i32 %60, ptr %53, align 16
  br label %65

61:                                               ; preds = %51
  %62 = getelementptr inbounds %struct.__va_list_tag, ptr %52, i32 0, i32 2
  %63 = load ptr, ptr %62, align 8
  %64 = getelementptr i8, ptr %63, i32 8
  store ptr %64, ptr %62, align 8
  br label %65

65:                                               ; preds = %61, %56
  %66 = phi ptr [ %59, %56 ], [ %63, %61 ]
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 6), ptr align 8 %67, i64 64, i1 false), !tbaa.struct !19
  br label %309

68:                                               ; preds = %11
  %69 = load ptr, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 6), align 8, !tbaa !20
  %70 = icmp eq ptr %69, null
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  call void @sqlite3MemSetDefault()
  br label %72

72:                                               ; preds = %71, %68
  %73 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %74 = getelementptr inbounds %struct.__va_list_tag, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 16
  %76 = icmp ule i32 %75, 40
  br i1 %76, label %77, label %82

77:                                               ; preds = %72
  %78 = getelementptr inbounds %struct.__va_list_tag, ptr %73, i32 0, i32 3
  %79 = load ptr, ptr %78, align 16
  %80 = getelementptr i8, ptr %79, i32 %75
  %81 = add i32 %75, 8
  store i32 %81, ptr %74, align 16
  br label %86

82:                                               ; preds = %72
  %83 = getelementptr inbounds %struct.__va_list_tag, ptr %73, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8
  %85 = getelementptr i8, ptr %84, i32 8
  store ptr %85, ptr %83, align 8
  br label %86

86:                                               ; preds = %82, %77
  %87 = phi ptr [ %80, %77 ], [ %84, %82 ]
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %88, ptr align 8 getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 6), i64 64, i1 false), !tbaa.struct !19
  br label %309

89:                                               ; preds = %11
  %90 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %91 = getelementptr inbounds %struct.__va_list_tag, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 16
  %93 = icmp ule i32 %92, 40
  br i1 %93, label %94, label %99

94:                                               ; preds = %89
  %95 = getelementptr inbounds %struct.__va_list_tag, ptr %90, i32 0, i32 3
  %96 = load ptr, ptr %95, align 16
  %97 = getelementptr i8, ptr %96, i32 %92
  %98 = add i32 %92, 8
  store i32 %98, ptr %91, align 16
  br label %103

99:                                               ; preds = %89
  %100 = getelementptr inbounds %struct.__va_list_tag, ptr %90, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8
  %102 = getelementptr i8, ptr %101, i32 8
  store ptr %102, ptr %100, align 8
  br label %103

103:                                              ; preds = %99, %94
  %104 = phi ptr [ %97, %94 ], [ %101, %99 ]
  %105 = load i32, ptr %104, align 4, !tbaa !5
  store i32 %105, ptr @sqlite3Config, align 8, !tbaa !21
  br label %309

106:                                              ; preds = %11
  %107 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %108 = getelementptr inbounds %struct.__va_list_tag, ptr %107, i32 0, i32 0
  %109 = load i32, ptr %108, align 16
  %110 = icmp ule i32 %109, 40
  br i1 %110, label %111, label %116

111:                                              ; preds = %106
  %112 = getelementptr inbounds %struct.__va_list_tag, ptr %107, i32 0, i32 3
  %113 = load ptr, ptr %112, align 16
  %114 = getelementptr i8, ptr %113, i32 %109
  %115 = add i32 %109, 8
  store i32 %115, ptr %108, align 16
  br label %120

116:                                              ; preds = %106
  %117 = getelementptr inbounds %struct.__va_list_tag, ptr %107, i32 0, i32 2
  %118 = load ptr, ptr %117, align 8
  %119 = getelementptr i8, ptr %118, i32 8
  store ptr %119, ptr %117, align 8
  br label %120

120:                                              ; preds = %116, %111
  %121 = phi ptr [ %114, %111 ], [ %118, %116 ]
  %122 = load ptr, ptr %121, align 8, !tbaa !17
  store ptr %122, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 13), align 8, !tbaa !22
  %123 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %124 = getelementptr inbounds %struct.__va_list_tag, ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 16
  %126 = icmp ule i32 %125, 40
  br i1 %126, label %127, label %132

127:                                              ; preds = %120
  %128 = getelementptr inbounds %struct.__va_list_tag, ptr %123, i32 0, i32 3
  %129 = load ptr, ptr %128, align 16
  %130 = getelementptr i8, ptr %129, i32 %125
  %131 = add i32 %125, 8
  store i32 %131, ptr %124, align 16
  br label %136

132:                                              ; preds = %120
  %133 = getelementptr inbounds %struct.__va_list_tag, ptr %123, i32 0, i32 2
  %134 = load ptr, ptr %133, align 8
  %135 = getelementptr i8, ptr %134, i32 8
  store ptr %135, ptr %133, align 8
  br label %136

136:                                              ; preds = %132, %127
  %137 = phi ptr [ %130, %127 ], [ %134, %132 ]
  %138 = load i32, ptr %137, align 4, !tbaa !5
  store i32 %138, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 14), align 8, !tbaa !23
  %139 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %140 = getelementptr inbounds %struct.__va_list_tag, ptr %139, i32 0, i32 0
  %141 = load i32, ptr %140, align 16
  %142 = icmp ule i32 %141, 40
  br i1 %142, label %143, label %148

143:                                              ; preds = %136
  %144 = getelementptr inbounds %struct.__va_list_tag, ptr %139, i32 0, i32 3
  %145 = load ptr, ptr %144, align 16
  %146 = getelementptr i8, ptr %145, i32 %141
  %147 = add i32 %141, 8
  store i32 %147, ptr %140, align 16
  br label %152

148:                                              ; preds = %136
  %149 = getelementptr inbounds %struct.__va_list_tag, ptr %139, i32 0, i32 2
  %150 = load ptr, ptr %149, align 8
  %151 = getelementptr i8, ptr %150, i32 8
  store ptr %151, ptr %149, align 8
  br label %152

152:                                              ; preds = %148, %143
  %153 = phi ptr [ %146, %143 ], [ %150, %148 ]
  %154 = load i32, ptr %153, align 4, !tbaa !5
  store i32 %154, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 15), align 4, !tbaa !24
  br label %309

155:                                              ; preds = %11
  %156 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %157 = getelementptr inbounds %struct.__va_list_tag, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 16
  %159 = icmp ule i32 %158, 40
  br i1 %159, label %160, label %165

160:                                              ; preds = %155
  %161 = getelementptr inbounds %struct.__va_list_tag, ptr %156, i32 0, i32 3
  %162 = load ptr, ptr %161, align 16
  %163 = getelementptr i8, ptr %162, i32 %158
  %164 = add i32 %158, 8
  store i32 %164, ptr %157, align 16
  br label %169

165:                                              ; preds = %155
  %166 = getelementptr inbounds %struct.__va_list_tag, ptr %156, i32 0, i32 2
  %167 = load ptr, ptr %166, align 8
  %168 = getelementptr i8, ptr %167, i32 8
  store ptr %168, ptr %166, align 8
  br label %169

169:                                              ; preds = %165, %160
  %170 = phi ptr [ %163, %160 ], [ %167, %165 ]
  %171 = load ptr, ptr %170, align 8, !tbaa !17
  store ptr %171, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 16), align 8, !tbaa !25
  %172 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %173 = getelementptr inbounds %struct.__va_list_tag, ptr %172, i32 0, i32 0
  %174 = load i32, ptr %173, align 16
  %175 = icmp ule i32 %174, 40
  br i1 %175, label %176, label %181

176:                                              ; preds = %169
  %177 = getelementptr inbounds %struct.__va_list_tag, ptr %172, i32 0, i32 3
  %178 = load ptr, ptr %177, align 16
  %179 = getelementptr i8, ptr %178, i32 %174
  %180 = add i32 %174, 8
  store i32 %180, ptr %173, align 16
  br label %185

181:                                              ; preds = %169
  %182 = getelementptr inbounds %struct.__va_list_tag, ptr %172, i32 0, i32 2
  %183 = load ptr, ptr %182, align 8
  %184 = getelementptr i8, ptr %183, i32 8
  store ptr %184, ptr %182, align 8
  br label %185

185:                                              ; preds = %181, %176
  %186 = phi ptr [ %179, %176 ], [ %183, %181 ]
  %187 = load i32, ptr %186, align 4, !tbaa !5
  store i32 %187, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 17), align 8, !tbaa !26
  %188 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %189 = getelementptr inbounds %struct.__va_list_tag, ptr %188, i32 0, i32 0
  %190 = load i32, ptr %189, align 16
  %191 = icmp ule i32 %190, 40
  br i1 %191, label %192, label %197

192:                                              ; preds = %185
  %193 = getelementptr inbounds %struct.__va_list_tag, ptr %188, i32 0, i32 3
  %194 = load ptr, ptr %193, align 16
  %195 = getelementptr i8, ptr %194, i32 %190
  %196 = add i32 %190, 8
  store i32 %196, ptr %189, align 16
  br label %201

197:                                              ; preds = %185
  %198 = getelementptr inbounds %struct.__va_list_tag, ptr %188, i32 0, i32 2
  %199 = load ptr, ptr %198, align 8
  %200 = getelementptr i8, ptr %199, i32 8
  store ptr %200, ptr %198, align 8
  br label %201

201:                                              ; preds = %197, %192
  %202 = phi ptr [ %195, %192 ], [ %199, %197 ]
  %203 = load i32, ptr %202, align 4, !tbaa !5
  store i32 %203, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 18), align 4, !tbaa !27
  br label %309

204:                                              ; preds = %11
  %205 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %206 = getelementptr inbounds %struct.__va_list_tag, ptr %205, i32 0, i32 0
  %207 = load i32, ptr %206, align 16
  %208 = icmp ule i32 %207, 40
  br i1 %208, label %209, label %214

209:                                              ; preds = %204
  %210 = getelementptr inbounds %struct.__va_list_tag, ptr %205, i32 0, i32 3
  %211 = load ptr, ptr %210, align 16
  %212 = getelementptr i8, ptr %211, i32 %207
  %213 = add i32 %207, 8
  store i32 %213, ptr %206, align 16
  br label %218

214:                                              ; preds = %204
  %215 = getelementptr inbounds %struct.__va_list_tag, ptr %205, i32 0, i32 2
  %216 = load ptr, ptr %215, align 8
  %217 = getelementptr i8, ptr %216, i32 8
  store ptr %217, ptr %215, align 8
  br label %218

218:                                              ; preds = %214, %209
  %219 = phi ptr [ %212, %209 ], [ %216, %214 ]
  %220 = load ptr, ptr %219, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 8), ptr align 8 %220, i64 88, i1 false), !tbaa.struct !28
  br label %309

221:                                              ; preds = %11
  %222 = load ptr, ptr getelementptr inbounds (%struct.sqlite3_pcache_methods, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 8), i32 0, i32 1), align 8, !tbaa !29
  %223 = icmp eq ptr %222, null
  br i1 %223, label %224, label %225

224:                                              ; preds = %221
  call void @sqlite3PCacheSetDefault()
  br label %225

225:                                              ; preds = %224, %221
  %226 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %227 = getelementptr inbounds %struct.__va_list_tag, ptr %226, i32 0, i32 0
  %228 = load i32, ptr %227, align 16
  %229 = icmp ule i32 %228, 40
  br i1 %229, label %230, label %235

230:                                              ; preds = %225
  %231 = getelementptr inbounds %struct.__va_list_tag, ptr %226, i32 0, i32 3
  %232 = load ptr, ptr %231, align 16
  %233 = getelementptr i8, ptr %232, i32 %228
  %234 = add i32 %228, 8
  store i32 %234, ptr %227, align 16
  br label %239

235:                                              ; preds = %225
  %236 = getelementptr inbounds %struct.__va_list_tag, ptr %226, i32 0, i32 2
  %237 = load ptr, ptr %236, align 8
  %238 = getelementptr i8, ptr %237, i32 8
  store ptr %238, ptr %236, align 8
  br label %239

239:                                              ; preds = %235, %230
  %240 = phi ptr [ %233, %230 ], [ %237, %235 ]
  %241 = load ptr, ptr %240, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %241, ptr align 8 getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 8), i64 88, i1 false), !tbaa.struct !28
  br label %309

242:                                              ; preds = %11
  %243 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %244 = getelementptr inbounds %struct.__va_list_tag, ptr %243, i32 0, i32 0
  %245 = load i32, ptr %244, align 16
  %246 = icmp ule i32 %245, 40
  br i1 %246, label %247, label %252

247:                                              ; preds = %242
  %248 = getelementptr inbounds %struct.__va_list_tag, ptr %243, i32 0, i32 3
  %249 = load ptr, ptr %248, align 16
  %250 = getelementptr i8, ptr %249, i32 %245
  %251 = add i32 %245, 8
  store i32 %251, ptr %244, align 16
  br label %256

252:                                              ; preds = %242
  %253 = getelementptr inbounds %struct.__va_list_tag, ptr %243, i32 0, i32 2
  %254 = load ptr, ptr %253, align 8
  %255 = getelementptr i8, ptr %254, i32 8
  store ptr %255, ptr %253, align 8
  br label %256

256:                                              ; preds = %252, %247
  %257 = phi ptr [ %250, %247 ], [ %254, %252 ]
  %258 = load i32, ptr %257, align 4, !tbaa !5
  store i32 %258, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 4), align 8, !tbaa !30
  %259 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %260 = getelementptr inbounds %struct.__va_list_tag, ptr %259, i32 0, i32 0
  %261 = load i32, ptr %260, align 16
  %262 = icmp ule i32 %261, 40
  br i1 %262, label %263, label %268

263:                                              ; preds = %256
  %264 = getelementptr inbounds %struct.__va_list_tag, ptr %259, i32 0, i32 3
  %265 = load ptr, ptr %264, align 16
  %266 = getelementptr i8, ptr %265, i32 %261
  %267 = add i32 %261, 8
  store i32 %267, ptr %260, align 16
  br label %272

268:                                              ; preds = %256
  %269 = getelementptr inbounds %struct.__va_list_tag, ptr %259, i32 0, i32 2
  %270 = load ptr, ptr %269, align 8
  %271 = getelementptr i8, ptr %270, i32 8
  store ptr %271, ptr %269, align 8
  br label %272

272:                                              ; preds = %268, %263
  %273 = phi ptr [ %266, %263 ], [ %270, %268 ]
  %274 = load i32, ptr %273, align 4, !tbaa !5
  store i32 %274, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 5), align 4, !tbaa !31
  br label %309

275:                                              ; preds = %11
  %276 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %277 = getelementptr inbounds %struct.__va_list_tag, ptr %276, i32 0, i32 0
  %278 = load i32, ptr %277, align 16
  %279 = icmp ule i32 %278, 40
  br i1 %279, label %280, label %285

280:                                              ; preds = %275
  %281 = getelementptr inbounds %struct.__va_list_tag, ptr %276, i32 0, i32 3
  %282 = load ptr, ptr %281, align 16
  %283 = getelementptr i8, ptr %282, i32 %278
  %284 = add i32 %278, 8
  store i32 %284, ptr %277, align 16
  br label %289

285:                                              ; preds = %275
  %286 = getelementptr inbounds %struct.__va_list_tag, ptr %276, i32 0, i32 2
  %287 = load ptr, ptr %286, align 8
  %288 = getelementptr i8, ptr %287, i32 8
  store ptr %288, ptr %286, align 8
  br label %289

289:                                              ; preds = %285, %280
  %290 = phi ptr [ %283, %280 ], [ %287, %285 ]
  %291 = load ptr, ptr %290, align 8, !tbaa !17
  store ptr %291, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 28), align 8, !tbaa !32
  %292 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  %293 = getelementptr inbounds %struct.__va_list_tag, ptr %292, i32 0, i32 0
  %294 = load i32, ptr %293, align 16
  %295 = icmp ule i32 %294, 40
  br i1 %295, label %296, label %301

296:                                              ; preds = %289
  %297 = getelementptr inbounds %struct.__va_list_tag, ptr %292, i32 0, i32 3
  %298 = load ptr, ptr %297, align 16
  %299 = getelementptr i8, ptr %298, i32 %294
  %300 = add i32 %294, 8
  store i32 %300, ptr %293, align 16
  br label %305

301:                                              ; preds = %289
  %302 = getelementptr inbounds %struct.__va_list_tag, ptr %292, i32 0, i32 2
  %303 = load ptr, ptr %302, align 8
  %304 = getelementptr i8, ptr %303, i32 8
  store ptr %304, ptr %302, align 8
  br label %305

305:                                              ; preds = %301, %296
  %306 = phi ptr [ %299, %296 ], [ %303, %301 ]
  %307 = load ptr, ptr %306, align 8, !tbaa !17
  store ptr %307, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 29), align 8, !tbaa !33
  br label %309

308:                                              ; preds = %11
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %309

309:                                              ; preds = %308, %305, %272, %239, %218, %201, %152, %103, %86, %65, %48, %31, %16, %15, %14
  %310 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %4, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %310)
  %311 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %311, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %312

312:                                              ; preds = %309, %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  %313 = load i32, ptr %2, align 4
  ret i32 %313
}

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3MemSetDefault() #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3PCacheSetDefault() #1

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 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 312}
!10 = !{!"Sqlite3Config", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, i64 24, !13, i64 88, !14, i64 160, !12, i64 248, !6, i64 256, !6, i64 260, !6, i64 264, !12, i64 272, !6, i64 280, !6, i64 284, !12, i64 288, !6, i64 296, !6, i64 300, !6, i64 304, !6, i64 308, !6, i64 312, !6, i64 316, !6, i64 320, !6, i64 324, !6, i64 328, !12, i64 336, !6, i64 344, !12, i64 352, !12, i64 360}
!11 = !{!"sqlite3_mem_methods", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"sqlite3_mutex_methods", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64}
!14 = !{!"sqlite3_pcache_methods", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80}
!15 = !{!10, !6, i64 4}
!16 = !{!10, !6, i64 8}
!17 = !{!12, !12, i64 0}
!18 = !{i64 0, i64 8, !17, i64 8, i64 8, !17, i64 16, i64 8, !17, i64 24, i64 8, !17, i64 32, i64 8, !17, i64 40, i64 8, !17, i64 48, i64 8, !17, i64 56, i64 8, !17, i64 64, i64 8, !17}
!19 = !{i64 0, i64 8, !17, i64 8, i64 8, !17, i64 16, i64 8, !17, i64 24, i64 8, !17, i64 32, i64 8, !17, i64 40, i64 8, !17, i64 48, i64 8, !17, i64 56, i64 8, !17}
!20 = !{!10, !12, i64 24}
!21 = !{!10, !6, i64 0}
!22 = !{!10, !12, i64 272}
!23 = !{!10, !6, i64 280}
!24 = !{!10, !6, i64 284}
!25 = !{!10, !12, i64 288}
!26 = !{!10, !6, i64 296}
!27 = !{!10, !6, i64 300}
!28 = !{i64 0, i64 8, !17, i64 8, i64 8, !17, i64 16, i64 8, !17, i64 24, i64 8, !17, i64 32, i64 8, !17, i64 40, i64 8, !17, i64 48, i64 8, !17, i64 56, i64 8, !17, i64 64, i64 8, !17, i64 72, i64 8, !17, i64 80, i64 8, !17}
!29 = !{!10, !12, i64 168}
!30 = !{!10, !6, i64 16}
!31 = !{!10, !6, i64 20}
!32 = !{!10, !12, i64 352}
!33 = !{!10, !12, i64 360}


; 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.Sqlite3Config = type { i32, i32, i32, i32, i32, i32, %struct.sqlite3_mem_methods, %struct.sqlite3_mutex_methods, %struct.sqlite3_pcache_methods, ptr, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr }
%struct.sqlite3_mem_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_mutex_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_pcache_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }

@sqlite3Config = external hidden local_unnamed_addr global %struct.Sqlite3Config, 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
declare hidden i32 @sqlite3MisuseError(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #2

; Function Attrs: mustprogress 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) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @sqlite3_config(i32 noundef %0, ...) local_unnamed_addr #1 {
  %2 = alloca [1 x %struct.__va_list_tag], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  %3 = load i32, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 312), align 8, !tbaa !5
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %6, label %4

4:                                                ; preds = %1
  %5 = tail call i32 @sqlite3MisuseError(i32 noundef 104202)
  br label %267

6:                                                ; preds = %1
  call void @llvm.va_start.p0(ptr nonnull %2)
  switch i32 %0, label %266 [
    i32 1, label %7
    i32 2, label %8
    i32 3, label %9
    i32 10, label %10
    i32 11, label %26
    i32 4, label %42
    i32 5, label %58
    i32 9, label %78
    i32 6, label %94
    i32 7, label %134
    i32 14, label %174
    i32 15, label %190
    i32 13, label %210
    i32 16, label %238
  ]

7:                                                ; preds = %6
  store i32 0, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 4), align 4, !tbaa !14
  store i32 0, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 8), align 8, !tbaa !15
  br label %266

8:                                                ; preds = %6
  store i32 1, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 4), align 4, !tbaa !14
  store i32 0, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 8), align 8, !tbaa !15
  br label %266

9:                                                ; preds = %6
  store i32 1, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 4), align 4, !tbaa !14
  store i32 1, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 8), align 8, !tbaa !15
  br label %266

10:                                               ; preds = %6
  %11 = load i32, ptr %2, align 16
  %12 = icmp ult i32 %11, 41
  br i1 %12, label %13, label %19

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %2, i64 16
  %15 = load ptr, ptr %14, align 16
  %16 = zext nneg i32 %11 to i64
  %17 = getelementptr i8, ptr %15, i64 %16
  %18 = add nuw nsw i32 %11, 8
  store i32 %18, ptr %2, align 16
  br label %23

19:                                               ; preds = %10
  %20 = getelementptr inbounds i8, ptr %2, i64 8
  %21 = load ptr, ptr %20, align 8
  %22 = getelementptr i8, ptr %21, i64 8
  store ptr %22, ptr %20, align 8
  br label %23

23:                                               ; preds = %19, %13
  %24 = phi ptr [ %17, %13 ], [ %21, %19 ]
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) getelementptr inbounds (i8, ptr @sqlite3Config, i64 88), ptr noundef nonnull align 8 dereferenceable(72) %25, i64 72, i1 false), !tbaa.struct !17
  br label %266

26:                                               ; preds = %6
  %27 = load i32, ptr %2, align 16
  %28 = icmp ult i32 %27, 41
  br i1 %28, label %29, label %35

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %2, i64 16
  %31 = load ptr, ptr %30, align 16
  %32 = zext nneg i32 %27 to i64
  %33 = getelementptr i8, ptr %31, i64 %32
  %34 = add nuw nsw i32 %27, 8
  store i32 %34, ptr %2, align 16
  br label %39

35:                                               ; preds = %26
  %36 = getelementptr inbounds i8, ptr %2, i64 8
  %37 = load ptr, ptr %36, align 8
  %38 = getelementptr i8, ptr %37, i64 8
  store ptr %38, ptr %36, align 8
  br label %39

39:                                               ; preds = %35, %29
  %40 = phi ptr [ %33, %29 ], [ %37, %35 ]
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %41, ptr noundef nonnull align 8 dereferenceable(72) getelementptr inbounds (i8, ptr @sqlite3Config, i64 88), i64 72, i1 false), !tbaa.struct !17
  br label %266

42:                                               ; preds = %6
  %43 = load i32, ptr %2, align 16
  %44 = icmp ult i32 %43, 41
  br i1 %44, label %45, label %51

45:                                               ; preds = %42
  %46 = getelementptr inbounds i8, ptr %2, i64 16
  %47 = load ptr, ptr %46, align 16
  %48 = zext nneg i32 %43 to i64
  %49 = getelementptr i8, ptr %47, i64 %48
  %50 = add nuw nsw i32 %43, 8
  store i32 %50, ptr %2, align 16
  br label %55

51:                                               ; preds = %42
  %52 = getelementptr inbounds i8, ptr %2, i64 8
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr i8, ptr %53, i64 8
  store ptr %54, ptr %52, align 8
  br label %55

55:                                               ; preds = %51, %45
  %56 = phi ptr [ %49, %45 ], [ %53, %51 ]
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) getelementptr inbounds (i8, ptr @sqlite3Config, i64 24), ptr noundef nonnull align 8 dereferenceable(64) %57, i64 64, i1 false), !tbaa.struct !18
  br label %266

58:                                               ; preds = %6
  %59 = load ptr, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 24), align 8, !tbaa !19
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  call void @sqlite3MemSetDefault()
  br label %62

62:                                               ; preds = %61, %58
  %63 = load i32, ptr %2, align 16
  %64 = icmp ult i32 %63, 41
  br i1 %64, label %65, label %71

65:                                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %2, i64 16
  %67 = load ptr, ptr %66, align 16
  %68 = zext nneg i32 %63 to i64
  %69 = getelementptr i8, ptr %67, i64 %68
  %70 = add nuw nsw i32 %63, 8
  store i32 %70, ptr %2, align 16
  br label %75

71:                                               ; preds = %62
  %72 = getelementptr inbounds i8, ptr %2, i64 8
  %73 = load ptr, ptr %72, align 8
  %74 = getelementptr i8, ptr %73, i64 8
  store ptr %74, ptr %72, align 8
  br label %75

75:                                               ; preds = %71, %65
  %76 = phi ptr [ %69, %65 ], [ %73, %71 ]
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %77, ptr noundef nonnull align 8 dereferenceable(64) getelementptr inbounds (i8, ptr @sqlite3Config, i64 24), i64 64, i1 false), !tbaa.struct !18
  br label %266

78:                                               ; preds = %6
  %79 = load i32, ptr %2, align 16
  %80 = icmp ult i32 %79, 41
  br i1 %80, label %81, label %87

81:                                               ; preds = %78
  %82 = getelementptr inbounds i8, ptr %2, i64 16
  %83 = load ptr, ptr %82, align 16
  %84 = zext nneg i32 %79 to i64
  %85 = getelementptr i8, ptr %83, i64 %84
  %86 = add nuw nsw i32 %79, 8
  store i32 %86, ptr %2, align 16
  br label %91

87:                                               ; preds = %78
  %88 = getelementptr inbounds i8, ptr %2, i64 8
  %89 = load ptr, ptr %88, align 8
  %90 = getelementptr i8, ptr %89, i64 8
  store ptr %90, ptr %88, align 8
  br label %91

91:                                               ; preds = %87, %81
  %92 = phi ptr [ %85, %81 ], [ %89, %87 ]
  %93 = load i32, ptr %92, align 4, !tbaa !20
  store i32 %93, ptr @sqlite3Config, align 8, !tbaa !21
  br label %266

94:                                               ; preds = %6
  %95 = load i32, ptr %2, align 16
  %96 = icmp ult i32 %95, 41
  br i1 %96, label %101, label %.thread

.thread:                                          ; preds = %94
  %97 = getelementptr inbounds i8, ptr %2, i64 8
  %98 = load ptr, ptr %97, align 8
  %99 = getelementptr i8, ptr %98, i64 8
  store ptr %99, ptr %97, align 8
  %100 = load ptr, ptr %98, align 8, !tbaa !16
  store ptr %100, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 272), align 8, !tbaa !22
  br label %.thread28

101:                                              ; preds = %94
  %102 = getelementptr inbounds i8, ptr %2, i64 16
  %103 = load ptr, ptr %102, align 16
  %104 = zext nneg i32 %95 to i64
  %105 = getelementptr i8, ptr %103, i64 %104
  %106 = add nuw nsw i32 %95, 8
  store i32 %106, ptr %2, align 16
  %107 = load ptr, ptr %105, align 8, !tbaa !16
  store ptr %107, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 272), align 8, !tbaa !22
  %108 = icmp ult i32 %95, 33
  br i1 %108, label %113, label %.thread28

.thread28:                                        ; preds = %101, %.thread
  %109 = getelementptr inbounds i8, ptr %2, i64 8
  %110 = load ptr, ptr %109, align 8
  %111 = getelementptr i8, ptr %110, i64 8
  store ptr %111, ptr %109, align 8
  %112 = load i32, ptr %110, align 4, !tbaa !20
  store i32 %112, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 280), align 8, !tbaa !23
  br label %127

113:                                              ; preds = %101
  %114 = getelementptr inbounds i8, ptr %2, i64 16
  %115 = load ptr, ptr %114, align 16
  %116 = zext nneg i32 %106 to i64
  %117 = getelementptr i8, ptr %115, i64 %116
  %118 = add nuw nsw i32 %95, 16
  store i32 %118, ptr %2, align 16
  %119 = load i32, ptr %117, align 4, !tbaa !20
  store i32 %119, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 280), align 8, !tbaa !23
  %120 = icmp ult i32 %95, 25
  br i1 %120, label %121, label %127

121:                                              ; preds = %113
  %122 = getelementptr inbounds i8, ptr %2, i64 16
  %123 = load ptr, ptr %122, align 16
  %124 = zext nneg i32 %118 to i64
  %125 = getelementptr i8, ptr %123, i64 %124
  %126 = add nuw nsw i32 %95, 24
  store i32 %126, ptr %2, align 16
  br label %131

127:                                              ; preds = %.thread28, %113
  %128 = getelementptr inbounds i8, ptr %2, i64 8
  %129 = load ptr, ptr %128, align 8
  %130 = getelementptr i8, ptr %129, i64 8
  store ptr %130, ptr %128, align 8
  br label %131

131:                                              ; preds = %127, %121
  %132 = phi ptr [ %125, %121 ], [ %129, %127 ]
  %133 = load i32, ptr %132, align 4, !tbaa !20
  store i32 %133, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 284), align 4, !tbaa !24
  br label %266

134:                                              ; preds = %6
  %135 = load i32, ptr %2, align 16
  %136 = icmp ult i32 %135, 41
  br i1 %136, label %141, label %.thread29

.thread29:                                        ; preds = %134
  %137 = getelementptr inbounds i8, ptr %2, i64 8
  %138 = load ptr, ptr %137, align 8
  %139 = getelementptr i8, ptr %138, i64 8
  store ptr %139, ptr %137, align 8
  %140 = load ptr, ptr %138, align 8, !tbaa !16
  store ptr %140, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 288), align 8, !tbaa !25
  br label %.thread32

141:                                              ; preds = %134
  %142 = getelementptr inbounds i8, ptr %2, i64 16
  %143 = load ptr, ptr %142, align 16
  %144 = zext nneg i32 %135 to i64
  %145 = getelementptr i8, ptr %143, i64 %144
  %146 = add nuw nsw i32 %135, 8
  store i32 %146, ptr %2, align 16
  %147 = load ptr, ptr %145, align 8, !tbaa !16
  store ptr %147, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 288), align 8, !tbaa !25
  %148 = icmp ult i32 %135, 33
  br i1 %148, label %153, label %.thread32

.thread32:                                        ; preds = %141, %.thread29
  %149 = getelementptr inbounds i8, ptr %2, i64 8
  %150 = load ptr, ptr %149, align 8
  %151 = getelementptr i8, ptr %150, i64 8
  store ptr %151, ptr %149, align 8
  %152 = load i32, ptr %150, align 4, !tbaa !20
  store i32 %152, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 296), align 8, !tbaa !26
  br label %167

153:                                              ; preds = %141
  %154 = getelementptr inbounds i8, ptr %2, i64 16
  %155 = load ptr, ptr %154, align 16
  %156 = zext nneg i32 %146 to i64
  %157 = getelementptr i8, ptr %155, i64 %156
  %158 = add nuw nsw i32 %135, 16
  store i32 %158, ptr %2, align 16
  %159 = load i32, ptr %157, align 4, !tbaa !20
  store i32 %159, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 296), align 8, !tbaa !26
  %160 = icmp ult i32 %135, 25
  br i1 %160, label %161, label %167

161:                                              ; preds = %153
  %162 = getelementptr inbounds i8, ptr %2, i64 16
  %163 = load ptr, ptr %162, align 16
  %164 = zext nneg i32 %158 to i64
  %165 = getelementptr i8, ptr %163, i64 %164
  %166 = add nuw nsw i32 %135, 24
  store i32 %166, ptr %2, align 16
  br label %171

167:                                              ; preds = %.thread32, %153
  %168 = getelementptr inbounds i8, ptr %2, i64 8
  %169 = load ptr, ptr %168, align 8
  %170 = getelementptr i8, ptr %169, i64 8
  store ptr %170, ptr %168, align 8
  br label %171

171:                                              ; preds = %167, %161
  %172 = phi ptr [ %165, %161 ], [ %169, %167 ]
  %173 = load i32, ptr %172, align 4, !tbaa !20
  store i32 %173, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 300), align 4, !tbaa !27
  br label %266

174:                                              ; preds = %6
  %175 = load i32, ptr %2, align 16
  %176 = icmp ult i32 %175, 41
  br i1 %176, label %177, label %183

177:                                              ; preds = %174
  %178 = getelementptr inbounds i8, ptr %2, i64 16
  %179 = load ptr, ptr %178, align 16
  %180 = zext nneg i32 %175 to i64
  %181 = getelementptr i8, ptr %179, i64 %180
  %182 = add nuw nsw i32 %175, 8
  store i32 %182, ptr %2, align 16
  br label %187

183:                                              ; preds = %174
  %184 = getelementptr inbounds i8, ptr %2, i64 8
  %185 = load ptr, ptr %184, align 8
  %186 = getelementptr i8, ptr %185, i64 8
  store ptr %186, ptr %184, align 8
  br label %187

187:                                              ; preds = %183, %177
  %188 = phi ptr [ %181, %177 ], [ %185, %183 ]
  %189 = load ptr, ptr %188, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) getelementptr inbounds (i8, ptr @sqlite3Config, i64 160), ptr noundef nonnull align 8 dereferenceable(88) %189, i64 88, i1 false), !tbaa.struct !28
  br label %266

190:                                              ; preds = %6
  %191 = load ptr, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 168), align 8, !tbaa !29
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %194

193:                                              ; preds = %190
  call void @sqlite3PCacheSetDefault()
  br label %194

194:                                              ; preds = %193, %190
  %195 = load i32, ptr %2, align 16
  %196 = icmp ult i32 %195, 41
  br i1 %196, label %197, label %203

197:                                              ; preds = %194
  %198 = getelementptr inbounds i8, ptr %2, i64 16
  %199 = load ptr, ptr %198, align 16
  %200 = zext nneg i32 %195 to i64
  %201 = getelementptr i8, ptr %199, i64 %200
  %202 = add nuw nsw i32 %195, 8
  store i32 %202, ptr %2, align 16
  br label %207

203:                                              ; preds = %194
  %204 = getelementptr inbounds i8, ptr %2, i64 8
  %205 = load ptr, ptr %204, align 8
  %206 = getelementptr i8, ptr %205, i64 8
  store ptr %206, ptr %204, align 8
  br label %207

207:                                              ; preds = %203, %197
  %208 = phi ptr [ %201, %197 ], [ %205, %203 ]
  %209 = load ptr, ptr %208, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %209, ptr noundef nonnull align 8 dereferenceable(88) getelementptr inbounds (i8, ptr @sqlite3Config, i64 160), i64 88, i1 false), !tbaa.struct !28
  br label %266

210:                                              ; preds = %6
  %211 = load i32, ptr %2, align 16
  %212 = icmp ult i32 %211, 41
  br i1 %212, label %217, label %.thread33

.thread33:                                        ; preds = %210
  %213 = getelementptr inbounds i8, ptr %2, i64 8
  %214 = load ptr, ptr %213, align 8
  %215 = getelementptr i8, ptr %214, i64 8
  store ptr %215, ptr %213, align 8
  %216 = load i32, ptr %214, align 4, !tbaa !20
  store i32 %216, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 16), align 8, !tbaa !30
  br label %231

217:                                              ; preds = %210
  %218 = getelementptr inbounds i8, ptr %2, i64 16
  %219 = load ptr, ptr %218, align 16
  %220 = zext nneg i32 %211 to i64
  %221 = getelementptr i8, ptr %219, i64 %220
  %222 = add nuw nsw i32 %211, 8
  store i32 %222, ptr %2, align 16
  %223 = load i32, ptr %221, align 4, !tbaa !20
  store i32 %223, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 16), align 8, !tbaa !30
  %224 = icmp ult i32 %211, 33
  br i1 %224, label %225, label %231

225:                                              ; preds = %217
  %226 = getelementptr inbounds i8, ptr %2, i64 16
  %227 = load ptr, ptr %226, align 16
  %228 = zext nneg i32 %222 to i64
  %229 = getelementptr i8, ptr %227, i64 %228
  %230 = add nuw nsw i32 %211, 16
  store i32 %230, ptr %2, align 16
  br label %235

231:                                              ; preds = %.thread33, %217
  %232 = getelementptr inbounds i8, ptr %2, i64 8
  %233 = load ptr, ptr %232, align 8
  %234 = getelementptr i8, ptr %233, i64 8
  store ptr %234, ptr %232, align 8
  br label %235

235:                                              ; preds = %231, %225
  %236 = phi ptr [ %229, %225 ], [ %233, %231 ]
  %237 = load i32, ptr %236, align 4, !tbaa !20
  store i32 %237, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 20), align 4, !tbaa !31
  br label %266

238:                                              ; preds = %6
  %239 = load i32, ptr %2, align 16
  %240 = icmp ult i32 %239, 41
  br i1 %240, label %245, label %.thread34

.thread34:                                        ; preds = %238
  %241 = getelementptr inbounds i8, ptr %2, i64 8
  %242 = load ptr, ptr %241, align 8
  %243 = getelementptr i8, ptr %242, i64 8
  store ptr %243, ptr %241, align 8
  %244 = load ptr, ptr %242, align 8, !tbaa !16
  store ptr %244, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 352), align 8, !tbaa !32
  br label %259

245:                                              ; preds = %238
  %246 = getelementptr inbounds i8, ptr %2, i64 16
  %247 = load ptr, ptr %246, align 16
  %248 = zext nneg i32 %239 to i64
  %249 = getelementptr i8, ptr %247, i64 %248
  %250 = add nuw nsw i32 %239, 8
  store i32 %250, ptr %2, align 16
  %251 = load ptr, ptr %249, align 8, !tbaa !16
  store ptr %251, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 352), align 8, !tbaa !32
  %252 = icmp ult i32 %239, 33
  br i1 %252, label %253, label %259

253:                                              ; preds = %245
  %254 = getelementptr inbounds i8, ptr %2, i64 16
  %255 = load ptr, ptr %254, align 16
  %256 = zext nneg i32 %250 to i64
  %257 = getelementptr i8, ptr %255, i64 %256
  %258 = add nuw nsw i32 %239, 16
  store i32 %258, ptr %2, align 16
  br label %263

259:                                              ; preds = %.thread34, %245
  %260 = getelementptr inbounds i8, ptr %2, i64 8
  %261 = load ptr, ptr %260, align 8
  %262 = getelementptr i8, ptr %261, i64 8
  store ptr %262, ptr %260, align 8
  br label %263

263:                                              ; preds = %259, %253
  %264 = phi ptr [ %257, %253 ], [ %261, %259 ]
  %265 = load ptr, ptr %264, align 8, !tbaa !16
  store ptr %265, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 360), align 8, !tbaa !33
  br label %266

266:                                              ; preds = %6, %263, %235, %207, %187, %171, %131, %91, %75, %55, %39, %23, %9, %8, %7
  %.0 = phi i32 [ 0, %263 ], [ 0, %235 ], [ 0, %207 ], [ 0, %187 ], [ 0, %171 ], [ 0, %131 ], [ 0, %91 ], [ 0, %75 ], [ 0, %55 ], [ 0, %39 ], [ 0, %23 ], [ 0, %9 ], [ 0, %8 ], [ 0, %7 ], [ 1, %6 ]
  call void @llvm.va_end.p0(ptr nonnull %2)
  br label %267

267:                                              ; preds = %266, %4
  %.03 = phi i32 [ %5, %4 ], [ %.0, %266 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret i32 %.03
}

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3MemSetDefault() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3PCacheSetDefault() local_unnamed_addr #1

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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 312}
!6 = !{!"Sqlite3Config", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !12, i64 88, !13, i64 160, !11, i64 248, !7, i64 256, !7, i64 260, !7, i64 264, !11, i64 272, !7, i64 280, !7, i64 284, !11, i64 288, !7, i64 296, !7, i64 300, !7, i64 304, !7, i64 308, !7, i64 312, !7, i64 316, !7, i64 320, !7, i64 324, !7, i64 328, !11, i64 336, !7, i64 344, !11, i64 352, !11, i64 360}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"sqlite3_mem_methods", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"sqlite3_mutex_methods", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64}
!13 = !{!"sqlite3_pcache_methods", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80}
!14 = !{!6, !7, i64 4}
!15 = !{!6, !7, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{i64 0, i64 8, !16, i64 8, i64 8, !16, i64 16, i64 8, !16, i64 24, i64 8, !16, i64 32, i64 8, !16, i64 40, i64 8, !16, i64 48, i64 8, !16, i64 56, i64 8, !16, i64 64, i64 8, !16}
!18 = !{i64 0, i64 8, !16, i64 8, i64 8, !16, i64 16, i64 8, !16, i64 24, i64 8, !16, i64 32, i64 8, !16, i64 40, i64 8, !16, i64 48, i64 8, !16, i64 56, i64 8, !16}
!19 = !{!6, !11, i64 24}
!20 = !{!7, !7, i64 0}
!21 = !{!6, !7, i64 0}
!22 = !{!6, !11, i64 272}
!23 = !{!6, !7, i64 280}
!24 = !{!6, !7, i64 284}
!25 = !{!6, !11, i64 288}
!26 = !{!6, !7, i64 296}
!27 = !{!6, !7, i64 300}
!28 = !{i64 0, i64 8, !16, i64 8, i64 8, !16, i64 16, i64 8, !16, i64 24, i64 8, !16, i64 32, i64 8, !16, i64 40, i64 8, !16, i64 48, i64 8, !16, i64 56, i64 8, !16, i64 64, i64 8, !16, i64 72, i64 8, !16, i64 80, i64 8, !16}
!29 = !{!6, !11, i64 168}
!30 = !{!6, !7, i64 16}
!31 = !{!6, !7, i64 20}
!32 = !{!6, !11, i64 352}
!33 = !{!6, !11, i64 360}


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