; LLVM IR from jspd-group/pegit :: src (project-config)

; 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.lex = type { ptr, i64, i64, i32 }
%struct.parser_state = type { i8, i8 }
%struct.peg_env = type { i32, ptr, ptr, ptr, %struct.strbuf, ptr, i8 }
%struct.strbuf = type { i64, i64, ptr }
%struct.config_list = type { %struct.strbuf, %struct.strbuf, i64, ptr }

@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @parse_config_file(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %struct.lex, align 8
  %5 = alloca %struct.parser_state, align 1
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #5
  call void @llvm.memset.p0.i64(ptr align 1 %5, i8 0, i64 2, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !9
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.peg_env, ptr %7, i32 0, i32 4
  %9 = getelementptr inbounds %struct.strbuf, ptr %8, i32 0, i32 2
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = getelementptr inbounds %struct.lex, ptr %4, i32 0, i32 0
  store ptr %10, ptr %11, align 8, !tbaa !16
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.peg_env, ptr %12, i32 0, i32 4
  %14 = getelementptr inbounds %struct.strbuf, ptr %13, i32 0, i32 1
  %15 = load i64, ptr %14, align 8, !tbaa !18
  %16 = getelementptr inbounds %struct.lex, ptr %4, i32 0, i32 2
  store i64 %15, ptr %16, align 8, !tbaa !19
  %17 = getelementptr inbounds %struct.lex, ptr %4, i32 0, i32 1
  store i64 0, ptr %17, align 8, !tbaa !20
  br label %18

18:                                               ; preds = %116, %115, %114, %113, %99, %36, %1
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = call i32 @advance(ptr noundef %4, i32 noundef %19)
  %21 = icmp sge i32 %20, 0
  br i1 %21, label %22, label %117

22:                                               ; preds = %18
  %23 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 0
  %24 = load i8, ptr %23, align 1, !tbaa !21, !range !23, !noundef !24
  %25 = trunc i8 %24 to i1
  br i1 %25, label %28, label %26

26:                                               ; preds = %22
  %27 = call ptr @new_config_list_node()
  store ptr %27, ptr %3, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %26, %22
  %29 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 0
  %30 = load i8, ptr %29, align 1, !tbaa !21, !range !23, !noundef !24
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %42

32:                                               ; preds = %28
  %33 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 1
  %34 = load i8, ptr %33, align 1, !tbaa !25, !range !23, !noundef !24
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %42

36:                                               ; preds = %32
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.peg_env, ptr %37, i32 0, i32 3
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  call void @config_list_insert(ptr noundef %38, ptr noundef %39)
  %40 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 0
  store i8 0, ptr %40, align 1, !tbaa !21
  %41 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 1
  store i8 0, ptr %41, align 1, !tbaa !25
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %18, !llvm.loop !26

42:                                               ; preds = %32, %28
  %43 = getelementptr inbounds %struct.lex, ptr %4, i32 0, i32 3
  %44 = load i32, ptr %43, align 8, !tbaa !28
  switch i32 %44, label %116 [
    i32 0, label %45
    i32 3, label %59
    i32 1, label %101
    i32 2, label %114
    i32 4, label %115
  ]

45:                                               ; preds = %42
  br label %46

46:                                               ; preds = %45
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str.3) #5
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.4) #5
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str.5) #5
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef @.str.6) #5
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.8) #5
  call void @exit(i32 noundef 1) #6
  unreachable

57:                                               ; No predecessors!
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58, %42
  %60 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 0
  %61 = load i8, ptr %60, align 1, !tbaa !21, !range !23, !noundef !24
  %62 = trunc i8 %61 to i1
  br i1 %62, label %77, label %63

63:                                               ; preds = %59
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.3) #5
  %67 = load ptr, ptr @stderr, align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.4) #5
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.5) #5
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.6) #5
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.9) #5
  call void @exit(i32 noundef 1) #6
  unreachable

75:                                               ; No predecessors!
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76, %59
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = call i32 @read_number(ptr noundef %78, ptr noundef %4)
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %99, label %81

81:                                               ; preds = %77
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.3) #5
  %85 = load ptr, ptr @stderr, align 8, !tbaa !5
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.4) #5
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.5) #5
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.6) #5
  %91 = load ptr, ptr @stderr, align 8, !tbaa !5
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.config_list, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.strbuf, ptr %93, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !29
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.10, ptr noundef %95) #5
  call void @exit(i32 noundef 1) #6
  unreachable

97:                                               ; No predecessors!
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98, %77
  %100 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 1
  store i8 1, ptr %100, align 1, !tbaa !25
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %18, !llvm.loop !26

101:                                              ; preds = %42
  %102 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 0
  %103 = load i8, ptr %102, align 1, !tbaa !21, !range !23, !noundef !24
  %104 = trunc i8 %103 to i1
  br i1 %104, label %105, label %109

