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

@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__.parse = external hidden unnamed_addr constant [6 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare ptr @ast_add(ptr noundef, 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare void @ast_free(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @parse(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i1 noundef zeroext %5, i1 noundef zeroext %6) #2 {
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  %22 = zext i1 %5 to i8
  store i8 %22, ptr %14, align 1, !tbaa !9
  %23 = zext i1 %6 to i8
  store i8 %23, ptr %15, align 1, !tbaa !9
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %7
  br label %28

27:                                               ; preds = %7
  call void @ponyint_assert_fail(ptr noundef @.str.24, ptr noundef @.str.1, i64 noundef 605, ptr noundef @__func__.parse)
  br label %28

28:                                               ; preds = %27, %26
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  br label %33

32:                                               ; preds = %28
  call void @ponyint_assert_fail(ptr noundef @.str.25, ptr noundef @.str.1, i64 noundef 606, ptr noundef @__func__.parse)
  br label %33

33:                                               ; preds = %32, %31
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  br label %38

37:                                               ; preds = %33
  call void @ponyint_assert_fail(ptr noundef @.str.26, ptr noundef @.str.1, i64 noundef 607, ptr noundef @__func__.parse)
  br label %38

38:                                               ; preds = %37, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = load i8, ptr %14, align 1, !tbaa !9, !range !11, !noundef !12
  %42 = trunc i8 %41 to i1
  %43 = call ptr @lexer_open(ptr noundef %39, ptr noundef %40, i1 noundef zeroext %42)
  store ptr %43, ptr %16, align 8, !tbaa !5
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %47

46:                                               ; preds = %38
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %139

47:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %48 = call noalias ptr @ponyint_pool_alloc(i64 noundef 1)
  store ptr %48, ptr %18, align 8, !tbaa !5
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = load ptr, ptr %18, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.parser_t, ptr %50, i32 0, i32 0
  store ptr %49, ptr %51, align 8, !tbaa !13
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  %53 = load ptr, ptr %18, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.parser_t, ptr %53, i32 0, i32 1
  store ptr %52, ptr %54, align 8, !tbaa !16
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  %56 = call ptr @lexer_next(ptr noundef %55)
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.parser_t, ptr %57, i32 0, i32 2
  store ptr %56, ptr %58, align 8, !tbaa !17
  %59 = load ptr, ptr %18, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.parser_t, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = load ptr, ptr %18, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.parser_t, ptr %62, i32 0, i32 3
  store ptr %61, ptr %63, align 8, !tbaa !18
  %64 = load ptr, ptr %18, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.parser_t, ptr %64, i32 0, i32 4
  store ptr null, ptr %65, align 8, !tbaa !19
  %66 = load ptr, ptr %18, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.parser_t, ptr %66, i32 0, i32 5
  store i32 0, ptr %67, align 8, !tbaa !20
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.parser_t, ptr %68, i32 0, i32 6
  store i8 0, ptr %69, align 4, !tbaa !21
  %70 = load ptr, ptr %18, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.parser_t, ptr %70, i32 0, i32 7
  store i8 0, ptr %71, align 1, !tbaa !22
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.parser_t, ptr %73, i32 0, i32 8
  store ptr %72, ptr %74, align 8, !tbaa !23
  %75 = load i8, ptr %15, align 1, !tbaa !9, !range !11, !noundef !12
  %76 = trunc i8 %75 to i1
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.parser_t, ptr %77, i32 0, i32 9
  %79 = zext i1 %76 to i8
  store i8 %79, ptr %78, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = call i64 @errors_get_count(ptr noundef %80)
  store i64 %81, ptr %19, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = call ptr %82(ptr noundef %83, ptr noundef %20, ptr noundef %84)
  store ptr %85, ptr %21, align 8, !tbaa !5
  %86 = load ptr, ptr %21, align 8, !tbaa !5
  %87 = icmp eq ptr %86, inttoptr (i64 2 to ptr)
  br i1 %87, label %88, label %89

88:                                               ; preds = %47
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %88, %47
  %90 = load ptr, ptr %21, align 8, !tbaa !5
  %91 = icmp eq ptr %90, inttoptr (i64 3 to ptr)
  br i1 %91, label %92, label %95

92:                                               ; preds = %89
  %93 = load ptr, ptr %18, align 8, !tbaa !5
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  call void @syntax_error(ptr noundef %93, ptr noundef %94, ptr noundef null, ptr noundef null)
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %95

95:                                               ; preds = %92, %89
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.parser_t, ptr %96, i32 0, i32 7
  %98 = load i8, ptr %97, align 1, !tbaa !22, !range !11, !noundef !12
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %102

100:                                              ; preds = %95
  %101 = load ptr, ptr %21, align 8, !tbaa !5
  call void @ast_free(ptr noundef %101)
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %102

102:                                              ; preds = %100, %95
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = call i64 @errors_get_count(ptr noundef %103)
  %105 = load i64, ptr %19, align 8, !tbaa !25
  %106 = icmp ugt i64 %104, %105
  br i1 %106, label %107, label %109

107:                                              ; preds = %102
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  call void @ast_free(ptr noundef %108)
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %107, %102
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  call void @lexer_close(ptr noundef %110)
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.parser_t, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !17
  call void @token_free(ptr noundef %113)
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  call void @ponyint_pool_free(i64 noundef 1, ptr noundef %114)
  %115 = load ptr, ptr %21, align 8, !tbaa !5
  %116 = icmp eq ptr %115, null
  br i1 %116, label %117, label %119

117:                                              ; preds = %109
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  call void @source_close(ptr noundef %118)
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %138

119:                                              ; preds = %109
  %120 = load ptr, ptr %21, align 8, !tbaa !5
  %121 = call i32 @ast_id(ptr noundef %120)
  %122 = icmp eq i32 %121, 138
  br i1 %122, label %123, label %124

123:                                              ; preds = %119
  br label %125

124:                                              ; preds = %119
  call void @ponyint_assert_fail(ptr noundef @.str.27, ptr noundef @.str.1, i64 noundef 665, ptr noundef @__func__.parse)
  br label %125

125:                                              ; preds = %124, %123
  %126 = load ptr, ptr %21, align 8, !tbaa !5
  %127 = call ptr @ast_data(ptr noundef %126)
  %128 = icmp eq ptr %127, null
  br i1 %128, label %129, label %130

129:                                              ; preds = %125
  br label %131

130:                                              ; preds = %125
  call void @ponyint_assert_fail(ptr noundef @.str.28, ptr noundef @.str.1, i64 noundef 666, ptr noundef @__func__.parse)
  br label %131

131:                                              ; preds = %130, %129
  %132 = load ptr, ptr %21, align 8, !tbaa !5
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = call ptr @ast_setdata(ptr noundef %132, ptr noundef %133)
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load ptr, ptr %21, align 8, !tbaa !5
  %137 = call ptr @ast_add(ptr noundef %135, ptr noundef %136)
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %138

138:                                              ; preds = %131, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %139

139:                                              ; preds = %138, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %140 = load i1, ptr %8, align 1
  ret i1 %140
}

declare ptr @lexer_open(ptr noundef, ptr noundef, i1 noundef zeroext) #0

declare noalias ptr @ponyint_pool_alloc(i64 noundef) #0

declare ptr @lexer_next(ptr noundef) #0

declare i64 @errors_get_count(ptr noundef) #0

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

declare void @lexer_close(ptr noundef) #0

declare void @token_free(ptr noundef) #0

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

declare void @source_close(ptr noundef) #0

declare i32 @ast_id(ptr noundef) #0

declare ptr @ast_data(ptr noundef) #0

declare ptr @ast_setdata(ptr noundef, ptr noundef) #0

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 }

!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 = !{!"_Bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 0}
!14 = !{!"parser_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !15, i64 40, !10, i64 44, !10, i64 45, !6, i64 48, !10, i64 56}
!15 = !{!"int", !7, i64 0}
!16 = !{!14, !6, i64 8}
!17 = !{!14, !6, i64 16}
!18 = !{!14, !6, i64 24}
!19 = !{!14, !6, i64 32}
!20 = !{!14, !15, i64 40}
!21 = !{!14, !10, i64 44}
!22 = !{!14, !10, i64 45}
!23 = !{!14, !6, i64 48}
!24 = !{!14, !10, i64 56}
!25 = !{!26, !26, i64 0}
!26 = !{!"long", !7, i64 0}


; 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.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__.parse = external hidden unnamed_addr constant [6 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare ptr @ast_add(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

declare void @ast_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @parse(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3, ptr noundef %4, i1 noundef zeroext %5, i1 noundef zeroext %6) local_unnamed_addr #2 {
  %8 = alloca ptr, align 8
  %9 = zext i1 %6 to i8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %10, label %11

10:                                               ; preds = %7
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, i64 noundef 605, ptr noundef nonnull @__func__.parse) #4
  br label %11

11:                                               ; preds = %7, %10
  %.not50 = icmp eq ptr %1, null
  br i1 %.not50, label %12, label %13

12:                                               ; preds = %11
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.1, i64 noundef 606, ptr noundef nonnull @__func__.parse) #4
  br label %13

13:                                               ; preds = %11, %12
  %.not51 = icmp eq ptr %3, null
  br i1 %.not51, label %14, label %15

14:                                               ; preds = %13
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, i64 noundef 607, ptr noundef nonnull @__func__.parse) #4
  br label %15

15:                                               ; preds = %13, %14
  %16 = tail call ptr @lexer_open(ptr noundef %1, ptr noundef %4, i1 noundef zeroext %5) #4
  %17 = icmp eq ptr %16, null
  br i1 %17, label %57, label %18

18:                                               ; preds = %15
  %19 = tail call noalias ptr @ponyint_pool_alloc(i64 noundef 1) #4
  store ptr %1, ptr %19, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  store ptr %16, ptr %20, align 8, !tbaa !12
  %21 = tail call ptr @lexer_next(ptr noundef nonnull %16) #4
  %22 = getelementptr inbounds i8, ptr %19, i64 16
  store ptr %21, ptr %22, align 8, !tbaa !13
  %23 = getelementptr inbounds i8, ptr %19, i64 24
  store ptr %21, ptr %23, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %19, i64 32
  %25 = getelementptr inbounds i8, ptr %19, i64 45
  %26 = getelementptr inbounds i8, ptr %19, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(14) %24, i8 0, i64 14, i1 false)
  store ptr %4, ptr %26, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %19, i64 56
  store i8 %9, ptr %27, align 8, !tbaa !16
  %28 = tail call i64 @errors_get_count(ptr noundef %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %29 = call ptr %2(ptr noundef nonnull %19, ptr noundef nonnull %8, ptr noundef %3) #4
  %30 = icmp eq ptr %29, inttoptr (i64 2 to ptr)
  %spec.store.select = select i1 %30, ptr null, ptr %29
  %31 = icmp eq ptr %spec.store.select, inttoptr (i64 3 to ptr)
  br i1 %31, label %32, label %33

32:                                               ; preds = %18
  call void @syntax_error(ptr noundef nonnull %19, ptr noundef %3, ptr noundef null, ptr noundef null)
  br label %33

33:                                               ; preds = %32, %18
  %.0 = phi ptr [ null, %32 ], [ %spec.store.select, %18 ]
  %34 = load i8, ptr %25, align 1, !tbaa !17, !range !18, !noundef !19
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  call void @ast_free(ptr noundef %.0) #4
  br label %37

37:                                               ; preds = %36, %33
  %.1 = phi ptr [ null, %36 ], [ %.0, %33 ]
  %38 = call i64 @errors_get_count(ptr noundef %4) #4
  %39 = icmp ugt i64 %38, %28
  br i1 %39, label %40, label %41

40:                                               ; preds = %37
  call void @ast_free(ptr noundef %.1) #4
  br label %41

41:                                               ; preds = %40, %37
  %.2 = phi ptr [ null, %40 ], [ %.1, %37 ]
  call void @lexer_close(ptr noundef nonnull %16) #4
  %42 = load ptr, ptr %22, align 8, !tbaa !13
  call void @token_free(ptr noundef %42) #4
  call void @ponyint_pool_free(i64 noundef 1, ptr noundef nonnull %19) #4
  %43 = icmp ne ptr %.2, null
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  call void @source_close(ptr noundef %1) #4
  br label %56

45:                                               ; preds = %41
  %46 = call i32 @ast_id(ptr noundef nonnull %.2) #4
  %47 = icmp eq i32 %46, 138
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  call void @ponyint_assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, i64 noundef 665, ptr noundef nonnull @__func__.parse) #4
  br label %49

49:                                               ; preds = %45, %48
  %50 = call ptr @ast_data(ptr noundef nonnull %.2) #4
  %51 = icmp eq ptr %50, null
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  call void @ponyint_assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.1, i64 noundef 666, ptr noundef nonnull @__func__.parse) #4
  br label %53

53:                                               ; preds = %49, %52
  %54 = call ptr @ast_setdata(ptr noundef nonnull %.2, ptr noundef %1) #4
  %55 = call ptr @ast_add(ptr noundef %0, ptr noundef nonnull %.2) #4
  br label %56

56:                                               ; preds = %53, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %57

57:                                               ; preds = %15, %56
  %.148 = phi i1 [ %43, %56 ], [ false, %15 ]
  ret i1 %.148
}

declare ptr @lexer_open(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

declare noalias ptr @ponyint_pool_alloc(i64 noundef) local_unnamed_addr #0

declare ptr @lexer_next(ptr noundef) local_unnamed_addr #0

declare i64 @errors_get_count(ptr noundef) local_unnamed_addr #0

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

declare void @lexer_close(ptr noundef) local_unnamed_addr #0

declare void @token_free(ptr noundef) local_unnamed_addr #0

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

declare void @source_close(ptr noundef) local_unnamed_addr #0

declare i32 @ast_id(ptr noundef) local_unnamed_addr #0

declare ptr @ast_data(ptr noundef) local_unnamed_addr #0

declare ptr @ast_setdata(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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 = { mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !7, i64 0}
!6 = !{!"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}
!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 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 24}
!15 = !{!6, !7, i64 48}
!16 = !{!6, !11, i64 56}
!17 = !{!6, !11, i64 45}
!18 = !{i8 0, i8 2}
!19 = !{}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass