; LLVM IR from apigee/apib :: third_party/http_parser (test)

; 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.http_parser = type { i32, i32, i64, i16, i16, i32, ptr }
%struct.message = type { ptr, ptr, i32, i32, i32, [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], i64, ptr, ptr, i16, i32, i32, [13 x [2 x [2048 x i8]]], i32, i32, i32, [16 x i32], ptr, i16, i16, i32, i32, i32, i32, i32, i32 }

@.str.151 = external hidden unnamed_addr constant [76 x i8], align 1
@parser = external hidden global %struct.http_parser, align 8
@messages = external hidden global [5 x %struct.message], align 16
@num_messages = external hidden global i32, align 4
@stderr = external global ptr, align 8
@.str.305 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.343 = external hidden unnamed_addr constant [12 x i8], align 1
@stdout = external global ptr, align 8
@__PRETTY_FUNCTION__.test_scan = external hidden unnamed_addr constant [87 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.351 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.352 = external hidden unnamed_addr constant [14 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: noreturn nounwind
declare void @abort() #1

; Function Attrs: nounwind uwtable
declare dso_local void @parser_init(i32 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @count_parsed_messages(i64 noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local void @upgrade_message_fix(ptr noundef, i64 noundef, i64 noundef, ...) #2

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

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

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @test_scan(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [81920 x i8], align 16
  %8 = alloca [81920 x i8], align 16
  %9 = alloca [81920 x i8], align 16
  %10 = alloca [81920 x i8], align 16
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 81920, ptr %7) #7
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 81920, i1 false)
  call void @llvm.lifetime.start.p0(i64 81920, ptr %8) #7
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 81920, i1 false)
  call void @llvm.lifetime.start.p0(i64 81920, ptr %9) #7
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 81920, i1 false)
  call void @llvm.lifetime.start.p0(i64 81920, ptr %10) #7
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 81920, i1 false)
  %22 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.message, ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = call ptr @strcat(ptr noundef %22, ptr noundef %25) #7
  %27 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.message, ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = call ptr @strcat(ptr noundef %27, ptr noundef %30) #7
  %32 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.message, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = call ptr @strcat(ptr noundef %32, ptr noundef %35) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %37 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %38 = call i64 @strlen(ptr noundef %37) #8
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %40 = load i32, ptr %12, align 4, !tbaa !14
  %41 = sub nsw i32 %40, 1
  %42 = mul nsw i32 2, %41
  %43 = load i32, ptr %12, align 4, !tbaa !14
  %44 = sub nsw i32 %43, 2
  %45 = mul nsw i32 %42, %44
  %46 = sdiv i32 %45, 2
  store i32 %46, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = call i64 (i64, ...) @count_parsed_messages(i64 noundef 3, ptr noundef %47, ptr noundef %48, ptr noundef %49)
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr %18, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !14
  br label %52

52:                                               ; preds = %253, %3
  %53 = load i32, ptr %21, align 4, !tbaa !14
  %54 = icmp slt i32 %53, 2
  br i1 %54, label %55, label %256

55:                                               ; preds = %52
  store i32 2, ptr %20, align 4, !tbaa !14
  br label %56

56:                                               ; preds = %249, %55
  %57 = load i32, ptr %20, align 4, !tbaa !14
  %58 = load i32, ptr %12, align 4, !tbaa !14
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %60, label %252

60:                                               ; preds = %56
  store i32 1, ptr %19, align 4, !tbaa !14
  br label %61

61:                                               ; preds = %245, %60
  %62 = load i32, ptr %19, align 4, !tbaa !14
  %63 = load i32, ptr %20, align 4, !tbaa !14
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %65, label %248

65:                                               ; preds = %61
  %66 = load i32, ptr %14, align 4, !tbaa !14
  %67 = srem i32 %66, 1000
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %80

69:                                               ; preds = %65
  %70 = load i32, ptr %14, align 4, !tbaa !14
  %71 = sitofp i32 %70 to float
  %72 = fmul float 1.000000e+02, %71
  %73 = load i32, ptr %13, align 4, !tbaa !14
  %74 = sitofp i32 %73 to float
  %75 = fdiv float %72, %74
  %76 = fpext float %75 to double
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.343, double noundef %76)
  %78 = load ptr, ptr @stdout, align 8, !tbaa !5
  %79 = call i32 @fflush(ptr noundef %78)
  br label %80

80:                                               ; preds = %69, %65
  %81 = load i32, ptr %14, align 4, !tbaa !14
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %14, align 4, !tbaa !14
  %83 = load i32, ptr %21, align 4, !tbaa !14
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %86

85:                                               ; preds = %80
  br label %90

86:                                               ; preds = %80
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.message, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 8, !tbaa !15
  br label %90

90:                                               ; preds = %86, %85
  %91 = phi i32 [ 2, %85 ], [ %89, %86 ]
  call void @parser_init(i32 noundef %91)
  %92 = load i32, ptr %19, align 4, !tbaa !14
  %93 = sext i32 %92 to i64
  store i64 %93, ptr %15, align 8, !tbaa !16
  %94 = getelementptr inbounds [81920 x i8], ptr %8, i64 0, i64 0
  %95 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %96 = load i64, ptr %15, align 8, !tbaa !16
  %97 = call i64 @strlncpy(ptr noundef %94, i64 noundef 81920, ptr noundef %95, i64 noundef %96)
  %98 = load i64, ptr %15, align 8, !tbaa !16
  %99 = getelementptr inbounds [81920 x i8], ptr %8, i64 0, i64 %98
  store i8 0, ptr %99, align 1, !tbaa !17
  %100 = load i32, ptr %20, align 4, !tbaa !14
  %101 = load i32, ptr %19, align 4, !tbaa !14
  %102 = sub nsw i32 %100, %101
  %103 = sext i32 %102 to i64
  store i64 %103, ptr %16, align 8, !tbaa !16
  %104 = getelementptr inbounds [81920 x i8], ptr %9, i64 0, i64 0
  %105 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %106 = load i32, ptr %19, align 4, !tbaa !14
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %105, i64 %107
  %109 = load i64, ptr %16, align 8, !tbaa !16
  %110 = call i64 @strlncpy(ptr noundef %104, i64 noundef 81920, ptr noundef %108, i64 noundef %109)
  %111 = load i64, ptr %16, align 8, !tbaa !16
  %112 = getelementptr inbounds [81920 x i8], ptr %9, i64 0, i64 %111
  store i8 0, ptr %112, align 1, !tbaa !17
  %113 = load i32, ptr %12, align 4, !tbaa !14
  %114 = load i32, ptr %20, align 4, !tbaa !14
  %115 = sub nsw i32 %113, %114
  %116 = sext i32 %115 to i64
  store i64 %116, ptr %17, align 8, !tbaa !16
  %117 = getelementptr inbounds [81920 x i8], ptr %10, i64 0, i64 0
  %118 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %119 = load i32, ptr %20, align 4, !tbaa !14
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i8, ptr %118, i64 %120
  %122 = load i64, ptr %17, align 8, !tbaa !16
  %123 = call i64 @strlncpy(ptr noundef %117, i64 noundef 81920, ptr noundef %121, i64 noundef %122)
  %124 = load i64, ptr %17, align 8, !tbaa !16
  %125 = getelementptr inbounds [81920 x i8], ptr %10, i64 0, i64 %124
  store i8 0, ptr %125, align 1, !tbaa !17
  %126 = load i32, ptr @num_messages, align 4, !tbaa !14
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %129

128:                                              ; preds = %90
  br label %130

129:                                              ; preds = %90
  call void @__assert_fail(ptr noundef @.str.305, ptr noundef @.str.151, i32 noundef 4032, ptr noundef @__PRETTY_FUNCTION__.test_scan) #9
  unreachable

130:                                              ; preds = %128
  store i32 0, ptr getelementptr inbounds (%struct.message, ptr @messages, i32 0, i32 26), align 16, !tbaa !18
  %131 = getelementptr inbounds [81920 x i8], ptr %8, i64 0, i64 0
  %132 = load i64, ptr %15, align 8, !tbaa !16
  %133 = call i64 @parse(ptr noundef %131, i64 noundef %132)
  store i64 %133, ptr %11, align 8, !tbaa !16
  %134 = load i32, ptr getelementptr inbounds (%struct.message, ptr @messages, i32 0, i32 26), align 16, !tbaa !18
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %144, label %136

136:                                              ; preds = %130
  %137 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 1), align 4, !tbaa !19
  %138 = zext i32 %137 to i64
  %139 = load i64, ptr %11, align 8, !tbaa !16
  %140 = icmp ne i64 %138, %139
  br i1 %140, label %141, label %144

141:                                              ; preds = %136
  %142 = getelementptr inbounds [81920 x i8], ptr %8, i64 0, i64 0
  %143 = load i64, ptr %11, align 8, !tbaa !16
  call void @print_error(ptr noundef %142, i64 noundef %143)
  br label %258

144:                                              ; preds = %136, %130
  %145 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 5), align 4
  %146 = lshr i32 %145, 31
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %149

148:                                              ; preds = %144
  br label %198

149:                                              ; preds = %144
  %150 = load i64, ptr %11, align 8, !tbaa !16
  %151 = load i64, ptr %15, align 8, !tbaa !16
  %152 = icmp ne i64 %150, %151
  br i1 %152, label %153, label %156

153:                                              ; preds = %149
  %154 = getelementptr inbounds [81920 x i8], ptr %8, i64 0, i64 0
  %155 = load i64, ptr %11, align 8, !tbaa !16
  call void @print_error(ptr noundef %154, i64 noundef %155)
  br label %258

156:                                              ; preds = %149
  %157 = getelementptr inbounds [81920 x i8], ptr %9, i64 0, i64 0
  %158 = load i64, ptr %16, align 8, !tbaa !16
  %159 = call i64 @parse(ptr noundef %157, i64 noundef %158)
  %160 = load i64, ptr %11, align 8, !tbaa !16
  %161 = add i64 %160, %159
  store i64 %161, ptr %11, align 8, !tbaa !16
  %162 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 5), align 4
  %163 = lshr i32 %162, 31
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %166

165:                                              ; preds = %156
  br label %198

166:                                              ; preds = %156
  %167 = load i64, ptr %11, align 8, !tbaa !16
  %168 = load i64, ptr %15, align 8, !tbaa !16
  %169 = load i64, ptr %16, align 8, !tbaa !16
  %170 = add i64 %168, %169
  %171 = icmp ne i64 %167, %170
  br i1 %171, label %172, label %175

172:                                              ; preds = %166
  %173 = getelementptr inbounds [81920 x i8], ptr %9, i64 0, i64 0
  %174 = load i64, ptr %11, align 8, !tbaa !16
  call void @print_error(ptr noundef %173, i64 noundef %174)
  br label %258

175:                                              ; preds = %166
  %176 = getelementptr inbounds [81920 x i8], ptr %10, i64 0, i64 0
  %177 = load i64, ptr %17, align 8, !tbaa !16
  %178 = call i64 @parse(ptr noundef %176, i64 noundef %177)
  %179 = load i64, ptr %11, align 8, !tbaa !16
  %180 = add i64 %179, %178
  store i64 %180, ptr %11, align 8, !tbaa !16
  %181 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 5), align 4
  %182 = lshr i32 %181, 31
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %185

184:                                              ; preds = %175
  br label %198

185:                                              ; preds = %175
  %186 = load i64, ptr %11, align 8, !tbaa !16
  %187 = load i64, ptr %15, align 8, !tbaa !16
  %188 = load i64, ptr %16, align 8, !tbaa !16
  %189 = add i64 %187, %188
  %190 = load i64, ptr %17, align 8, !tbaa !16
  %191 = add i64 %189, %190
  %192 = icmp ne i64 %186, %191
  br i1 %192, label %193, label %196

193:                                              ; preds = %185
  %194 = getelementptr inbounds [81920 x i8], ptr %10, i64 0, i64 0
  %195 = load i64, ptr %11, align 8, !tbaa !16
  call void @print_error(ptr noundef %194, i64 noundef %195)
  br label %258

196:                                              ; preds = %185
  %197 = call i64 @parse(ptr noundef null, i64 noundef 0)
  br label %198

198:                                              ; preds = %196, %184, %165, %148
  %199 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 5), align 4
  %200 = lshr i32 %199, 31
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %202, label %208

202:                                              ; preds = %198
  %203 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 0
  %204 = load i64, ptr %11, align 8, !tbaa !16
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i64, i64, ...) @upgrade_message_fix(ptr noundef %203, i64 noundef %204, i64 noundef 3, ptr noundef %205, ptr noundef %206, ptr noundef %207)
  br label %208

208:                                              ; preds = %202, %198
  %209 = load i32, ptr %18, align 4, !tbaa !14
  %210 = load i32, ptr @num_messages, align 4, !tbaa !14
  %211 = icmp ne i32 %209, %210
  br i1 %211, label %212, label %217

212:                                              ; preds = %208
  %213 = load ptr, ptr @stderr, align 8, !tbaa !5
  %214 = load i32, ptr %18, align 4, !tbaa !14
  %215 = load i32, ptr @num_messages, align 4, !tbaa !14
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %213, ptr noundef @.str.344, i32 noundef %214, i32 noundef %215) #7
  br label %258

217:                                              ; preds = %208
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = call i32 @message_eq(i32 noundef 0, i32 noundef 0, ptr noundef %218)
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %224, label %221

221:                                              ; preds = %217
  %222 = load ptr, ptr @stderr, align 8, !tbaa !5
  %223 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %222, ptr noundef @.str.345) #7
  br label %258

224:                                              ; preds = %217
  %225 = load i32, ptr %18, align 4, !tbaa !14
  %226 = icmp sgt i32 %225, 1
  br i1 %226, label %227, label %234

227:                                              ; preds = %224
  %228 = load ptr, ptr %5, align 8, !tbaa !5
  %229 = call i32 @message_eq(i32 noundef 1, i32 noundef 0, ptr noundef %228)
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %234, label %231

231:                                              ; preds = %227
  %232 = load ptr, ptr @stderr, align 8, !tbaa !5
  %233 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %232, ptr noundef @.str.346) #7
  br label %258

234:                                              ; preds = %227, %224
  %235 = load i32, ptr %18, align 4, !tbaa !14
  %236 = icmp sgt i32 %235, 2
  br i1 %236, label %237, label %244

237:                                              ; preds = %234
  %238 = load ptr, ptr %6, align 8, !tbaa !5
  %239 = call i32 @message_eq(i32 noundef 2, i32 noundef 0, ptr noundef %238)
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %244, label %241

241:                                              ; preds = %237
  %242 = load ptr, ptr @stderr, align 8, !tbaa !5
  %243 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %242, ptr noundef @.str.347) #7
  br label %258

244:                                              ; preds = %237, %234
  br label %245

245:                                              ; preds = %244
  %246 = load i32, ptr %19, align 4, !tbaa !14
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %19, align 4, !tbaa !14
  br label %61, !llvm.loop !21

248:                                              ; preds = %61
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %20, align 4, !tbaa !14
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %20, align 4, !tbaa !14
  br label %56, !llvm.loop !23

252:                                              ; preds = %56
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %21, align 4, !tbaa !14
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %21, align 4, !tbaa !14
  br label %52, !llvm.loop !24

256:                                              ; preds = %52
  %257 = call i32 @puts(ptr noundef @.str.348)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 81920, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 81920, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 81920, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 81920, ptr %7) #7
  ret void

258:                                              ; preds = %241, %231, %221, %212, %193, %172, %153, %141
  %259 = load ptr, ptr @stderr, align 8, !tbaa !5
  %260 = load i32, ptr %19, align 4, !tbaa !14
  %261 = load i32, ptr %20, align 4, !tbaa !14
  %262 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %259, ptr noundef @.str.349, i32 noundef %260, i32 noundef %261) #7
  %263 = load ptr, ptr @stderr, align 8, !tbaa !5
  %264 = load i64, ptr %15, align 8, !tbaa !16
  %265 = trunc i64 %264 to i32
  %266 = getelementptr inbounds [81920 x i8], ptr %8, i64 0, i64 0
  %267 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %263, ptr noundef @.str.350, i32 noundef %265, ptr noundef %266) #7
  %268 = load ptr, ptr @stderr, align 8, !tbaa !5
  %269 = load i64, ptr %16, align 8, !tbaa !16
  %270 = trunc i64 %269 to i32
  %271 = getelementptr inbounds [81920 x i8], ptr %9, i64 0, i64 0
  %272 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %268, ptr noundef @.str.351, i32 noundef %270, ptr noundef %271) #7
  %273 = load ptr, ptr @stderr, align 8, !tbaa !5
  %274 = load i64, ptr %17, align 8, !tbaa !16
  %275 = trunc i64 %274 to i32
  %276 = getelementptr inbounds [81920 x i8], ptr %10, i64 0, i64 0
  %277 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %273, ptr noundef @.str.352, i32 noundef %275, ptr noundef %276) #7
  call void @abort() #9
  unreachable
}

declare i32 @fflush(ptr noundef) #6

declare i32 @puts(ptr noundef) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"message", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !7, i64 28, !7, i64 2076, !7, i64 4124, !7, i64 6172, !7, i64 8220, !7, i64 10268, !12, i64 12320, !6, i64 12328, !6, i64 12336, !13, i64 12344, !11, i64 12348, !11, i64 12352, !7, i64 12356, !11, i64 65604, !11, i64 65608, !11, i64 65612, !7, i64 65616, !6, i64 65680, !13, i64 65688, !13, i64 65690, !11, i64 65692, !11, i64 65696, !11, i64 65700, !11, i64 65704, !11, i64 65708, !11, i64 65712}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !11, i64 16}
!16 = !{!12, !12, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !11, i64 65696}
!19 = !{!20, !11, i64 4}
!20 = !{!"http_parser", !11, i64 0, !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !11, i64 3, !11, i64 3, !11, i64 4, !12, i64 8, !13, i64 16, !13, i64 18, !11, i64 20, !11, i64 22, !11, i64 23, !11, i64 23, !6, i64 24}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}


; 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.http_parser = type { i32, i32, i64, i16, i16, i32, ptr }
%struct.message = type { ptr, ptr, i32, i32, i32, [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], i64, ptr, ptr, i16, i32, i32, [13 x [2 x [2048 x i8]]], i32, i32, i32, [16 x i32], ptr, i16, i16, i32, i32, i32, i32, i32, i32 }

@.str.151 = external hidden unnamed_addr constant [76 x i8], align 1
@parser = external hidden local_unnamed_addr global %struct.http_parser, align 8
@messages = external hidden local_unnamed_addr global [5 x %struct.message], align 16
@num_messages = external hidden local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.305 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.343 = external hidden unnamed_addr constant [12 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@__PRETTY_FUNCTION__.test_scan = external hidden unnamed_addr constant [87 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.351 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.352 = external hidden unnamed_addr constant [14 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @parser_init(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local i64 @count_parsed_messages(i64 noundef, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @upgrade_message_fix(ptr noundef, i64 noundef, i64 noundef, ...) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @test_scan(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca [81920 x i8], align 16
  %5 = alloca [81920 x i8], align 16
  %6 = alloca [81920 x i8], align 16
  %7 = alloca [81920 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 81920, ptr nonnull %4) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(81920) %4, i8 0, i64 81920, i1 false)
  call void @llvm.lifetime.start.p0(i64 81920, ptr nonnull %5) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(81920) %5, i8 0, i64 81920, i1 false)
  call void @llvm.lifetime.start.p0(i64 81920, ptr nonnull %6) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(81920) %6, i8 0, i64 81920, i1 false)
  call void @llvm.lifetime.start.p0(i64 81920, ptr nonnull %7) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(81920) %7, i8 0, i64 81920, i1 false)
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %9) #7
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %12) #7
  %14 = getelementptr inbounds i8, ptr %2, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %15) #7
  %17 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #8
  %18 = trunc i64 %17 to i32
  %19 = shl i32 %18, 1
  %20 = add i32 %19, -2
  %21 = add nsw i32 %18, -2
  %22 = mul nsw i32 %20, %21
  %23 = ashr exact i32 %22, 1
  %24 = call i64 (i64, ...) @count_parsed_messages(i64 noundef 3, ptr noundef %0, ptr noundef %1, ptr noundef %2)
  %25 = trunc i64 %24 to i32
  %26 = icmp sgt i32 %18, 2
  %27 = sitofp i32 %23 to float
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = icmp sgt i32 %25, 1
  %.not104 = icmp eq i32 %25, 2
  br i1 %26, label %.preheader105.us.preheader, label %.split183.us

.preheader105.us.preheader:                       ; preds = %3
  %30 = and i64 %17, 2147483647
  %wide.trip.count309 = and i64 %17, 2147483647
  br label %.preheader.us

31:                                               ; preds = %.thread103.us
  %indvars.iv.next306 = add nuw nsw i64 %indvars.iv305, 1
  %exitcond310.not = icmp eq i64 %indvars.iv.next306, %wide.trip.count309
  br i1 %exitcond310.not, label %.preheader.us.1, label %.preheader.us, !llvm.loop !13

32:                                               ; preds = %.preheader.us, %.thread103.us
  %indvars.iv = phi i64 [ 1, %.preheader.us ], [ %indvars.iv.next, %.thread103.us ]
  %.2176.us = phi i32 [ %.1178.us, %.preheader.us ], [ %44, %.thread103.us ]
  %33 = srem i32 %.2176.us, 1000
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %43

35:                                               ; preds = %32
  %36 = sitofp i32 %.2176.us to float
  %37 = fmul float %36, 1.000000e+02
  %38 = fdiv float %37, %27
  %39 = fpext float %38 to double
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.343, double noundef %39)
  %41 = load ptr, ptr @stdout, align 8, !tbaa !15
  %42 = call i32 @fflush(ptr noundef %41)
  br label %43

