; LLVM IR from ponylang/ponyc :: src/libponyc/ast (parserapi)

; 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.rule_state_t = type { ptr, ptr, ptr, ptr, ptr, i32, i8, i8, i8, i32, i64, i64 }
%struct.parser_t = type { ptr, ptr, ptr, ptr, ptr, i32, i8, i8, ptr, i8 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@__func__.parse_rule_complete = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [43 x i8], align 1

declare void @ponyint_assert_fail(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

declare i64 @token_line_number(ptr noundef) #0

declare i64 @token_line_position(ptr noundef) #0

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

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

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

declare ptr @token_print(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local ptr @parse_rule_complete(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  br label %13

12:                                               ; preds = %2
  call void @ponyint_assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i64 noundef 550, ptr noundef @__func__.parse_rule_complete)
  br label %13

13:                                               ; preds = %12, %11
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  br label %18

17:                                               ; preds = %13
  call void @ponyint_assert_fail(ptr noundef @.str, ptr noundef @.str.1, i64 noundef 551, ptr noundef @__func__.parse_rule_complete)
  br label %18

18:                                               ; preds = %17, %16
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  call void @process_deferred_ast(ptr noundef %19, ptr noundef %20)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.rule_state_t, ptr %21, i32 0, i32 7
  %23 = load i8, ptr %22, align 1, !tbaa !9, !range !14, !noundef !15
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %34

25:                                               ; preds = %18
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.rule_state_t, ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %34

30:                                               ; preds = %25
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.rule_state_t, ptr %31, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  call void @ast_scope(ptr noundef %33)
  br label %34

34:                                               ; preds = %30, %25, %18
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.parser_t, ptr %35, i32 0, i32 9
  %37 = load i8, ptr %36, align 8, !tbaa !17, !range !14, !noundef !15
  %38 = trunc i8 %37 to i1
  br i1 %38, label %39, label %45

39:                                               ; preds = %34
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.rule_state_t, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !19
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str.19, ptr noundef %43) #4
  br label %45

45:                                               ; preds = %39, %34
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.rule_state_t, ptr %46, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !20
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %54

50:                                               ; preds = %45
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.rule_state_t, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !16
  store ptr %53, ptr %3, align 8
  br label %154

54:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = call i32 @current_token_id(ptr noundef %55)
  store i32 %56, ptr %6, align 4, !tbaa !21
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.parser_t, ptr %57, i32 0, i32 9
  %59 = load i8, ptr %58, align 8, !tbaa !17, !range !14, !noundef !15
  %60 = trunc i8 %59 to i1
  br i1 %60, label %61, label %71

61:                                               ; preds = %54
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.rule_state_t, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !19
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.parser_t, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = call ptr @token_print(ptr noundef %68)
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.20, ptr noundef %65, ptr noundef %69) #4
  br label %71

71:                                               ; preds = %61, %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.rule_state_t, ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  store ptr %74, ptr %7, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %101, %71
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load i32, ptr %76, align 4, !tbaa !21
  %78 = icmp ne i32 %77, 2
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 2, ptr %8, align 4
  br label %104

80:                                               ; preds = %75
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = load i32, ptr %81, align 4, !tbaa !21
  %83 = load i32, ptr %6, align 4, !tbaa !21
  %84 = icmp eq i32 %82, %83
  br i1 %84, label %85, label %100

85:                                               ; preds = %80
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.parser_t, ptr %86, i32 0, i32 9
  %88 = load i8, ptr %87, align 8, !tbaa !17, !range !14, !noundef !15
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %96

90:                                               ; preds = %85
  %91 = load ptr, ptr @stderr, align 8, !tbaa !5
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.rule_state_t, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !19
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.21, ptr noundef %94) #4
  br label %96

96:                                               ; preds = %90, %85
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.rule_state_t, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  store ptr %99, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %104

100:                                              ; preds = %80
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds i32, ptr %102, i32 1
  store ptr %103, ptr %7, align 8, !tbaa !5
  br label %75, !llvm.loop !23

104:                                              ; preds = %96, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %105 = load i32, ptr %8, align 4
  switch i32 %105, label %153 [
    i32 2, label %106
  ]

106:                                              ; preds = %104
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.parser_t, ptr %107, i32 0, i32 9
  %109 = load i8, ptr %108, align 8, !tbaa !17, !range !14, !noundef !15
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %117

111:                                              ; preds = %106
  %112 = load ptr, ptr @stderr, align 8, !tbaa !5
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.rule_state_t, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !19
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.22, ptr noundef %115) #4
  br label %117

