; LLVM IR from buzz-lang/Buzz :: src/buzz (buzzparser)

; 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.buzzparser_s = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.buzztok_s = type { i32, ptr, i64, i64, ptr }
%struct.buzzdarray_s = type { ptr, i64, i32, i32, ptr }

@PARSE_ERROR = external hidden global i32, align 4
@PARSE_OK = external hidden global i32, align 4
@.str.15 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 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

declare void @buzzdarray_insert(ptr noundef, i32 noundef, ptr noundef) #1

; 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 void @free(ptr noundef) #2

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

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

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

; Function Attrs: nounwind
declare i32 @asprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local void @chunk_finalize(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @parse_script(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.buzzparser_s, ptr %8, i32 0, i32 3
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = call ptr @buzzlex_nexttok(ptr noundef %10)
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.buzzparser_s, ptr %12, i32 0, i32 4
  store ptr %11, ptr %13, align 8, !tbaa !12
  br label %14

14:                                               ; preds = %30, %1
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.buzzparser_s, ptr %15, i32 0, i32 4
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds %struct.buzztok_s, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !13
  %20 = icmp ne i32 %19, 31
  br i1 %20, label %21, label %28

21:                                               ; preds = %14
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.buzzparser_s, ptr %22, i32 0, i32 4
  %24 = load ptr, ptr %23, align 8, !tbaa !12
  %25 = getelementptr inbounds %struct.buzztok_s, ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 8, !tbaa !13
  %27 = icmp eq i32 %26, 26
  br label %28

28:                                               ; preds = %21, %14
  %29 = phi i1 [ false, %14 ], [ %27, %21 ]
  br i1 %29, label %30, label %39

30:                                               ; preds = %28
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.buzzparser_s, ptr %31, i32 0, i32 4
  call void @buzzlex_destroytok(ptr noundef %32)
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.buzzparser_s, ptr %33, i32 0, i32 3
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = call ptr @buzzlex_nexttok(ptr noundef %35)
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.buzzparser_s, ptr %37, i32 0, i32 4
  store ptr %36, ptr %38, align 8, !tbaa !12
  br label %14, !llvm.loop !16

39:                                               ; preds = %28
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.buzzparser_s, ptr %40, i32 0, i32 4
  %42 = load ptr, ptr %41, align 8, !tbaa !12
  %43 = getelementptr inbounds %struct.buzztok_s, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !13
  %45 = icmp eq i32 %44, 31
  br i1 %45, label %46, label %59

46:                                               ; preds = %39
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.buzzparser_s, ptr %47, i32 0, i32 3
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.buzzdarray_s, ptr %49, i32 0, i32 1
  %51 = load i64, ptr %50, align 8, !tbaa !18
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %46
  %54 = load i32, ptr @PARSE_OK, align 4, !tbaa !20
  br label %57

55:                                               ; preds = %46
  %56 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !20
  br label %57

57:                                               ; preds = %55, %53
  %58 = phi i32 [ %54, %53 ], [ %56, %55 ]
  store i32 %58, ptr %2, align 4
  br label %130

59:                                               ; preds = %39
  %60 = call ptr @buzzdict_new(i32 noundef 100, i32 noundef 8, i32 noundef 16, ptr noundef @buzzdict_strkeyhash, ptr noundef @buzzdict_strkeycmp, ptr noundef @sym_destroy)
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.buzzparser_s, ptr %61, i32 0, i32 8
  store ptr %60, ptr %62, align 8, !tbaa !21
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.buzzparser_s, ptr %63, i32 0, i32 7
  %65 = load ptr, ptr %64, align 8, !tbaa !22
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.buzzparser_s, ptr %66, i32 0, i32 7
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = getelementptr inbounds %struct.buzzdarray_s, ptr %68, i32 0, i32 1
  %70 = load i64, ptr %69, align 8, !tbaa !18
  %71 = trunc i64 %70 to i32
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.buzzparser_s, ptr %72, i32 0, i32 8
  call void @buzzdarray_insert(ptr noundef %65, i32 noundef %71, ptr noundef %73)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.buzzparser_s, ptr %74, i32 0, i32 6
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  store ptr %76, ptr %4, align 8, !tbaa !5
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.buzzparser_s, ptr %77, i32 0, i32 10
  %79 = load i32, ptr %78, align 8, !tbaa !24
  %80 = call ptr @chunk_new(i32 noundef %79, ptr noundef null)
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.buzzparser_s, ptr %81, i32 0, i32 6
  store ptr %80, ptr %82, align 8, !tbaa !23
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.buzzparser_s, ptr %83, i32 0, i32 5
  %85 = load ptr, ptr %84, align 8, !tbaa !25
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.buzzparser_s, ptr %86, i32 0, i32 5
  %88 = load ptr, ptr %87, align 8, !tbaa !25
  %89 = getelementptr inbounds %struct.buzzdarray_s, ptr %88, i32 0, i32 1
  %90 = load i64, ptr %89, align 8, !tbaa !18
  %91 = trunc i64 %90 to i32
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.buzzparser_s, ptr %92, i32 0, i32 6
  call void @buzzdarray_insert(ptr noundef %85, i32 noundef %91, ptr noundef %93)
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.buzzparser_s, ptr %94, i32 0, i32 10
  %96 = load i32, ptr %95, align 8, !tbaa !24
  %97 = add i32 %96, 1
  store i32 %97, ptr %95, align 8, !tbaa !24
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = call i32 @parse_statlist(ptr noundef %98)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %103, label %101

101:                                              ; preds = %59
  %102 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !20
  store i32 %102, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %129

103:                                              ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %104 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %6, ptr noundef @.str.15) #4
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.buzzparser_s, ptr %105, i32 0, i32 6
  %107 = load ptr, ptr %106, align 8, !tbaa !23
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.buzzparser_s, ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !12
  call void @chunk_addcode(ptr noundef %107, ptr noundef %108, ptr noundef %111)
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %112) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %113 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %7, ptr noundef @.str.16) #4
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.buzzparser_s, ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !23
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.buzzparser_s, ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !12
  call void @chunk_addcode(ptr noundef %116, ptr noundef %117, ptr noundef %120)
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %121) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.buzzparser_s, ptr %122, i32 0, i32 6
  %124 = load ptr, ptr %123, align 8, !tbaa !23
  call void @chunk_finalize(ptr noundef %124)
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.buzzparser_s, ptr %126, i32 0, i32 6
  store ptr %125, ptr %127, align 8, !tbaa !23
  %128 = load i32, ptr @PARSE_OK, align 4, !tbaa !20
  store i32 %128, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %129

129:                                              ; preds = %103, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %130

130:                                              ; preds = %129, %57
  %131 = load i32, ptr %2, align 4
  ret i32 %131
}

declare ptr @buzzlex_nexttok(ptr noundef) #1

declare void @buzzlex_destroytok(ptr noundef) #1

declare ptr @buzzdict_new(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @buzzdict_strkeyhash(ptr noundef) #1

declare i32 @buzzdict_strkeycmp(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @parse_statlist(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 "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 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 #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, !6, i64 24}
!10 = !{!"buzzparser_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !11, i64 80}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 32}
!13 = !{!14, !11, i64 0}
!14 = !{!"buzztok_s", !11, i64 0, !6, i64 8, !15, i64 16, !15, i64 24, !6, i64 32}
!15 = !{!"long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !15, i64 8}
!19 = !{!"buzzdarray_s", !6, i64 0, !15, i64 8, !11, i64 16, !11, i64 20, !6, i64 24}
!20 = !{!11, !11, i64 0}
!21 = !{!10, !6, i64 64}
!22 = !{!10, !6, i64 56}
!23 = !{!10, !6, i64 48}
!24 = !{!10, !11, i64 80}
!25 = !{!10, !6, i64 40}


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

@PARSE_ERROR = external hidden local_unnamed_addr global i32, align 4
@PARSE_OK = external hidden local_unnamed_addr global i32, align 4
@.str.15 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 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

declare void @buzzdarray_insert(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind
declare i32 @asprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
define dso_local i32 @parse_script(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = tail call ptr @buzzlex_nexttok(ptr noundef %5) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  br label %8

8:                                                ; preds = %10, %1
  %storemerge = phi ptr [ %6, %1 ], [ %12, %10 ]
  store ptr %storemerge, ptr %7, align 8, !tbaa !11
  %9 = load i32, ptr %storemerge, align 8, !tbaa !12
  switch i32 %9, label %21 [
    i32 26, label %10
    i32 31, label %13
  ]

10:                                               ; preds = %8
  tail call void @buzzlex_destroytok(ptr noundef nonnull %7) #5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = tail call ptr @buzzlex_nexttok(ptr noundef %11) #5
  br label %8, !llvm.loop !15

13:                                               ; preds = %8
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  %16 = load i64, ptr %15, align 8, !tbaa !17
  %17 = icmp eq i64 %16, 0
  %18 = load i32, ptr @PARSE_OK, align 4
  %19 = load i32, ptr @PARSE_ERROR, align 4
  %20 = select i1 %17, i32 %18, i32 %19
  br label %55

21:                                               ; preds = %8
  %22 = tail call ptr @buzzdict_new(i32 noundef 100, i32 noundef 8, i32 noundef 16, ptr noundef nonnull @buzzdict_strkeyhash, ptr noundef nonnull @buzzdict_strkeycmp, ptr noundef nonnull @sym_destroy) #5
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %22, ptr %23, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  %25 = load ptr, ptr %24, align 8, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load i64, ptr %26, align 8, !tbaa !17
  %28 = trunc i64 %27 to i32
  tail call void @buzzdarray_insert(ptr noundef %25, i32 noundef %28, ptr noundef nonnull %23) #5
  %29 = getelementptr inbounds i8, ptr %0, i64 48
  %30 = load ptr, ptr %29, align 8, !tbaa !21
  %31 = getelementptr inbounds i8, ptr %0, i64 80
  %32 = load i32, ptr %31, align 8, !tbaa !22
  %33 = tail call ptr @chunk_new(i32 noundef %32, ptr noundef null)
  store ptr %33, ptr %29, align 8, !tbaa !21
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = load ptr, ptr %34, align 8, !tbaa !23
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load i64, ptr %36, align 8, !tbaa !17
  %38 = trunc i64 %37 to i32
  tail call void @buzzdarray_insert(ptr noundef %35, i32 noundef %38, ptr noundef nonnull %29) #5
  %39 = load i32, ptr %31, align 8, !tbaa !22
  %40 = add i32 %39, 1
  store i32 %40, ptr %31, align 8, !tbaa !22
  %41 = tail call i32 @parse_statlist(ptr noundef nonnull %0)
  %.not29 = icmp eq i32 %41, 0
  br i1 %.not29, label %54, label %42

42:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %43 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.15) #5
  %44 = load ptr, ptr %29, align 8, !tbaa !21
  %45 = load ptr, ptr %2, align 8, !tbaa !24
  %46 = load ptr, ptr %7, align 8, !tbaa !11
  call void @chunk_addcode(ptr noundef %44, ptr noundef %45, ptr noundef %46)
  %47 = load ptr, ptr %2, align 8, !tbaa !24
  call void @free(ptr noundef %47) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %48 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.16) #5
  %49 = load ptr, ptr %29, align 8, !tbaa !21
  %50 = load ptr, ptr %3, align 8, !tbaa !24
  %51 = load ptr, ptr %7, align 8, !tbaa !11
  call void @chunk_addcode(ptr noundef %49, ptr noundef %50, ptr noundef %51)
  %52 = load ptr, ptr %3, align 8, !tbaa !24
  call void @free(ptr noundef %52) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %53 = load ptr, ptr %29, align 8, !tbaa !21
  call void @chunk_finalize(ptr noundef %53)
  store ptr %30, ptr %29, align 8, !tbaa !21
  br label %54

54:                                               ; preds = %21, %42
  %.0.in = phi ptr [ @PARSE_OK, %42 ], [ @PARSE_ERROR, %21 ]
  %.0 = load i32, ptr %.0.in, align 4, !tbaa !25
  br label %55

55:                                               ; preds = %54, %13
  %.1 = phi i32 [ %20, %13 ], [ %.0, %54 ]
  ret i32 %.1
}

declare ptr @buzzlex_nexttok(ptr noundef) local_unnamed_addr #1

declare void @buzzlex_destroytok(ptr noundef) local_unnamed_addr #1

declare ptr @buzzdict_new(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @buzzdict_strkeyhash(ptr noundef) #1

declare i32 @buzzdict_strkeycmp(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @parse_statlist(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 #4 = { 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 #5 = { 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 24}
!6 = !{!"buzzparser_s", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !10, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 32}
!12 = !{!13, !10, i64 0}
!13 = !{!"buzztok_s", !10, i64 0, !7, i64 8, !14, i64 16, !14, i64 24, !7, i64 32}
!14 = !{!"long", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !14, i64 8}
!18 = !{!"buzzdarray_s", !7, i64 0, !14, i64 8, !10, i64 16, !10, i64 20, !7, i64 24}
!19 = !{!6, !7, i64 64}
!20 = !{!6, !7, i64 56}
!21 = !{!6, !7, i64 48}
!22 = !{!6, !10, i64 80}
!23 = !{!6, !7, i64 40}
!24 = !{!7, !7, i64 0}
!25 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass