; 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
@.str.305 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__.test_message = external hidden unnamed_addr constant [42 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [48 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: noreturn nounwind
declare void @abort() #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @test_message(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.message, ptr %9, i32 0, i32 1
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = call i64 @strlen(ptr noundef %11) #6
  store i64 %12, ptr %3, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !14
  br label %13

13:                                               ; preds = %139, %1
  %14 = load i64, ptr %4, align 8, !tbaa !14
  %15 = load i64, ptr %3, align 8, !tbaa !14
  %16 = icmp ult i64 %14, %15
  br i1 %16, label %17, label %142

17:                                               ; preds = %13
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.message, ptr %18, i32 0, i32 2
  %20 = load i32, ptr %19, align 8, !tbaa !15
  call void @parser_init(i32 noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.message, ptr %21, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load i64, ptr %4, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %24, i64 %25
  store ptr %26, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %27 = load i64, ptr %3, align 8, !tbaa !14
  %28 = load i64, ptr %4, align 8, !tbaa !14
  %29 = sub i64 %27, %28
  store i64 %29, ptr %8, align 8, !tbaa !14
  %30 = load i64, ptr %4, align 8, !tbaa !14
  %31 = icmp ne i64 %30, 0
  br i1 %31, label %32, label %87

32:                                               ; preds = %17
  %33 = load i32, ptr @num_messages, align 4, !tbaa !16
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  br label %37

36:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.305, ptr noundef @.str.151, i32 noundef 3513, ptr noundef @__PRETTY_FUNCTION__.test_message) #7
  unreachable

37:                                               ; preds = %35
  store i32 0, ptr getelementptr inbounds (%struct.message, ptr @messages, i32 0, i32 26), align 16, !tbaa !17
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i64, ptr %4, align 8, !tbaa !14
  %40 = call i64 @parse(ptr noundef %38, i64 noundef %39)
  store i64 %40, ptr %5, align 8, !tbaa !14
  %41 = load i32, ptr getelementptr inbounds (%struct.message, ptr @messages, i32 0, i32 26), align 16, !tbaa !17
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %58, label %43

43:                                               ; preds = %37
  %44 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 1), align 4, !tbaa !18
  %45 = zext i32 %44 to i64
  %46 = load i64, ptr %5, align 8, !tbaa !14
  %47 = icmp ne i64 %45, %46
  br i1 %47, label %48, label %58

48:                                               ; preds = %43
  %49 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 1), align 4, !tbaa !18
  %50 = zext i32 %49 to i64
  %51 = load i64, ptr %5, align 8, !tbaa !14
  %52 = icmp eq i64 %50, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  br label %55

54:                                               ; preds = %48
  call void @__assert_fail(ptr noundef @.str.306, ptr noundef @.str.151, i32 noundef 3519, ptr noundef @__PRETTY_FUNCTION__.test_message) #7
  unreachable

55:                                               ; preds = %53
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i64, ptr %5, align 8, !tbaa !14
  call void @print_error(ptr noundef %56, i64 noundef %57)
  call void @abort() #7
  unreachable

58:                                               ; preds = %43, %37
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.message, ptr %59, i32 0, i32 22
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %79

63:                                               ; preds = %58
  %64 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 5), align 4
  %65 = lshr i32 %64, 31
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %79

67:                                               ; preds = %63
  %68 = load i32, ptr @num_messages, align 4, !tbaa !16
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %70, label %79

70:                                               ; preds = %67
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = load i64, ptr %5, align 8, !tbaa !14
  %73 = getelementptr inbounds i8, ptr %71, i64 %72
  %74 = load i32, ptr @num_messages, align 4, !tbaa !16
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [5 x %struct.message], ptr @messages, i64 0, i64 %76
  %78 = getelementptr inbounds %struct.message, ptr %77, i32 0, i32 22
  store ptr %73, ptr %78, align 8, !tbaa !20
  br label %125

79:                                               ; preds = %67, %63, %58
  %80 = load i64, ptr %5, align 8, !tbaa !14
  %81 = load i64, ptr %4, align 8, !tbaa !14
  %82 = icmp ne i64 %80, %81
  br i1 %82, label %83, label %86

83:                                               ; preds = %79
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load i64, ptr %5, align 8, !tbaa !14
  call void @print_error(ptr noundef %84, i64 noundef %85)
  call void @abort() #7
  unreachable

86:                                               ; preds = %79
  br label %87

87:                                               ; preds = %86, %17
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load i64, ptr %8, align 8, !tbaa !14
  %90 = call i64 @parse(ptr noundef %88, i64 noundef %89)
  store i64 %90, ptr %5, align 8, !tbaa !14
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.message, ptr %91, i32 0, i32 22
  %93 = load ptr, ptr %92, align 8, !tbaa !20
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %108

95:                                               ; preds = %87
  %96 = load i32, ptr getelementptr inbounds (%struct.http_parser, ptr @parser, i32 0, i32 5), align 4
  %97 = lshr i32 %96, 31
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %108

99:                                               ; preds = %95
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load i64, ptr %5, align 8, !tbaa !14
  %102 = getelementptr inbounds i8, ptr %100, i64 %101
  %103 = load i32, ptr @num_messages, align 4, !tbaa !16
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [5 x %struct.message], ptr @messages, i64 0, i64 %105
  %107 = getelementptr inbounds %struct.message, ptr %106, i32 0, i32 22
  store ptr %102, ptr %107, align 8, !tbaa !20
  br label %125

108:                                              ; preds = %95, %87
  %109 = load i64, ptr %5, align 8, !tbaa !14
  %110 = load i64, ptr %8, align 8, !tbaa !14
  %111 = icmp ne i64 %109, %110
  br i1 %111, label %112, label %115

112:                                              ; preds = %108
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load i64, ptr %5, align 8, !tbaa !14
  call void @print_error(ptr noundef %113, i64 noundef %114)
  call void @abort() #7
  unreachable

115:                                              ; preds = %108
  %116 = call i64 @parse(ptr noundef null, i64 noundef 0)
  store i64 %116, ptr %5, align 8, !tbaa !14
  %117 = load i64, ptr %5, align 8, !tbaa !14
  %118 = icmp ne i64 %117, 0
  br i1 %118, label %119, label %124

119:                                              ; preds = %115
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.message, ptr %120, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = load i64, ptr %5, align 8, !tbaa !14
  call void @print_error(ptr noundef %122, i64 noundef %123)
  call void @abort() #7
  unreachable

124:                                              ; preds = %115
  br label %125

125:                                              ; preds = %124, %99, %70
  %126 = load i32, ptr @num_messages, align 4, !tbaa !16
  %127 = icmp ne i32 %126, 1
  br i1 %127, label %128, label %133

128:                                              ; preds = %125
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.message, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !21
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.307, ptr noundef %131)
  call void @abort() #7
  unreachable

133:                                              ; preds = %125
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = call i32 @message_eq(i32 noundef 0, i32 noundef 0, ptr noundef %134)
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  call void @abort() #7
  unreachable

138:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %139

139:                                              ; preds = %138
  %140 = load i64, ptr %4, align 8, !tbaa !14
  %141 = add i64 %140, 1
  store i64 %141, ptr %4, align 8, !tbaa !14
  br label %13, !llvm.loop !22

142:                                              ; preds = %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

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

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 willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { 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 = !{!12, !12, i64 0}
!15 = !{!10, !11, i64 16}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !11, i64 65696}
!18 = !{!19, !11, i64 4}
!19 = !{!"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}
!20 = !{!10, !6, i64 65680}
!21 = !{!10, !6, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; 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
@.str.305 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__.test_message = external hidden unnamed_addr constant [42 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [48 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture 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
define dso_local void @test_message(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #4
  %.not77 = icmp eq i64 %4, 0
  br i1 %.not77, label %._crit_edge, label %5

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = getelementptr inbounds i8, ptr %0, i64 65680
  %8 = load i32, ptr %6, align 8, !tbaa !13
  tail call void @parser_init(i32 noundef %8)
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = tail call i64 @parse(ptr noundef %9, i64 noundef %4)
  %11 = load ptr, ptr %7, align 8, !tbaa !14
  %.not47.peel = icmp eq ptr %11, null
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not48.peel = icmp sgt i32 %12, -1
  %or.cond55.peel = select i1 %.not47.peel, i1 true, i1 %.not48.peel
  br i1 %or.cond55.peel, label %19, label %13

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %9, i64 %10
  %15 = load i32, ptr @num_messages, align 4, !tbaa !15
  %16 = add nsw i32 %15, -1
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [5 x %struct.message], ptr @messages, i64 0, i64 %17, i32 22
  store ptr %14, ptr %18, align 8, !tbaa !14
  br label %22

19:                                               ; preds = %5
  %.not49.peel = icmp eq i64 %10, %4
  br i1 %.not49.peel, label %20, label %.loopexit101

20:                                               ; preds = %19
  %21 = tail call i64 @parse(ptr noundef null, i64 noundef 0)
  %.not50.peel = icmp eq i64 %21, 0
  br i1 %.not50.peel, label %thread-pre-split.peel, label %.loopexit102

thread-pre-split.peel:                            ; preds = %20
  %.pr.peel.pre = load i32, ptr @num_messages, align 4, !tbaa !15
  br label %22

22:                                               ; preds = %thread-pre-split.peel, %13
  %23 = phi i32 [ %.pr.peel.pre, %thread-pre-split.peel ], [ %15, %13 ]
  %.not51.peel = icmp eq i32 %23, 1
  br i1 %.not51.peel, label %24, label %.loopexit103

24:                                               ; preds = %22
  %25 = tail call i32 @message_eq(i32 noundef 0, i32 noundef 0, ptr noundef nonnull %0)
  %.not52.peel = icmp eq i32 %25, 0
  br i1 %.not52.peel, label %.loopexit104, label %26

26:                                               ; preds = %24
  %exitcond.peel.not = icmp eq i64 %4, 1
  br i1 %exitcond.peel.not, label %._crit_edge, label %.peel.next

27:                                               ; preds = %70
  %28 = add nuw i64 %.074, 1
  %exitcond.not = icmp eq i64 %28, %4
  br i1 %exitcond.not, label %._crit_edge, label %.peel.next, !llvm.loop !16

.peel.next:                                       ; preds = %26, %27
  %.074 = phi i64 [ %28, %27 ], [ 1, %26 ]
  %29 = load i32, ptr %6, align 8, !tbaa !13
  tail call void @parser_init(i32 noundef %29)
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 %.074
  %32 = sub i64 %4, %.074
  %33 = load i32, ptr @num_messages, align 4, !tbaa !15
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %.loopexit

.loopexit:                                        ; preds = %.peel.next
  tail call void @__assert_fail(ptr noundef nonnull @.str.305, ptr noundef nonnull @.str.151, i32 noundef 3513, ptr noundef nonnull @__PRETTY_FUNCTION__.test_message) #5
  unreachable

35:                                               ; preds = %.peel.next
  store i32 0, ptr getelementptr inbounds (i8, ptr @messages, i64 65696), align 16, !tbaa !19
  %36 = tail call i64 @parse(ptr noundef %30, i64 noundef %.074)
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @messages, i64 65696), align 16, !tbaa !19
  %.not43 = icmp ne i32 %37, 0
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 4), align 4
  %39 = zext i32 %38 to i64
  %.not44 = icmp eq i64 %36, %39
  %or.cond54 = select i1 %.not43, i1 true, i1 %.not44
  br i1 %or.cond54, label %40, label %.loopexit99

.loopexit99:                                      ; preds = %35
  tail call void @__assert_fail(ptr noundef nonnull @.str.306, ptr noundef nonnull @.str.151, i32 noundef 3519, ptr noundef nonnull @__PRETTY_FUNCTION__.test_message) #5
  unreachable

40:                                               ; preds = %35
  %41 = load ptr, ptr %7, align 8, !tbaa !14
  %.not45 = icmp eq ptr %41, null
  br i1 %.not45, label %52, label %42

42:                                               ; preds = %40
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %44 = icmp slt i32 %43, 0
  %45 = load i32, ptr @num_messages, align 4
  %46 = icmp sgt i32 %45, 0
  %or.cond = select i1 %44, i1 %46, i1 false
  br i1 %or.cond, label %47, label %52

47:                                               ; preds = %42
  %48 = getelementptr inbounds i8, ptr %30, i64 %36
  %49 = add nsw i32 %45, -1
  %50 = zext nneg i32 %49 to i64
  %51 = getelementptr inbounds [5 x %struct.message], ptr @messages, i64 0, i64 %50, i32 22
  store ptr %48, ptr %51, align 8, !tbaa !14
  br label %thread-pre-split

52:                                               ; preds = %42, %40
  %.not46 = icmp eq i64 %36, %.074
  br i1 %.not46, label %53, label %.loopexit100

.loopexit100:                                     ; preds = %52
  tail call void @print_error(ptr noundef %30, i64 noundef %36)
  tail call void @abort() #5
  unreachable

53:                                               ; preds = %52
  %54 = tail call i64 @parse(ptr noundef nonnull %31, i64 noundef %32)
  %55 = load ptr, ptr %7, align 8, !tbaa !14
  %.not47 = icmp eq ptr %55, null
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @parser, i64 20), align 4
  %.not48 = icmp sgt i32 %56, -1
  %or.cond55 = select i1 %.not47, i1 true, i1 %.not48
  br i1 %or.cond55, label %63, label %57

57:                                               ; preds = %53
  %58 = getelementptr inbounds i8, ptr %31, i64 %54
  %59 = load i32, ptr @num_messages, align 4, !tbaa !15
  %60 = add nsw i32 %59, -1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [5 x %struct.message], ptr @messages, i64 0, i64 %61, i32 22
  store ptr %58, ptr %62, align 8, !tbaa !14
  br label %thread-pre-split

63:                                               ; preds = %53
  %.not49 = icmp eq i64 %54, %32
  br i1 %.not49, label %64, label %.loopexit101

.loopexit101:                                     ; preds = %63, %19
  %.lcssa85 = phi ptr [ %9, %19 ], [ %31, %63 ]
  %.lcssa79 = phi i64 [ %10, %19 ], [ %54, %63 ]
  tail call void @print_error(ptr noundef %.lcssa85, i64 noundef %.lcssa79)
  tail call void @abort() #5
  unreachable

64:                                               ; preds = %63
  %65 = tail call i64 @parse(ptr noundef null, i64 noundef 0)
  %.not50 = icmp eq i64 %65, 0
  br i1 %.not50, label %.thread-pre-split_crit_edge, label %.loopexit102

.thread-pre-split_crit_edge:                      ; preds = %64
  %.pr.pre = load i32, ptr @num_messages, align 4, !tbaa !15
  br label %thread-pre-split

.loopexit102:                                     ; preds = %64, %20
  %.lcssa81 = phi i64 [ %21, %20 ], [ %65, %64 ]
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  tail call void @print_error(ptr noundef %66, i64 noundef %.lcssa81)
  tail call void @abort() #5
  unreachable

thread-pre-split:                                 ; preds = %47, %.thread-pre-split_crit_edge, %57
  %67 = phi i32 [ %59, %57 ], [ %.pr.pre, %.thread-pre-split_crit_edge ], [ %45, %47 ]
  %.not51 = icmp eq i32 %67, 1
  br i1 %.not51, label %70, label %.loopexit103

.loopexit103:                                     ; preds = %thread-pre-split, %22
  %68 = load ptr, ptr %0, align 8, !tbaa !20
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.307, ptr noundef %68)
  tail call void @abort() #5
  unreachable

70:                                               ; preds = %thread-pre-split
  %71 = tail call i32 @message_eq(i32 noundef 0, i32 noundef 0, ptr noundef nonnull %0)
  %.not52 = icmp eq i32 %71, 0
  br i1 %.not52, label %.loopexit104, label %27

.loopexit104:                                     ; preds = %70, %24
  tail call void @abort() #5
  unreachable

._crit_edge:                                      ; preds = %27, %26, %1
  ret void
}

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

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #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 = { nounwind willreturn memory(read) }
attributes #5 = { 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, !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 = !{!6, !10, i64 16}
!14 = !{!6, !7, i64 65680}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !17, !18}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.peeled.count", i32 1}
!19 = !{!6, !10, i64 65696}
!20 = !{!6, !7, i64 0}


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