43:                                               ; preds = %35, %32
  %44 = add nsw i32 %.2176.us, 1
  %45 = load i32, ptr %28, align 8, !tbaa !16
  call void @parser_init(i32 noundef %45)
  %46 = call i64 @strlncpy(ptr noundef nonnull %5, i64 noundef 81920, ptr noundef nonnull %4, i64 noundef %indvars.iv)
  %47 = getelementptr inbounds [81920 x i8], ptr %5, i64 0, i64 %indvars.iv
  store i8 0, ptr %47, align 1, !tbaa !17
  %48 = sub nsw i64 %indvars.iv305, %indvars.iv
  %49 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv
  %50 = call i64 @strlncpy(ptr noundef nonnull %6, i64 noundef 81920, ptr noundef nonnull %49, i64 noundef %48)
  %51 = getelementptr inbounds [81920 x i8], ptr %6, i64 0, i64 %48
  store i8 0, ptr %51, align 1, !tbaa !17
  %52 = call i64 @strlncpy(ptr noundef nonnull %7, i64 noundef 81920, ptr noundef nonnull %86, i64 noundef %85)
  store i8 0, ptr %87, align 1, !tbaa !17
  %53 = load i32, ptr @num_messages, align 4, !tbaa !18
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %.split185.us

55:                                               ; preds = %43
  store i32 0, ptr getelementptr inbounds (i8, ptr @messages, i64 65696), align 16, !tbaa !19
  %56 = call i64 @parse(ptr noundef nonnull %5, i64 noundef %indvars.iv)
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @messages, i64 65696), align 16, !tbaa !19
  %.not86.us = icmp ne i32 %57, 0
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 4), align 4
  %59 = zext i32 %58 to i64
  %.not87.us = icmp eq i64 %56, %59
  %or.cond.us = select i1 %.not86.us, i1 true, i1 %.not87.us
  br i1 %or.cond.us, label %60, label %.split187.us

60:                                               ; preds = %55
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not88.us = icmp sgt i32 %61, -1
  br i1 %.not88.us, label %62, label %.thread.us

62:                                               ; preds = %60
  %.not89.us = icmp eq i64 %56, %indvars.iv
  br i1 %.not89.us, label %63, label %.split193.us

63:                                               ; preds = %62
  %64 = call i64 @parse(ptr noundef nonnull %6, i64 noundef %48)
  %65 = add i64 %64, %indvars.iv
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not90.us = icmp sgt i32 %66, -1
  br i1 %.not90.us, label %67, label %.thread.us

67:                                               ; preds = %63
  %.not91.us = icmp eq i64 %65, %indvars.iv305
  br i1 %.not91.us, label %68, label %.split200.us

68:                                               ; preds = %67
  %69 = call i64 @parse(ptr noundef nonnull %7, i64 noundef %85)
  %70 = add i64 %69, %indvars.iv305
  %71 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not92.us = icmp sgt i32 %71, -1
  br i1 %.not92.us, label %72, label %.thread.us

72:                                               ; preds = %68
  %.not93.us = icmp eq i64 %70, %30
  br i1 %.not93.us, label %73, label %.split207.us

73:                                               ; preds = %72
  %74 = call i64 @parse(ptr noundef null, i64 noundef 0)
  %.pr.us = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not94.us = icmp sgt i32 %.pr.us, -1
  br i1 %.not94.us, label %75, label %.thread.us

.thread.us:                                       ; preds = %73, %68, %63, %60
  %.071102.us = phi i64 [ %30, %73 ], [ %70, %68 ], [ %65, %63 ], [ %56, %60 ]
  call void (ptr, i64, i64, ...) @upgrade_message_fix(ptr noundef nonnull %4, i64 noundef %.071102.us, i64 noundef 3, ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2)
  br label %75

75:                                               ; preds = %.thread.us, %73
  %76 = load i32, ptr @num_messages, align 4, !tbaa !18
  %.not95.us = icmp eq i32 %76, %25
  br i1 %.not95.us, label %77, label %.split214.us

77:                                               ; preds = %75
  %78 = call i32 @message_eq(i32 noundef 0, i32 noundef 0, ptr noundef nonnull %0)
  %.not96.us = icmp eq i32 %78, 0
  br i1 %.not96.us, label %.split221.us, label %79

79:                                               ; preds = %77
  br i1 %29, label %80, label %.thread103.us

80:                                               ; preds = %79
  %81 = call i32 @message_eq(i32 noundef 1, i32 noundef 0, ptr noundef %1)
  %.not97.us = icmp eq i32 %81, 0
  br i1 %.not97.us, label %.split227.us, label %82

82:                                               ; preds = %80
  br i1 %.not104, label %.thread103.us, label %83

83:                                               ; preds = %82
  %84 = call i32 @message_eq(i32 noundef 2, i32 noundef 0, ptr noundef %2)
  %.not98.us = icmp eq i32 %84, 0
  br i1 %.not98.us, label %.split233.us, label %.thread103.us

.thread103.us:                                    ; preds = %83, %82, %79
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv305
  br i1 %exitcond.not, label %31, label %32, !llvm.loop !20

.preheader.us:                                    ; preds = %.preheader105.us.preheader, %31
  %indvars.iv305 = phi i64 [ 2, %.preheader105.us.preheader ], [ %indvars.iv.next306, %31 ]
  %.1178.us = phi i32 [ 0, %.preheader105.us.preheader ], [ %44, %31 ]
  %85 = sub nsw i64 %30, %indvars.iv305
  %86 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv305
  %87 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 %85
  br label %32

.preheader.us.1:                                  ; preds = %31, %143
  %indvars.iv305.1 = phi i64 [ %indvars.iv.next306.1, %143 ], [ 2, %31 ]
  %.1178.us.1 = phi i32 [ %103, %143 ], [ %44, %31 ]
  %88 = sub nsw i64 %30, %indvars.iv305.1
  %89 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv305.1
  %90 = getelementptr inbounds [81920 x i8], ptr %7, i64 0, i64 %88
  br label %91

91:                                               ; preds = %.thread103.us.1, %.preheader.us.1
  %indvars.iv.1 = phi i64 [ 1, %.preheader.us.1 ], [ %indvars.iv.next.1, %.thread103.us.1 ]
  %.2176.us.1 = phi i32 [ %.1178.us.1, %.preheader.us.1 ], [ %103, %.thread103.us.1 ]
  %92 = srem i32 %.2176.us.1, 1000
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %102

94:                                               ; preds = %91
  %95 = sitofp i32 %.2176.us.1 to float
  %96 = fmul float %95, 1.000000e+02
  %97 = fdiv float %96, %27
  %98 = fpext float %97 to double
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.343, double noundef %98)
  %100 = load ptr, ptr @stdout, align 8, !tbaa !15
  %101 = call i32 @fflush(ptr noundef %100)
  br label %102

102:                                              ; preds = %91, %94
  %103 = add nsw i32 %.2176.us.1, 1
  call void @parser_init(i32 noundef 2)
  %104 = call i64 @strlncpy(ptr noundef nonnull %5, i64 noundef 81920, ptr noundef nonnull %4, i64 noundef %indvars.iv.1)
  %105 = getelementptr inbounds [81920 x i8], ptr %5, i64 0, i64 %indvars.iv.1
  store i8 0, ptr %105, align 1, !tbaa !17
  %106 = sub nsw i64 %indvars.iv305.1, %indvars.iv.1
  %107 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv.1
  %108 = call i64 @strlncpy(ptr noundef nonnull %6, i64 noundef 81920, ptr noundef nonnull %107, i64 noundef %106)
  %109 = getelementptr inbounds [81920 x i8], ptr %6, i64 0, i64 %106
  store i8 0, ptr %109, align 1, !tbaa !17
  %110 = call i64 @strlncpy(ptr noundef nonnull %7, i64 noundef 81920, ptr noundef nonnull %89, i64 noundef %88)
  store i8 0, ptr %90, align 1, !tbaa !17
  %111 = load i32, ptr @num_messages, align 4, !tbaa !18
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %.split185.us

113:                                              ; preds = %102
  store i32 0, ptr getelementptr inbounds (i8, ptr @messages, i64 65696), align 16, !tbaa !19
  %114 = call i64 @parse(ptr noundef nonnull %5, i64 noundef %indvars.iv.1)
  %115 = load i32, ptr getelementptr inbounds (i8, ptr @messages, i64 65696), align 16, !tbaa !19
  %.not86.us.1 = icmp ne i32 %115, 0
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 4), align 4
  %117 = zext i32 %116 to i64
  %.not87.us.1 = icmp eq i64 %114, %117
  %or.cond.us.1 = select i1 %.not86.us.1, i1 true, i1 %.not87.us.1
  br i1 %or.cond.us.1, label %118, label %.split187.us

118:                                              ; preds = %113
  %119 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not88.us.1 = icmp sgt i32 %119, -1
  br i1 %.not88.us.1, label %120, label %.thread.us.1

120:                                              ; preds = %118
  %.not89.us.1 = icmp eq i64 %114, %indvars.iv.1
  br i1 %.not89.us.1, label %121, label %.split193.us

121:                                              ; preds = %120
  %122 = call i64 @parse(ptr noundef nonnull %6, i64 noundef %106)
  %123 = add i64 %122, %indvars.iv.1
  %124 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not90.us.1 = icmp sgt i32 %124, -1
  br i1 %.not90.us.1, label %125, label %.thread.us.1

125:                                              ; preds = %121
  %.not91.us.1 = icmp eq i64 %123, %indvars.iv305.1
  br i1 %.not91.us.1, label %126, label %.split200.us

126:                                              ; preds = %125
  %127 = call i64 @parse(ptr noundef nonnull %7, i64 noundef %88)
  %128 = add i64 %127, %indvars.iv305.1
  %129 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not92.us.1 = icmp sgt i32 %129, -1
  br i1 %.not92.us.1, label %130, label %.thread.us.1

130:                                              ; preds = %126
  %.not93.us.1 = icmp eq i64 %128, %30
  br i1 %.not93.us.1, label %131, label %.split207.us

131:                                              ; preds = %130
  %132 = call i64 @parse(ptr noundef null, i64 noundef 0)
  %.pr.us.1 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not94.us.1 = icmp sgt i32 %.pr.us.1, -1
  br i1 %.not94.us.1, label %133, label %.thread.us.1

.thread.us.1:                                     ; preds = %131, %126, %121, %118
  %.071102.us.1 = phi i64 [ %30, %131 ], [ %128, %126 ], [ %123, %121 ], [ %114, %118 ]
  call void (ptr, i64, i64, ...) @upgrade_message_fix(ptr noundef nonnull %4, i64 noundef %.071102.us.1, i64 noundef 3, ptr noundef %0, ptr noundef %1, ptr noundef %2)
  br label %133

133:                                              ; preds = %.thread.us.1, %131
  %134 = load i32, ptr @num_messages, align 4, !tbaa !18
  %.not95.us.1 = icmp eq i32 %134, %25
  br i1 %.not95.us.1, label %135, label %.split214.us

135:                                              ; preds = %133
  %136 = call i32 @message_eq(i32 noundef 0, i32 noundef 0, ptr noundef %0)
  %.not96.us.1 = icmp eq i32 %136, 0
  br i1 %.not96.us.1, label %.split221.us, label %137

137:                                              ; preds = %135
  br i1 %29, label %138, label %.thread103.us.1

138:                                              ; preds = %137
  %139 = call i32 @message_eq(i32 noundef 1, i32 noundef 0, ptr noundef %1)
  %.not97.us.1 = icmp eq i32 %139, 0
  br i1 %.not97.us.1, label %.split227.us, label %140

140:                                              ; preds = %138
  br i1 %.not104, label %.thread103.us.1, label %141

141:                                              ; preds = %140
  %142 = call i32 @message_eq(i32 noundef 2, i32 noundef 0, ptr noundef %2)
  %.not98.us.1 = icmp eq i32 %142, 0
  br i1 %.not98.us.1, label %.split233.us, label %.thread103.us.1

.thread103.us.1:                                  ; preds = %141, %140, %137
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %indvars.iv305.1
  br i1 %exitcond.1.not, label %143, label %91, !llvm.loop !20

143:                                              ; preds = %.thread103.us.1
  %indvars.iv.next306.1 = add nuw nsw i64 %indvars.iv305.1, 1
  %exitcond310.1.not = icmp eq i64 %indvars.iv.next306.1, %wide.trip.count309
  br i1 %exitcond310.1.not, label %.split183.us, label %.preheader.us.1, !llvm.loop !13

.split185.us:                                     ; preds = %43, %102
  call void @__assert_fail(ptr noundef nonnull @.str.305, ptr noundef nonnull @.str.151, i32 noundef 4032, ptr noundef nonnull @__PRETTY_FUNCTION__.test_scan) #9
  unreachable

.split187.us:                                     ; preds = %55, %113
  %.069179.us.lcssa295.wide = phi i64 [ %indvars.iv305.1, %113 ], [ %indvars.iv305, %55 ]
  %.lcssa286.wide = phi i64 [ %88, %113 ], [ %85, %55 ]
  %.lcssa271 = phi i64 [ %114, %113 ], [ %56, %55 ]
  %.lcssa262.wide = phi i64 [ %106, %113 ], [ %48, %55 ]
  %.070177.us.lcssa241.wide = phi i64 [ %indvars.iv.1, %113 ], [ %indvars.iv, %55 ]
  call void @print_error(ptr noundef nonnull %5, i64 noundef %.lcssa271)
  br label %153

.split193.us:                                     ; preds = %62, %120
  %.069179.us.lcssa296.wide = phi i64 [ %indvars.iv305.1, %120 ], [ %indvars.iv305, %62 ]
  %.lcssa287.wide = phi i64 [ %88, %120 ], [ %85, %62 ]
  %.lcssa272 = phi i64 [ %114, %120 ], [ %56, %62 ]
  %.lcssa263.wide = phi i64 [ %106, %120 ], [ %48, %62 ]
  %.070177.us.lcssa242.wide = phi i64 [ %indvars.iv.1, %120 ], [ %indvars.iv, %62 ]
  call void @print_error(ptr noundef nonnull %5, i64 noundef %.lcssa272)
  br label %153

.split200.us:                                     ; preds = %67, %125
  %.069179.us.lcssa297.wide = phi i64 [ %indvars.iv305.1, %125 ], [ %indvars.iv305, %67 ]
  %.lcssa288.wide = phi i64 [ %88, %125 ], [ %85, %67 ]
  %.lcssa264.wide = phi i64 [ %106, %125 ], [ %48, %67 ]
  %.070177.us.lcssa243.wide = phi i64 [ %indvars.iv.1, %125 ], [ %indvars.iv, %67 ]
  %.lcssa = phi i64 [ %123, %125 ], [ %65, %67 ]
  call void @print_error(ptr noundef nonnull %6, i64 noundef %.lcssa)
  br label %153

.split207.us:                                     ; preds = %72, %130
  %.069179.us.lcssa298.wide = phi i64 [ %indvars.iv305.1, %130 ], [ %indvars.iv305, %72 ]
  %.lcssa289.wide = phi i64 [ %88, %130 ], [ %85, %72 ]
  %.lcssa265.wide = phi i64 [ %106, %130 ], [ %48, %72 ]
  %.070177.us.lcssa244.wide = phi i64 [ %indvars.iv.1, %130 ], [ %indvars.iv, %72 ]
  %.lcssa240 = phi i64 [ %128, %130 ], [ %70, %72 ]
  call void @print_error(ptr noundef nonnull %7, i64 noundef %.lcssa240)
  br label %153

.split214.us:                                     ; preds = %75, %133
  %.069179.us.lcssa299.wide = phi i64 [ %indvars.iv305.1, %133 ], [ %indvars.iv305, %75 ]
  %.lcssa290.wide = phi i64 [ %88, %133 ], [ %85, %75 ]
  %.lcssa280 = phi i32 [ %134, %133 ], [ %76, %75 ]
  %.lcssa266.wide = phi i64 [ %106, %133 ], [ %48, %75 ]
  %.070177.us.lcssa245.wide = phi i64 [ %indvars.iv.1, %133 ], [ %indvars.iv, %75 ]
  %144 = load ptr, ptr @stderr, align 8, !tbaa !15
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef nonnull @.str.344, i32 noundef %25, i32 noundef %.lcssa280) #10
  br label %153

.split221.us:                                     ; preds = %77, %135
  %.069179.us.lcssa300.wide = phi i64 [ %indvars.iv305.1, %135 ], [ %indvars.iv305, %77 ]
  %.lcssa291.wide = phi i64 [ %88, %135 ], [ %85, %77 ]
  %.lcssa267.wide = phi i64 [ %106, %135 ], [ %48, %77 ]
  %.070177.us.lcssa246.wide = phi i64 [ %indvars.iv.1, %135 ], [ %indvars.iv, %77 ]
  %146 = load ptr, ptr @stderr, align 8, !tbaa !15
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef nonnull @.str.345) #10
  br label %153

.split227.us:                                     ; preds = %80, %138
  %.069179.us.lcssa301.wide = phi i64 [ %indvars.iv305.1, %138 ], [ %indvars.iv305, %80 ]
  %.lcssa292.wide = phi i64 [ %88, %138 ], [ %85, %80 ]
  %.lcssa268.wide = phi i64 [ %106, %138 ], [ %48, %80 ]
  %.070177.us.lcssa247.wide = phi i64 [ %indvars.iv.1, %138 ], [ %indvars.iv, %80 ]
  %148 = load ptr, ptr @stderr, align 8, !tbaa !15
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef nonnull @.str.346) #10
  br label %153

.split233.us:                                     ; preds = %83, %141
  %.069179.us.lcssa302.wide = phi i64 [ %indvars.iv305.1, %141 ], [ %indvars.iv305, %83 ]
  %.lcssa293.wide = phi i64 [ %88, %141 ], [ %85, %83 ]
  %.lcssa269.wide = phi i64 [ %106, %141 ], [ %48, %83 ]
  %.070177.us.lcssa248.wide = phi i64 [ %indvars.iv.1, %141 ], [ %indvars.iv, %83 ]
  %150 = load ptr, ptr @stderr, align 8, !tbaa !15
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %150, ptr noundef nonnull @.str.347) #10
  br label %153

.split183.us:                                     ; preds = %143, %3
  %152 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.348)
  call void @llvm.lifetime.end.p0(i64 81920, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 81920, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 81920, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 81920, ptr nonnull %4) #7
  ret void

153:                                              ; preds = %.split233.us, %.split227.us, %.split221.us, %.split214.us, %.split207.us, %.split200.us, %.split193.us, %.split187.us
  %.069179.us304.in = phi i64 [ %.069179.us.lcssa302.wide, %.split233.us ], [ %.069179.us.lcssa301.wide, %.split227.us ], [ %.069179.us.lcssa300.wide, %.split221.us ], [ %.069179.us.lcssa299.wide, %.split214.us ], [ %.069179.us.lcssa298.wide, %.split207.us ], [ %.069179.us.lcssa297.wide, %.split200.us ], [ %.069179.us.lcssa296.wide, %.split193.us ], [ %.069179.us.lcssa295.wide, %.split187.us ]
  %.in = phi i64 [ %.lcssa293.wide, %.split233.us ], [ %.lcssa292.wide, %.split227.us ], [ %.lcssa291.wide, %.split221.us ], [ %.lcssa290.wide, %.split214.us ], [ %.lcssa289.wide, %.split207.us ], [ %.lcssa288.wide, %.split200.us ], [ %.lcssa287.wide, %.split193.us ], [ %.lcssa286.wide, %.split187.us ]
  %.in357 = phi i64 [ %.lcssa269.wide, %.split233.us ], [ %.lcssa268.wide, %.split227.us ], [ %.lcssa267.wide, %.split221.us ], [ %.lcssa266.wide, %.split214.us ], [ %.lcssa265.wide, %.split207.us ], [ %.lcssa264.wide, %.split200.us ], [ %.lcssa263.wide, %.split193.us ], [ %.lcssa262.wide, %.split187.us ]
  %.070177.us250.in = phi i64 [ %.070177.us.lcssa248.wide, %.split233.us ], [ %.070177.us.lcssa247.wide, %.split227.us ], [ %.070177.us.lcssa246.wide, %.split221.us ], [ %.070177.us.lcssa245.wide, %.split214.us ], [ %.070177.us.lcssa244.wide, %.split207.us ], [ %.070177.us.lcssa243.wide, %.split200.us ], [ %.070177.us.lcssa242.wide, %.split193.us ], [ %.070177.us.lcssa241.wide, %.split187.us ]
  %.070177.us250 = trunc i64 %.070177.us250.in to i32
  %154 = trunc i64 %.in357 to i32
  %155 = trunc i64 %.in to i32
  %.069179.us304 = trunc i64 %.069179.us304.in to i32
  %156 = load ptr, ptr @stderr, align 8, !tbaa !15
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef nonnull @.str.349, i32 noundef %.070177.us250, i32 noundef %.069179.us304) #10
  %158 = load ptr, ptr @stderr, align 8, !tbaa !15
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef nonnull @.str.350, i32 noundef %.070177.us250, ptr noundef nonnull %5) #10
  %160 = load ptr, ptr @stderr, align 8, !tbaa !15
  %161 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef nonnull @.str.351, i32 noundef %154, ptr noundef nonnull %6) #10
  %162 = load ptr, ptr @stderr, align 8, !tbaa !15
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %162, ptr noundef nonnull @.str.352, i32 noundef %155, ptr noundef nonnull %7) #10
  call void @abort() #9
  unreachable
}

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn nounwind }
attributes #10 = { cold 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 8}
!6 = !{!"message", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !8, i64 28, !8, i64 2076, !8, i64 4124, !8, i64 6172, !8, i64 8220, !8, i64 10268, !11, i64 12320, !7, i64 12328, !7, i64 12336, !12, i64 12344, !10, i64 12348, !10, i64 12352, !8, i64 12356, !10, i64 65604, !10, i64 65608, !10, i64 65612, !8, i64 65616, !7, i64 65680, !12, i64 65688, !12, i64 65690, !10, i64 65692, !10, i64 65696, !10, i64 65700, !10, i64 65704, !10, i64 65708, !10, i64 65712}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !10, i64 16}
!17 = !{!8, !8, i64 0}
!18 = !{!10, !10, i64 0}
!19 = !{!6, !10, i64 65696}
!20 = distinct !{!20, !14}


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