; LLVM IR from ohler55/agoo :: ext/agoo (page)

; 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._cache = type { [1024 x ptr], [1024 x ptr], [64 x ptr], ptr, ptr, ptr }
%struct._agooPage = type { ptr, ptr, i64, double, i8 }

@.str.3 = external hidden unnamed_addr constant [62 x i8], align 1
@cache = external hidden global %struct._cache, align 8
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #1

; 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 dso_local ptr @cache_get(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @cache_root_get(ptr noundef, i32 noundef) #2

declare i32 @agoo_err_set(ptr noundef, i32 noundef, ptr noundef, ...) #3

declare i32 @agoo_err_memory(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @agoo_page_destroy(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @agoo_page_create(ptr noundef) #2

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

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

26:                                               ; preds = %4
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %306

27:                                               ; preds = %4
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = icmp ne ptr null, %28
  br i1 %29, label %30, label %168

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 2048, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %31 = getelementptr inbounds [2048 x i8], ptr %12, i64 0, i64 0
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call ptr @stpcpy(ptr noundef %31, ptr noundef %32) #5
  store ptr %33, ptr %13, align 8, !tbaa !5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = call ptr @strstr(ptr noundef %34, ptr noundef @.str.13) #6
  %36 = icmp ne ptr null, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %30
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %165

38:                                               ; preds = %30
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = load ptr, ptr %13, align 8, !tbaa !5
  %42 = getelementptr inbounds [2048 x i8], ptr %12, i64 0, i64 0
  %43 = ptrtoint ptr %41 to i64
  %44 = ptrtoint ptr %42 to i64
  %45 = sub i64 %43, %44
  %46 = add nsw i64 %40, %45
  %47 = icmp sle i64 2048, %46
  br i1 %47, label %48, label %51

48:                                               ; preds = %38
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = call i32 @agoo_err_memory(ptr noundef %49, ptr noundef @.str.14, ptr noundef @.str.3, i32 noundef 803)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %165

51:                                               ; preds = %38
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 -1
  %54 = load i8, ptr %53, align 1, !tbaa !11
  %55 = sext i8 %54 to i32
  %56 = icmp ne i32 47, %55
  br i1 %56, label %57, label %65

57:                                               ; preds = %51
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = sext i8 %59 to i32
  %61 = icmp ne i32 47, %60
  br i1 %61, label %62, label %65

62:                                               ; preds = %57
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i32 1
  store ptr %64, ptr %13, align 8, !tbaa !5
  store i8 47, ptr %63, align 1, !tbaa !11
  br label %65

65:                                               ; preds = %62, %57, %51
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load i32, ptr %8, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = call ptr @memchr(ptr noundef %66, i32 noundef 37, i64 noundef %68) #6
  %70 = icmp ne ptr null, %69
  br i1 %70, label %71, label %103

71:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %72, i64 %74
  store ptr %75, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %76, ptr %15, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %99, %71
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = icmp ult ptr %78, %79
  br i1 %80, label %81, label %102

81:                                               ; preds = %77
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = load i8, ptr %82, align 1, !tbaa !11
  %84 = sext i8 %83 to i32
  %85 = icmp ne i32 37, %84
  br i1 %85, label %86, label %91

86:                                               ; preds = %81
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %13, align 8, !tbaa !5
  store i8 %88, ptr %89, align 1, !tbaa !11
  br label %99

91:                                               ; preds = %81
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 1
  %94 = call signext i8 @parse_percent_seq(ptr noundef %93)
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = getelementptr inbounds i8, ptr %95, i32 1
  store ptr %96, ptr %13, align 8, !tbaa !5
  store i8 %94, ptr %95, align 1, !tbaa !11
  %97 = load ptr, ptr %15, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 2
  store ptr %98, ptr %15, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %91, %86
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i32 1
  store ptr %101, ptr %15, align 8, !tbaa !5
  br label %77, !llvm.loop !12

102:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %113

103:                                              ; preds = %65
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = call ptr @strncpy(ptr noundef %104, ptr noundef %105, i64 noundef %107) #5
  %109 = load i32, ptr %8, align 4, !tbaa !9
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = sext i32 %109 to i64
  %112 = getelementptr inbounds i8, ptr %110, i64 %111
  store ptr %112, ptr %13, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %103, %102
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  store i8 0, ptr %114, align 1, !tbaa !11
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = getelementptr inbounds [2048 x i8], ptr %12, i64 0, i64 0
  %117 = ptrtoint ptr %115 to i64
  %118 = ptrtoint ptr %116 to i64
  %119 = sub i64 %117, %118
  %120 = trunc i64 %119 to i32
  store i32 %120, ptr %8, align 4, !tbaa !9
  %121 = getelementptr inbounds [2048 x i8], ptr %12, i64 0, i64 0
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = call ptr @cache_root_get(ptr noundef %121, i32 noundef %122)
  store ptr %123, ptr %10, align 8, !tbaa !5
  %124 = icmp eq ptr null, %123
  br i1 %124, label %125, label %160

125:                                              ; preds = %113
  %126 = load ptr, ptr getelementptr inbounds (%struct._cache, ptr @cache, i32 0, i32 3), align 8, !tbaa !14
  %127 = icmp ne ptr null, %126
  br i1 %127, label %128, label %159

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %129 = getelementptr inbounds [2048 x i8], ptr %12, i64 0, i64 0
  %130 = call ptr @agoo_page_create(ptr noundef %129)
  store ptr %130, ptr %10, align 8, !tbaa !5
  %131 = icmp eq ptr null, %130
  br i1 %131, label %132, label %135

132:                                              ; preds = %128
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = call i32 @agoo_err_memory(ptr noundef %133, ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 833)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %156

135:                                              ; preds = %128
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = call zeroext i1 @update_contents(ptr noundef %136)
  br i1 %137, label %138, label %143

138:                                              ; preds = %135
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._agooPage, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !16
  %142 = icmp eq ptr null, %141
  br i1 %142, label %143, label %147

143:                                              ; preds = %138, %135
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  call void @agoo_page_destroy(ptr noundef %144)
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = call i32 (ptr, i32, ptr, ...) @agoo_err_set(ptr noundef %145, i32 noundef 305, ptr noundef @.str.15)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %156

147:                                              ; preds = %138
  %148 = getelementptr inbounds [2048 x i8], ptr %12, i64 0, i64 0
  %149 = load i32, ptr %8, align 4, !tbaa !9
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = call ptr @cache_root_set(ptr noundef %148, i32 noundef %149, ptr noundef %150)
  store ptr %151, ptr %16, align 8, !tbaa !5
  %152 = icmp ne ptr null, %151
  br i1 %152, label %153, label %155

153:                                              ; preds = %147
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  call void @agoo_page_destroy(ptr noundef %154)
  br label %155

155:                                              ; preds = %153, %147
  store i32 0, ptr %11, align 4
  br label %156

156:                                              ; preds = %155, %143, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %157 = load i32, ptr %11, align 4
  switch i32 %157, label %165 [
    i32 0, label %158
  ]

158:                                              ; preds = %156
  br label %159

159:                                              ; preds = %158, %125
  br label %164

160:                                              ; preds = %113
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = load ptr, ptr %10, align 8, !tbaa !5
  %163 = call ptr @page_check(ptr noundef %161, ptr noundef %162)
  store ptr %163, ptr %10, align 8, !tbaa !5
  br label %164

164:                                              ; preds = %160, %159
  store i32 0, ptr %11, align 4
  br label %165

165:                                              ; preds = %164, %156, %48, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %12) #5
  %166 = load i32, ptr %11, align 4
  switch i32 %166, label %306 [
    i32 0, label %167
  ]

167:                                              ; preds = %165
  br label %304

168:                                              ; preds = %27
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = load i32, ptr %8, align 4, !tbaa !9
  %171 = call ptr @cache_get(ptr noundef %169, i32 noundef %170)
  store ptr %171, ptr %10, align 8, !tbaa !5
  %172 = icmp eq ptr null, %171
  br i1 %172, label %173, label %299

173:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = load i32, ptr %8, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = call ptr @memchr(ptr noundef %174, i32 noundef 37, i64 noundef %176) #6
  %178 = icmp ne ptr null, %177
  %179 = zext i1 %178 to i8
  store i8 %179, ptr %17, align 1, !tbaa !21
  %180 = load ptr, ptr getelementptr inbounds (%struct._cache, ptr @cache, i32 0, i32 3), align 8, !tbaa !14
  %181 = icmp ne ptr null, %180
  br i1 %181, label %185, label %182

182:                                              ; preds = %173
  %183 = load i8, ptr %17, align 1, !tbaa !21, !range !22, !noundef !23
  %184 = trunc i8 %183 to i1
  br i1 %184, label %185, label %295

185:                                              ; preds = %182, %173
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 2048, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %186 = getelementptr inbounds [2048 x i8], ptr %19, i64 0, i64 0
  %187 = load ptr, ptr getelementptr inbounds (%struct._cache, ptr @cache, i32 0, i32 3), align 8, !tbaa !14
  %188 = call ptr @stpcpy(ptr noundef %186, ptr noundef %187) #5
  store ptr %188, ptr %20, align 8, !tbaa !5
  %189 = load ptr, ptr %20, align 8, !tbaa !5
  %190 = getelementptr inbounds i8, ptr %189, i64 -1
  %191 = load i8, ptr %190, align 1, !tbaa !11
  %192 = sext i8 %191 to i32
  %193 = icmp ne i32 47, %192
  br i1 %193, label %194, label %202

194:                                              ; preds = %185
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = load i8, ptr %195, align 1, !tbaa !11
  %197 = sext i8 %196 to i32
  %198 = icmp ne i32 47, %197
  br i1 %198, label %199, label %202

199:                                              ; preds = %194
  %200 = load ptr, ptr %20, align 8, !tbaa !5
  %201 = getelementptr inbounds i8, ptr %200, i32 1
  store ptr %201, ptr %20, align 8, !tbaa !5
  store i8 47, ptr %200, align 1, !tbaa !11
  br label %202

202:                                              ; preds = %199, %194, %185
  %203 = load i32, ptr %8, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = load ptr, ptr %20, align 8, !tbaa !5
  %206 = getelementptr inbounds [2048 x i8], ptr %19, i64 0, i64 0
  %207 = ptrtoint ptr %205 to i64
  %208 = ptrtoint ptr %206 to i64
  %209 = sub i64 %207, %208
  %210 = add nsw i64 %204, %209
  %211 = icmp sle i64 2048, %210
  br i1 %211, label %212, label %215

212:                                              ; preds = %202
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = call i32 @agoo_err_memory(ptr noundef %213, ptr noundef @.str.14, ptr noundef @.str.3, i32 noundef 861)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %292

215:                                              ; preds = %202
  %216 = load i8, ptr %17, align 1, !tbaa !21, !range !22, !noundef !23
  %217 = trunc i8 %216 to i1
  br i1 %217, label %218, label %251

218:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %219 = load ptr, ptr %7, align 8, !tbaa !5
  %220 = load i32, ptr %8, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i8, ptr %219, i64 %221
  store ptr %222, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %223, ptr %22, align 8, !tbaa !5
  br label %224

224:                                              ; preds = %246, %218
  %225 = load ptr, ptr %22, align 8, !tbaa !5
  %226 = load ptr, ptr %21, align 8, !tbaa !5
  %227 = icmp ult ptr %225, %226
  br i1 %227, label %228, label %249

228:                                              ; preds = %224
  %229 = load ptr, ptr %22, align 8, !tbaa !5
  %230 = load i8, ptr %229, align 1, !tbaa !11
  %231 = sext i8 %230 to i32
  %232 = icmp ne i32 37, %231
  br i1 %232, label %233, label %238

233:                                              ; preds = %228
  %234 = load ptr, ptr %22, align 8, !tbaa !5
  %235 = load i8, ptr %234, align 1, !tbaa !11
  %236 = load ptr, ptr %20, align 8, !tbaa !5
  %237 = getelementptr inbounds i8, ptr %236, i32 1
  store ptr %237, ptr %20, align 8, !tbaa !5
  store i8 %235, ptr %236, align 1, !tbaa !11
  br label %246

238:                                              ; preds = %228
  %239 = load ptr, ptr %22, align 8, !tbaa !5
  %240 = getelementptr inbounds i8, ptr %239, i64 1
  %241 = call signext i8 @parse_percent_seq(ptr noundef %240)
  %242 = load ptr, ptr %20, align 8, !tbaa !5
  %243 = getelementptr inbounds i8, ptr %242, i32 1
  store ptr %243, ptr %20, align 8, !tbaa !5
  store i8 %241, ptr %242, align 1, !tbaa !11
  %244 = load ptr, ptr %22, align 8, !tbaa !5
  %245 = getelementptr inbounds i8, ptr %244, i64 2
  store ptr %245, ptr %22, align 8, !tbaa !5
  br label %246

246:                                              ; preds = %238, %233
  %247 = load ptr, ptr %22, align 8, !tbaa !5
  %248 = getelementptr inbounds i8, ptr %247, i32 1
  store ptr %248, ptr %22, align 8, !tbaa !5
  br label %224, !llvm.loop !24

249:                                              ; preds = %224
  %250 = load ptr, ptr %20, align 8, !tbaa !5
  store i8 0, ptr %250, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %261

251:                                              ; preds = %215
  %252 = load ptr, ptr %20, align 8, !tbaa !5
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  %254 = load i32, ptr %8, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = call ptr @strncpy(ptr noundef %252, ptr noundef %253, i64 noundef %255) #5
  %257 = load ptr, ptr %20, align 8, !tbaa !5
  %258 = load i32, ptr %8, align 4, !tbaa !9
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds i8, ptr %257, i64 %259
  store i8 0, ptr %260, align 1, !tbaa !11
  br label %261

261:                                              ; preds = %251, %249
  %262 = getelementptr inbounds [2048 x i8], ptr %19, i64 0, i64 0
  %263 = call ptr @agoo_page_create(ptr noundef %262)
  store ptr %263, ptr %10, align 8, !tbaa !5
  %264 = icmp eq ptr null, %263
  br i1 %264, label %265, label %268

265:                                              ; preds = %261
  %266 = load ptr, ptr %6, align 8, !tbaa !5
  %267 = call i32 @agoo_err_memory(ptr noundef %266, ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 882)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %292

268:                                              ; preds = %261
  %269 = getelementptr inbounds [2048 x i8], ptr %19, i64 0, i64 0
  %270 = call i64 @strlen(ptr noundef %269) #6
  %271 = trunc i64 %270 to i32
  store i32 %271, ptr %8, align 4, !tbaa !9
  %272 = load ptr, ptr %10, align 8, !tbaa !5
  %273 = call zeroext i1 @update_contents(ptr noundef %272)
  br i1 %273, label %274, label %279

274:                                              ; preds = %268
  %275 = load ptr, ptr %10, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct._agooPage, ptr %275, i32 0, i32 0
  %277 = load ptr, ptr %276, align 8, !tbaa !16
  %278 = icmp eq ptr null, %277
  br i1 %278, label %279, label %283

279:                                              ; preds = %274, %268
  %280 = load ptr, ptr %10, align 8, !tbaa !5
  call void @agoo_page_destroy(ptr noundef %280)
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = call i32 (ptr, i32, ptr, ...) @agoo_err_set(ptr noundef %281, i32 noundef 305, ptr noundef @.str.15)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %292

283:                                              ; preds = %274
  %284 = load ptr, ptr %7, align 8, !tbaa !5
  %285 = load i32, ptr %8, align 4, !tbaa !9
  %286 = load ptr, ptr %10, align 8, !tbaa !5
  %287 = call ptr @cache_set(ptr noundef %284, i32 noundef %285, ptr noundef %286)
  store ptr %287, ptr %18, align 8, !tbaa !5
  %288 = icmp ne ptr null, %287
  br i1 %288, label %289, label %291

289:                                              ; preds = %283
  %290 = load ptr, ptr %18, align 8, !tbaa !5
  call void @agoo_page_destroy(ptr noundef %290)
  br label %291

291:                                              ; preds = %289, %283
  store i32 0, ptr %11, align 4
  br label %292

292:                                              ; preds = %291, %279, %265, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %293 = load i32, ptr %11, align 4
  switch i32 %293, label %296 [
    i32 0, label %294
  ]

294:                                              ; preds = %292
  br label %295

295:                                              ; preds = %294, %182
  store i32 0, ptr %11, align 4
  br label %296

296:                                              ; preds = %295, %292
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  %297 = load i32, ptr %11, align 4
  switch i32 %297, label %306 [
    i32 0, label %298
  ]

298:                                              ; preds = %296
  br label %303

299:                                              ; preds = %168
  %300 = load ptr, ptr %6, align 8, !tbaa !5
  %301 = load ptr, ptr %10, align 8, !tbaa !5
  %302 = call ptr @page_check(ptr noundef %300, ptr noundef %301)
  store ptr %302, ptr %10, align 8, !tbaa !5
  br label %303

303:                                              ; preds = %299, %298
  br label %304

304:                                              ; preds = %303, %167
  %305 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %305, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %306

306:                                              ; preds = %304, %296, %165, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %307 = load ptr, ptr %5, align 8
  ret ptr %307
}

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare ptr @stpcpy(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare ptr @memchr(ptr noundef, i32 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden signext i8 @parse_percent_seq(ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @update_contents(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden ptr @page_check(ptr noundef, ptr noundef) #2

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

!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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !6, i64 16896}
!15 = !{!"_cache", !7, i64 0, !7, i64 8192, !7, i64 16384, !6, i64 16896, !6, i64 16904, !6, i64 16912}
!16 = !{!17, !6, i64 0}
!17 = !{!"_agooPage", !6, i64 0, !6, i64 8, !18, i64 16, !19, i64 24, !20, i64 32}
!18 = !{!"long", !7, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!"_Bool", !7, i64 0}
!21 = !{!20, !20, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !13}


; 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._cache = type { [1024 x ptr], [1024 x ptr], [64 x ptr], ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [62 x i8], align 1
@cache = external hidden local_unnamed_addr global %struct._cache, align 8
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1

; 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 nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

; 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 dso_local ptr @cache_get(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @cache_root_get(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @agoo_err_set(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #3

declare i32 @agoo_err_memory(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @agoo_page_create(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @agoo_page_get(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef readonly %3) local_unnamed_addr #2 {
  %5 = alloca [2048 x i8], align 16
  %6 = alloca [2048 x i8], align 16
  %7 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13) #5
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %8, label %.thread

8:                                                ; preds = %4
  %.not122 = icmp eq ptr %3, null
  br i1 %.not122, label %68, label %9

9:                                                ; preds = %8
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %5) #6
  %10 = call ptr @stpcpy(ptr noundef nonnull %5, ptr noundef nonnull %3) #6
  %11 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.13) #5
  %.not129 = icmp eq ptr %11, null
  br i1 %.not129, label %12, label %.critedge

12:                                               ; preds = %9
  %13 = sext i32 %2 to i64
  %14 = ptrtoint ptr %10 to i64
  %15 = ptrtoint ptr %5 to i64
  %16 = sub i64 %13, %15
  %17 = add i64 %16, %14
  %18 = icmp sgt i64 %17, 2047
  br i1 %18, label %19, label %21

19:                                               ; preds = %12
  %20 = call i32 @agoo_err_memory(ptr noundef %0, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.3, i32 noundef 803) #6
  br label %.critedge

21:                                               ; preds = %12
  %22 = getelementptr inbounds i8, ptr %10, i64 -1
  %23 = load i8, ptr %22, align 1, !tbaa !5
  %.not130 = icmp eq i8 %23, 47
  br i1 %.not130, label %28, label %24

24:                                               ; preds = %21
  %25 = load i8, ptr %1, align 1, !tbaa !5
  %.not131 = icmp eq i8 %25, 47
  br i1 %.not131, label %28, label %26

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %10, i64 1
  store i8 47, ptr %10, align 1, !tbaa !5
  br label %28

28:                                               ; preds = %26, %24, %21
  %.0108 = phi ptr [ %27, %26 ], [ %10, %24 ], [ %10, %21 ]
  %29 = call ptr @memchr(ptr noundef %1, i32 noundef 37, i64 noundef %13) #5
  %.not132 = icmp eq ptr %29, null
  br i1 %.not132, label %41, label %30

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %1, i64 %13
  %32 = icmp sgt i32 %2, 0
  br i1 %32, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %30, %38
  %.0106145 = phi ptr [ %39, %38 ], [ %1, %30 ]
  %.1109144 = phi ptr [ %.2110, %38 ], [ %.0108, %30 ]
  %33 = load i8, ptr %.0106145, align 1, !tbaa !5
  %.not135 = icmp eq i8 %33, 37
  br i1 %.not135, label %34, label %38

34:                                               ; preds = %.lr.ph
  %35 = getelementptr inbounds i8, ptr %.0106145, i64 1
  %36 = call signext i8 @parse_percent_seq(ptr noundef nonnull %35)
  %37 = getelementptr inbounds i8, ptr %.0106145, i64 2
  br label %38

38:                                               ; preds = %.lr.ph, %34
  %.sink = phi i8 [ %36, %34 ], [ %33, %.lr.ph ]
  %.1107 = phi ptr [ %37, %34 ], [ %.0106145, %.lr.ph ]
  store i8 %.sink, ptr %.1109144, align 1
  %.2110 = getelementptr inbounds i8, ptr %.1109144, i64 1
  %39 = getelementptr inbounds i8, ptr %.1107, i64 1
  %40 = icmp ult ptr %39, %31
  br i1 %40, label %.lr.ph, label %.loopexit, !llvm.loop !8

41:                                               ; preds = %28
  %42 = call ptr @strncpy(ptr noundef nonnull %.0108, ptr noundef %1, i64 noundef %13) #6
  %43 = getelementptr inbounds i8, ptr %.0108, i64 %13
  br label %.loopexit

.loopexit:                                        ; preds = %38, %30, %41
  %.3111 = phi ptr [ %43, %41 ], [ %.0108, %30 ], [ %.2110, %38 ]
  store i8 0, ptr %.3111, align 1, !tbaa !5
  %44 = ptrtoint ptr %.3111 to i64
  %45 = sub i64 %44, %15
  %46 = trunc i64 %45 to i32
  %47 = call ptr @cache_root_get(ptr noundef nonnull %5, i32 noundef %46)
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %66

49:                                               ; preds = %.loopexit
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 16896), align 8, !tbaa !10
  %.not133 = icmp eq ptr %50, null
  br i1 %.not133, label %.critedge.thread, label %51

51:                                               ; preds = %49
  %52 = call ptr @agoo_page_create(ptr noundef nonnull %5)
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %56

54:                                               ; preds = %51
  %55 = call i32 @agoo_err_memory(ptr noundef %0, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 833) #6
  br label %.critedge

56:                                               ; preds = %51
  %57 = call zeroext i1 @update_contents(ptr noundef nonnull %52)
  br i1 %57, label %58, label %61

58:                                               ; preds = %56
  %59 = load ptr, ptr %52, align 8, !tbaa !13
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %63

61:                                               ; preds = %58, %56
  call void @agoo_page_destroy(ptr noundef nonnull %52)
  %62 = call i32 (ptr, i32, ptr, ...) @agoo_err_set(ptr noundef %0, i32 noundef 305, ptr noundef nonnull @.str.15) #6
  br label %.critedge

63:                                               ; preds = %58
  %64 = call ptr @cache_root_set(ptr noundef nonnull %5, i32 noundef %46, ptr noundef nonnull %52)
  %.not134 = icmp eq ptr %64, null
  br i1 %.not134, label %.critedge.thread, label %65

65:                                               ; preds = %63
  call void @agoo_page_destroy(ptr noundef nonnull %64)
  br label %.critedge.thread

66:                                               ; preds = %.loopexit
  %67 = call ptr @page_check(ptr noundef %0, ptr noundef nonnull %47)
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %65, %63, %49, %66
  %.197.ph = phi ptr [ %52, %65 ], [ %52, %63 ], [ %67, %66 ], [ null, %49 ]
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %5) #6
  br label %.thread

.critedge:                                        ; preds = %54, %61, %9, %19
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %5) #6
  br label %.thread

68:                                               ; preds = %8
  %69 = tail call ptr @cache_get(ptr noundef %1, i32 noundef %2)
  %70 = icmp eq ptr %69, null
  br i1 %70, label %71, label %123

71:                                               ; preds = %68
  %72 = sext i32 %2 to i64
  %73 = tail call ptr @memchr(ptr noundef %1, i32 noundef 37, i64 noundef %72) #5
  %.not123 = icmp ne ptr %73, null
  %74 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 16896), align 8, !tbaa !10
  %.not124 = icmp ne ptr %74, null
  %brmerge = select i1 %.not124, i1 true, i1 %.not123
  br i1 %brmerge, label %75, label %.thread

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %6) #6
  %76 = call ptr @stpcpy(ptr noundef nonnull %6, ptr noundef %74) #6
  %77 = getelementptr inbounds i8, ptr %76, i64 -1
  %78 = load i8, ptr %77, align 1, !tbaa !5
  %.not125 = icmp eq i8 %78, 47
  br i1 %.not125, label %83, label %79

79:                                               ; preds = %75
  %80 = load i8, ptr %1, align 1, !tbaa !5
  %.not126 = icmp eq i8 %80, 47
  br i1 %.not126, label %83, label %81

81:                                               ; preds = %79
  %82 = getelementptr inbounds i8, ptr %76, i64 1
  store i8 47, ptr %76, align 1, !tbaa !5
  br label %83

83:                                               ; preds = %81, %79, %75
  %.093 = phi ptr [ %82, %81 ], [ %76, %79 ], [ %76, %75 ]
  %84 = ptrtoint ptr %.093 to i64
  %85 = ptrtoint ptr %6 to i64
  %86 = sub i64 %72, %85
  %87 = add i64 %86, %84
  %88 = icmp sgt i64 %87, 2047
  br i1 %88, label %89, label %91

89:                                               ; preds = %83
  %90 = call i32 @agoo_err_memory(ptr noundef %0, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.3, i32 noundef 861) #6
  br label %.thread140

91:                                               ; preds = %83
  br i1 %.not123, label %92, label %103

92:                                               ; preds = %91
  %93 = getelementptr inbounds i8, ptr %1, i64 %72
  %94 = icmp sgt i32 %2, 0
  br i1 %94, label %.lr.ph148, label %._crit_edge

.lr.ph148:                                        ; preds = %92, %100
  %.0147 = phi ptr [ %101, %100 ], [ %1, %92 ]
  %.194146 = phi ptr [ %.295, %100 ], [ %.093, %92 ]
  %95 = load i8, ptr %.0147, align 1, !tbaa !5
  %.not128 = icmp eq i8 %95, 37
  br i1 %.not128, label %96, label %100

96:                                               ; preds = %.lr.ph148
  %97 = getelementptr inbounds i8, ptr %.0147, i64 1
  %98 = call signext i8 @parse_percent_seq(ptr noundef nonnull %97)
  %99 = getelementptr inbounds i8, ptr %.0147, i64 2
  br label %100

100:                                              ; preds = %.lr.ph148, %96
  %.sink150 = phi i8 [ %98, %96 ], [ %95, %.lr.ph148 ]
  %.1 = phi ptr [ %99, %96 ], [ %.0147, %.lr.ph148 ]
  store i8 %.sink150, ptr %.194146, align 1
  %.295 = getelementptr inbounds i8, ptr %.194146, i64 1
  %101 = getelementptr inbounds i8, ptr %.1, i64 1
  %102 = icmp ult ptr %101, %93
  br i1 %102, label %.lr.ph148, label %._crit_edge, !llvm.loop !18

103:                                              ; preds = %91
  %104 = call ptr @strncpy(ptr noundef nonnull %.093, ptr noundef %1, i64 noundef %72) #6
  %105 = getelementptr inbounds i8, ptr %.093, i64 %72
  br label %._crit_edge

._crit_edge:                                      ; preds = %100, %92, %103
  %.sink151 = phi ptr [ %105, %103 ], [ %.093, %92 ], [ %.295, %100 ]
  store i8 0, ptr %.sink151, align 1, !tbaa !5
  %106 = call ptr @agoo_page_create(ptr noundef nonnull %6)
  %107 = icmp eq ptr %106, null
  br i1 %107, label %108, label %110

108:                                              ; preds = %._crit_edge
  %109 = call i32 @agoo_err_memory(ptr noundef %0, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 882) #6
  br label %.thread140

110:                                              ; preds = %._crit_edge
  %111 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #5
  %112 = trunc i64 %111 to i32
  %113 = call zeroext i1 @update_contents(ptr noundef nonnull %106)
  br i1 %113, label %114, label %117

114:                                              ; preds = %110
  %115 = load ptr, ptr %106, align 8, !tbaa !13
  %116 = icmp eq ptr %115, null
  br i1 %116, label %117, label %119

117:                                              ; preds = %114, %110
  call void @agoo_page_destroy(ptr noundef nonnull %106)
  %118 = call i32 (ptr, i32, ptr, ...) @agoo_err_set(ptr noundef %0, i32 noundef 305, ptr noundef nonnull @.str.15) #6
  br label %.thread140

119:                                              ; preds = %114
  %120 = call ptr @cache_set(ptr noundef %1, i32 noundef %112, ptr noundef nonnull %106)
  %.not127 = icmp eq ptr %120, null
  br i1 %.not127, label %122, label %121

121:                                              ; preds = %119
  call void @agoo_page_destroy(ptr noundef nonnull %120)
  br label %122

.thread140:                                       ; preds = %89, %108, %117
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %6) #6
  br label %.thread

122:                                              ; preds = %121, %119
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %6) #6
  br label %.thread

123:                                              ; preds = %68
  %124 = tail call ptr @page_check(ptr noundef %0, ptr noundef nonnull %69)
  br label %.thread

.thread:                                          ; preds = %71, %123, %.critedge.thread, %122, %.thread140, %.critedge, %4
  %.6 = phi ptr [ null, %.critedge ], [ null, %4 ], [ null, %.thread140 ], [ %106, %122 ], [ %124, %123 ], [ %.197.ph, %.critedge.thread ], [ null, %71 ]
  ret ptr %.6
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @stpcpy(ptr noalias noundef writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @memchr(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden signext i8 @parse_percent_seq(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @update_contents(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden ptr @page_check(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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: readwrite) "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 = { nounwind willreturn memory(read) }
attributes #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !12, i64 16896}
!11 = !{!"_cache", !6, i64 0, !6, i64 8192, !6, i64 16384, !12, i64 16896, !12, i64 16904, !12, i64 16912}
!12 = !{!"any pointer", !6, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_agooPage", !12, i64 0, !12, i64 8, !15, i64 16, !16, i64 24, !17, i64 32}
!15 = !{!"long", !6, i64 0}
!16 = !{!"double", !6, i64 0}
!17 = !{!"_Bool", !6, i64 0}
!18 = distinct !{!18, !9}


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