105:                                              ; preds = %101
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = call i32 @parse_string(ptr noundef %106, ptr noundef %4, i32 noundef 0)
  %108 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 1
  store i8 1, ptr %108, align 1, !tbaa !25
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %113

109:                                              ; preds = %101
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = call i32 @parse_string(ptr noundef %110, ptr noundef %4, i32 noundef 1)
  %112 = getelementptr inbounds %struct.parser_state, ptr %5, i32 0, i32 0
  store i8 1, ptr %112, align 1, !tbaa !21
  br label %113

113:                                              ; preds = %109, %105
  br label %18, !llvm.loop !26

114:                                              ; preds = %42
  call void @consume(ptr noundef %4, i64 noundef 1)
  br label %18, !llvm.loop !26

115:                                              ; preds = %42
  call void @consume_comment(ptr noundef %4)
  br label %18, !llvm.loop !26

116:                                              ; preds = %42
  br label %18, !llvm.loop !26

117:                                              ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret i32 0
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"peg_env", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !6, i64 56, !15, i64 64}
!13 = !{!"strbuf", !14, i64 0, !14, i64 8, !6, i64 16}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"lex", !6, i64 0, !14, i64 8, !14, i64 16, !10, i64 24}
!18 = !{!12, !14, i64 40}
!19 = !{!17, !14, i64 16}
!20 = !{!17, !14, i64 8}
!21 = !{!22, !15, i64 0}
!22 = !{!"parser_state", !15, i64 0, !15, i64 1}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!22, !15, i64 1}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!17, !10, i64 24}
!29 = !{!30, !6, i64 16}
!30 = !{!"config_list", !13, i64 0, !13, i64 24, !14, i64 48, !6, i64 56}


; 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.lex = type { ptr, i64, i64, i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @parse_config_file(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca %struct.lex, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  %3 = getelementptr inbounds i8, ptr %2, i64 24
  store i64 0, ptr %3, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 48
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %5, ptr %2, align 8, !tbaa !14
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = load i64, ptr %6, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 %7, ptr %8, align 8, !tbaa !17
  %9 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 0, ptr %9, align 8, !tbaa !18
  %10 = call i32 @advance(ptr noundef nonnull %2, i32 noundef 1)
  %11 = icmp sgt i32 %10, -1
  br i1 %11, label %.lr.ph.lr.ph, label %.outer._crit_edge

.lr.ph.lr.ph:                                     ; preds = %1
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %2, i64 24
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.lr.ph, %.outer.backedge
  %.0.ph36 = phi i32 [ 1, %.lr.ph.lr.ph ], [ %.0.ph.be, %.outer.backedge ]
  %.sroa.9.0.ph35 = phi i1 [ false, %.lr.ph.lr.ph ], [ %.sroa.9.0.ph.be, %.outer.backedge ]
  %.sroa.0.0.ph34 = phi i1 [ false, %.lr.ph.lr.ph ], [ %.sroa.0.0.ph.be, %.outer.backedge ]
  %.014.ph33 = phi ptr [ null, %.lr.ph.lr.ph ], [ %.11518, %.outer.backedge ]
  br i1 %.sroa.0.0.ph34, label %14, label %.loopexit51

14:                                               ; preds = %.lr.ph
  br i1 %.sroa.9.0.ph35, label %15, label %.loopexit

15:                                               ; preds = %14
  call void @config_list_insert(ptr noundef nonnull %12, ptr noundef %.014.ph33)
  %16 = call i32 @advance(ptr noundef nonnull %2, i32 noundef 1)
  %17 = icmp sgt i32 %16, -1
  br i1 %17, label %.loopexit51, label %.outer._crit_edge

.loopexit51:                                      ; preds = %15, %.lr.ph
  %.032.lcssa = phi i32 [ %.0.ph36, %.lr.ph ], [ 1, %15 ]
  %.sroa.9.031.lcssa = phi i1 [ %.sroa.9.0.ph35, %.lr.ph ], [ false, %15 ]
  %18 = call ptr @new_config_list_node()
  br label %.loopexit

.loopexit:                                        ; preds = %14, %.loopexit51
  %.03246 = phi i32 [ %.032.lcssa, %.loopexit51 ], [ %.0.ph36, %14 ]
  %.sroa.9.03143 = phi i1 [ %.sroa.9.031.lcssa, %.loopexit51 ], [ false, %14 ]
  %.sroa.0.03040 = phi i1 [ false, %.loopexit51 ], [ true, %14 ]
  %.11518 = phi ptr [ %18, %.loopexit51 ], [ %.014.ph33, %14 ]
  %19 = load i32, ptr %13, align 8, !tbaa !19
  switch i32 %19, label %.outer.backedge [
    i32 0, label %22
    i32 3, label %33
    i32 1, label %60
    i32 2, label %65
    i32 4, label %66
  ]

.outer.backedge:                                  ; preds = %61, %63, %.loopexit, %66, %65, %45
  %.sroa.0.0.ph.be = phi i1 [ true, %45 ], [ %.sroa.0.03040, %65 ], [ %.sroa.0.03040, %66 ], [ %.sroa.0.03040, %.loopexit ], [ true, %61 ], [ true, %63 ]
  %.sroa.9.0.ph.be = phi i1 [ true, %45 ], [ %.sroa.9.03143, %65 ], [ %.sroa.9.03143, %66 ], [ %.sroa.9.03143, %.loopexit ], [ true, %61 ], [ %.sroa.9.03143, %63 ]
  %.0.ph.be = phi i32 [ 0, %45 ], [ %.03246, %65 ], [ %.03246, %66 ], [ %.03246, %.loopexit ], [ 0, %61 ], [ %.03246, %63 ]
  %20 = call i32 @advance(ptr noundef nonnull %2, i32 noundef %.0.ph.be)
  %21 = icmp sgt i32 %20, -1
  br i1 %21, label %.lr.ph, label %.outer._crit_edge, !llvm.loop !20

22:                                               ; preds = %.loopexit
  %23 = load ptr, ptr @stderr, align 8, !tbaa !22
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.3) #5
  %25 = load ptr, ptr @stderr, align 8, !tbaa !22
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.4) #5
  %27 = load ptr, ptr @stderr, align 8, !tbaa !22
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.5) #5
  %29 = load ptr, ptr @stderr, align 8, !tbaa !22
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.6) #5
  %31 = load ptr, ptr @stderr, align 8, !tbaa !22
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.8) #5
  call void @exit(i32 noundef 1) #6
  unreachable