117:                                              ; preds = %111, %106
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.parser_t, ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !22
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %123

122:                                              ; preds = %117
  br label %124

123:                                              ; preds = %117
  call void @ponyint_assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i64 noundef 587, ptr noundef @__func__.parse_rule_complete)
  br label %124

124:                                              ; preds = %123, %122
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.parser_t, ptr %125, i32 0, i32 8
  %127 = load ptr, ptr %126, align 8, !tbaa !25
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.parser_t, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !26
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.parser_t, ptr %131, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !22
  %134 = call i64 @token_line_number(ptr noundef %133)
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.parser_t, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !22
  %138 = call i64 @token_line_position(ptr noundef %137)
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.parser_t, ptr %139, i32 0, i32 2
  %141 = load ptr, ptr %140, align 8, !tbaa !22
  %142 = call ptr @token_print(ptr noundef %141)
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.rule_state_t, ptr %143, i32 0, i32 3
  %145 = load ptr, ptr %144, align 8, !tbaa !27
  call void (ptr, ptr, i64, i64, ptr, ...) @error(ptr noundef %127, ptr noundef %130, i64 noundef %134, i64 noundef %138, ptr noundef @.str.23, ptr noundef %142, ptr noundef %145)
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.rule_state_t, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !16
  call void @ast_free(ptr noundef %148)
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.parser_t, ptr %149, i32 0, i32 7
  store i8 1, ptr %150, align 1, !tbaa !28
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  call void @ditch_restart(ptr noundef %151, ptr noundef %152)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %153

153:                                              ; preds = %124, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %154

154:                                              ; preds = %153, %50
  %155 = load ptr, ptr %3, align 8
  ret ptr %155
}

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

declare void @ast_scope(ptr noundef) #0

declare void @error(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) #0

declare void @ast_free(ptr noundef) #0

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

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


; 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"

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@__func__.parse_rule_complete = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [43 x i8], align 1

declare void @ponyint_assert_fail(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

declare i64 @token_line_number(ptr noundef) local_unnamed_addr #0

declare i64 @token_line_position(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @current_token_id(ptr noundef) local_unnamed_addr #1

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

declare ptr @token_print(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @parse_rule_complete(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %3, label %4

3:                                                ; preds = %2
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i64 noundef 550, ptr noundef nonnull @__func__.parse_rule_complete) #3
  br label %4

4:                                                ; preds = %2, %3
  %.not41 = icmp eq ptr %1, null
  br i1 %.not41, label %5, label %6

5:                                                ; preds = %4
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 551, ptr noundef nonnull @__func__.parse_rule_complete) #3
  br label %6

6:                                                ; preds = %4, %5
  tail call void @process_deferred_ast(ptr noundef %0, ptr noundef %1)
  %7 = getelementptr inbounds i8, ptr %1, i64 45
  %8 = load i8, ptr %7, align 1, !tbaa !5, !range !13, !noundef !14
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %14

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %.not42 = icmp eq ptr %12, null
  br i1 %.not42, label %14, label %13

13:                                               ; preds = %10
  tail call void @ast_scope(ptr noundef nonnull %12) #3
  br label %14

14:                                               ; preds = %13, %10, %6
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load i8, ptr %15, align 8, !tbaa !16, !range !13, !noundef !14
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %18, label %22

18:                                               ; preds = %14
  %19 = load ptr, ptr @stderr, align 8, !tbaa !18
  %20 = load ptr, ptr %1, align 8, !tbaa !19
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.19, ptr noundef %20) #4
  br label %22

22:                                               ; preds = %18, %14
  %23 = getelementptr inbounds i8, ptr %1, i64 32
  %24 = load ptr, ptr %23, align 8, !tbaa !20
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %29

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  br label %83

29:                                               ; preds = %22
  %30 = tail call i32 @current_token_id(ptr noundef nonnull %0)
  %31 = load i8, ptr %15, align 8, !tbaa !16, !range !13, !noundef !14
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %33, label %40

33:                                               ; preds = %29
  %34 = load ptr, ptr @stderr, align 8, !tbaa !18
  %35 = load ptr, ptr %1, align 8, !tbaa !19
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  %38 = tail call ptr @token_print(ptr noundef %37) #3
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.20, ptr noundef %35, ptr noundef %38) #4
  br label %40

40:                                               ; preds = %33, %29
  %41 = load ptr, ptr %23, align 8, !tbaa !20
  %42 = load i32, ptr %41, align 4, !tbaa !22
  %.not4346 = icmp eq i32 %42, 2
  br i1 %.not4346, label %._crit_edge, label %.lr.ph

43:                                               ; preds = %.lr.ph
  %44 = getelementptr inbounds i8, ptr %.03747, i64 4
  %45 = load i32, ptr %44, align 4, !tbaa !22
  %.not43 = icmp eq i32 %45, 2
  br i1 %.not43, label %._crit_edge, label %.lr.ph, !llvm.loop !23

.lr.ph:                                           ; preds = %40, %43
  %46 = phi i32 [ %45, %43 ], [ %42, %40 ]
  %.03747 = phi ptr [ %44, %43 ], [ %41, %40 ]
  %47 = icmp eq i32 %46, %30
  br i1 %47, label %48, label %43

48:                                               ; preds = %.lr.ph
  %49 = load i8, ptr %15, align 8, !tbaa !16, !range !13, !noundef !14
  %50 = trunc nuw i8 %49 to i1
  br i1 %50, label %51, label %55

51:                                               ; preds = %48
  %52 = load ptr, ptr @stderr, align 8, !tbaa !18
  %53 = load ptr, ptr %1, align 8, !tbaa !19
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.21, ptr noundef %53) #4
  br label %55

55:                                               ; preds = %48, %51
  %56 = getelementptr inbounds i8, ptr %1, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  br label %83

._crit_edge:                                      ; preds = %43, %40
  %58 = load i8, ptr %15, align 8, !tbaa !16, !range !13, !noundef !14
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %60, label %64

60:                                               ; preds = %._crit_edge
  %61 = load ptr, ptr @stderr, align 8, !tbaa !18
  %62 = load ptr, ptr %1, align 8, !tbaa !19
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.22, ptr noundef %62) #4
  br label %64

64:                                               ; preds = %60, %._crit_edge
  %65 = getelementptr inbounds i8, ptr %0, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !21
  %.not44 = icmp eq ptr %66, null
  br i1 %.not44, label %67, label %68

67:                                               ; preds = %64
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i64 noundef 587, ptr noundef nonnull @__func__.parse_rule_complete) #3
  %.pre = load ptr, ptr %65, align 8, !tbaa !21
  br label %68

68:                                               ; preds = %64, %67
  %69 = phi ptr [ %66, %64 ], [ %.pre, %67 ]
  %70 = getelementptr inbounds i8, ptr %0, i64 48
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = load ptr, ptr %0, align 8, !tbaa !26
  %73 = tail call i64 @token_line_number(ptr noundef %69) #3
  %74 = load ptr, ptr %65, align 8, !tbaa !21
  %75 = tail call i64 @token_line_position(ptr noundef %74) #3
  %76 = load ptr, ptr %65, align 8, !tbaa !21
  %77 = tail call ptr @token_print(ptr noundef %76) #3
  %78 = getelementptr inbounds i8, ptr %1, i64 24
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  tail call void (ptr, ptr, i64, i64, ptr, ...) @error(ptr noundef %71, ptr noundef %72, i64 noundef %73, i64 noundef %75, ptr noundef nonnull @.str.23, ptr noundef %77, ptr noundef %79) #3
  %80 = getelementptr inbounds i8, ptr %1, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  tail call void @ast_free(ptr noundef %81) #3
  %82 = getelementptr inbounds i8, ptr %0, i64 45
  store i8 1, ptr %82, align 1, !tbaa !28
  tail call void @ditch_restart(ptr noundef nonnull %0, ptr noundef %1)
  br label %83

83:                                               ; preds = %55, %68, %26
  %.2 = phi ptr [ %28, %26 ], [ null, %68 ], [ %57, %55 ]
  ret ptr %.2
}

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

declare void @ast_scope(ptr noundef) local_unnamed_addr #0

declare void @error(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #0

declare void @ast_free(ptr noundef) local_unnamed_addr #0

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

attributes #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 #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 = { 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 #3 = { nounwind }
attributes #4 = { 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, !11, i64 45}
!6 = !{!"rule_state_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !11, i64 44, !11, i64 45, !11, i64 46, !10, i64 48, !12, i64 56, !12, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!6, !7, i64 8}
!16 = !{!17, !11, i64 56}
!17 = !{!"parser_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !11, i64 44, !11, i64 45, !7, i64 48, !11, i64 56}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !7, i64 0}
!20 = !{!6, !7, i64 32}
!21 = !{!17, !7, i64 16}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!17, !7, i64 48}
!26 = !{!17, !7, i64 0}
!27 = !{!6, !7, i64 24}
!28 = !{!17, !11, i64 45}


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