33:                                               ; preds = %.loopexit
  br i1 %.sroa.0.03040, label %45, label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr @stderr, align 8, !tbaa !22
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.3) #5
  %37 = load ptr, ptr @stderr, align 8, !tbaa !22
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.4) #5
  %39 = load ptr, ptr @stderr, align 8, !tbaa !22
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.5) #5
  %41 = load ptr, ptr @stderr, align 8, !tbaa !22
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.6) #5
  %43 = load ptr, ptr @stderr, align 8, !tbaa !22
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.9) #5
  call void @exit(i32 noundef 1) #6
  unreachable

45:                                               ; preds = %33
  %46 = call i32 @read_number(ptr noundef %.11518, ptr noundef nonnull %2)
  %.not = icmp eq i32 %46, 0
  br i1 %.not, label %47, label %.outer.backedge

47:                                               ; preds = %45
  %48 = load ptr, ptr @stderr, align 8, !tbaa !22
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.3) #5
  %50 = load ptr, ptr @stderr, align 8, !tbaa !22
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.4) #5
  %52 = load ptr, ptr @stderr, align 8, !tbaa !22
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.5) #5
  %54 = load ptr, ptr @stderr, align 8, !tbaa !22
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.6) #5
  %56 = load ptr, ptr @stderr, align 8, !tbaa !22
  %57 = getelementptr inbounds i8, ptr %.11518, i64 16
  %58 = load ptr, ptr %57, align 8, !tbaa !23
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.10, ptr noundef %58) #5
  call void @exit(i32 noundef 1) #6
  unreachable

60:                                               ; preds = %.loopexit
  br i1 %.sroa.0.03040, label %61, label %63

61:                                               ; preds = %60
  %62 = call i32 @parse_string(ptr noundef %.11518, ptr noundef nonnull %2, i32 noundef 0)
  br label %.outer.backedge

63:                                               ; preds = %60
  %64 = call i32 @parse_string(ptr noundef %.11518, ptr noundef nonnull %2, i32 noundef 1)
  br label %.outer.backedge

65:                                               ; preds = %.loopexit
  call void @consume(ptr noundef nonnull %2, i64 noundef 1)
  br label %.outer.backedge

66:                                               ; preds = %.loopexit
  call void @consume_comment(ptr noundef nonnull %2)
  br label %.outer.backedge

.outer._crit_edge:                                ; preds = %.outer.backedge, %15, %1
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  ret i32 0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { nounwind }
attributes #5 = { cold nounwind }
attributes #6 = { 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, !10, i64 48}
!6 = !{!"peg_env", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !10, i64 56, !13, i64 64}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"strbuf", !12, i64 0, !12, i64 8, !10, i64 16}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"lex", !10, i64 0, !12, i64 8, !12, i64 16, !7, i64 24}
!16 = !{!6, !12, i64 40}
!17 = !{!15, !12, i64 16}
!18 = !{!15, !12, i64 8}
!19 = !{!15, !7, i64 24}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !10, i64 0}
!23 = !{!24, !10, i64 16}
!24 = !{!"config_list", !11, i64 0, !11, i64 24, !12, i64 48, !10, i64 56}


; Effective O3 passes: AggressiveInstCombinePass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass