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

@SCOPE_AUTO = external hidden global i32, align 4
@stderr = external global ptr, align 8
@PARSE_ERROR = external hidden global i32, align 4
@PARSE_OK = external hidden global i32, align 4
@SCOPE_LOCAL = external hidden global i32, align 4
@.str.23 = external hidden unnamed_addr constant [165 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = 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
declare noalias ptr @strdup(ptr noundef) #2

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

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

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

; 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
declare dso_local i32 @match(ptr noundef, i32 noundef) #3

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
define dso_local i32 @parse_fun(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = call i32 @match(ptr noundef %10, i32 noundef 7)
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %15, label %13

13:                                               ; preds = %1
  %14 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !9
  store i32 %14, ptr %2, align 4
  br label %350

15:                                               ; preds = %1
  br label %16

16:                                               ; preds = %39, %15
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.buzzparser_s, ptr %17, i32 0, i32 4
  call void @buzzlex_destroytok(ptr noundef %18)
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.buzzparser_s, ptr %19, i32 0, i32 3
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = call ptr @buzzlex_nexttok(ptr noundef %21)
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.buzzparser_s, ptr %23, i32 0, i32 4
  store ptr %22, ptr %24, align 8, !tbaa !13
  br label %25

25:                                               ; preds = %16
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.buzzparser_s, ptr %26, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds %struct.buzztok_s, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !14
  %31 = icmp ne i32 %30, 31
  br i1 %31, label %32, label %39

32:                                               ; preds = %25
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.buzzparser_s, ptr %33, i32 0, i32 4
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = getelementptr inbounds %struct.buzztok_s, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !14
  %38 = icmp eq i32 %37, 26
  br label %39

39:                                               ; preds = %32, %25
  %40 = phi i1 [ false, %25 ], [ %38, %32 ]
  br i1 %40, label %16, label %41, !llvm.loop !17

41:                                               ; preds = %39
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = call i32 @match(ptr noundef %42, i32 noundef 0)
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %47, label %45

45:                                               ; preds = %41
  %46 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !9
  store i32 %46, ptr %2, align 4
  br label %350

47:                                               ; preds = %41
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.buzzparser_s, ptr %48, i32 0, i32 7
  %50 = load ptr, ptr %49, align 8, !tbaa !19
  %51 = getelementptr inbounds %struct.buzzdarray_s, ptr %50, i32 0, i32 1
  %52 = load i64, ptr %51, align 8, !tbaa !20
  %53 = icmp sgt i64 %52, 1
  br i1 %53, label %54, label %93

54:                                               ; preds = %47
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.buzzparser_s, ptr %56, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.buzzdarray_s, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !22
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.buzzparser_s, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct.buzzdarray_s, ptr %63, i32 0, i32 1
  %65 = load i64, ptr %64, align 8, !tbaa !20
  %66 = sub nsw i64 %65, 1
  %67 = getelementptr inbounds ptr, ptr %60, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.buzzlex_file_s, ptr %68, i32 0, i32 5
  %70 = load ptr, ptr %69, align 8, !tbaa !23
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.buzzparser_s, ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = getelementptr inbounds %struct.buzztok_s, ptr %73, i32 0, i32 2
  %75 = load i64, ptr %74, align 8, !tbaa !25
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.buzzparser_s, ptr %76, i32 0, i32 4
  %78 = load ptr, ptr %77, align 8, !tbaa !13
  %79 = getelementptr inbounds %struct.buzztok_s, ptr %78, i32 0, i32 3
  %80 = load i64, ptr %79, align 8, !tbaa !26
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.buzzparser_s, ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = getelementptr inbounds %struct.buzztok_s, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !27
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.buzzparser_s, ptr %86, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !13
  %89 = getelementptr inbounds %struct.buzztok_s, ptr %88, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !27
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.23, ptr noundef %70, i64 noundef %75, i64 noundef %80, ptr noundef %85, ptr noundef %90) #4
  %92 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !9
  store i32 %92, ptr %2, align 4
  br label %350

93:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.buzzparser_s, ptr %94, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !13
  %97 = getelementptr inbounds %struct.buzztok_s, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !27
  %99 = call noalias ptr @strdup(ptr noundef %98) #4
  store ptr %99, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.buzzparser_s, ptr %101, i32 0, i32 7
  %103 = load ptr, ptr %102, align 8, !tbaa !19
  %104 = call ptr @sym_lookup(ptr noundef %100, ptr noundef %103)
  store ptr %104, ptr %5, align 8, !tbaa !5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %111, label %107

107:                                              ; preds = %93
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = load i32, ptr @SCOPE_AUTO, align 4, !tbaa !9
  call void @sym_add(ptr noundef %108, ptr noundef %109, i32 noundef %110)
  br label %111

111:                                              ; preds = %107, %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.buzzparser_s, ptr %112, i32 0, i32 6
  %114 = load ptr, ptr %113, align 8, !tbaa !28
  store ptr %114, ptr %6, align 8, !tbaa !5
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.buzzparser_s, ptr %115, i32 0, i32 10
  %117 = load i32, ptr %116, align 8, !tbaa !29
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.buzzparser_s, ptr %119, i32 0, i32 7
  %121 = load ptr, ptr %120, align 8, !tbaa !19
  %122 = call ptr @sym_lookup(ptr noundef %118, ptr noundef %121)
  %123 = call ptr @chunk_new(i32 noundef %117, ptr noundef %122)
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.buzzparser_s, ptr %124, i32 0, i32 6
  store ptr %123, ptr %125, align 8, !tbaa !28
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.buzzparser_s, ptr %126, i32 0, i32 5
  %128 = load ptr, ptr %127, align 8, !tbaa !30
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.buzzparser_s, ptr %129, i32 0, i32 5
  %131 = load ptr, ptr %130, align 8, !tbaa !30
  %132 = getelementptr inbounds %struct.buzzdarray_s, ptr %131, i32 0, i32 1
  %133 = load i64, ptr %132, align 8, !tbaa !20
  %134 = trunc i64 %133 to i32
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.buzzparser_s, ptr %135, i32 0, i32 6
  call void @buzzdarray_insert(ptr noundef %128, i32 noundef %134, ptr noundef %136)
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.buzzparser_s, ptr %137, i32 0, i32 10
  %139 = load i32, ptr %138, align 8, !tbaa !29
  %140 = add i32 %139, 1
  store i32 %140, ptr %138, align 8, !tbaa !29
  br label %141

141:                                              ; preds = %164, %111
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.buzzparser_s, ptr %142, i32 0, i32 4
  call void @buzzlex_destroytok(ptr noundef %143)
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.buzzparser_s, ptr %144, i32 0, i32 3
  %146 = load ptr, ptr %145, align 8, !tbaa !11
  %147 = call ptr @buzzlex_nexttok(ptr noundef %146)
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.buzzparser_s, ptr %148, i32 0, i32 4
  store ptr %147, ptr %149, align 8, !tbaa !13
  br label %150

150:                                              ; preds = %141
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.buzzparser_s, ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !13
  %154 = getelementptr inbounds %struct.buzztok_s, ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 8, !tbaa !14
  %156 = icmp ne i32 %155, 31
  br i1 %156, label %157, label %164

157:                                              ; preds = %150
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.buzzparser_s, ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !13
  %161 = getelementptr inbounds %struct.buzztok_s, ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 8, !tbaa !14
  %163 = icmp eq i32 %162, 26
  br label %164

164:                                              ; preds = %157, %150
  %165 = phi i1 [ false, %150 ], [ %163, %157 ]
  br i1 %165, label %141, label %166, !llvm.loop !31

166:                                              ; preds = %164
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = call i32 @match(ptr noundef %167, i32 noundef 22)
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %172, label %170

170:                                              ; preds = %166
  %171 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !9
  store i32 %171, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %349

172:                                              ; preds = %166
  br label %173

173:                                              ; preds = %196, %172
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.buzzparser_s, ptr %174, i32 0, i32 4
  call void @buzzlex_destroytok(ptr noundef %175)
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.buzzparser_s, ptr %176, i32 0, i32 3
  %178 = load ptr, ptr %177, align 8, !tbaa !11
  %179 = call ptr @buzzlex_nexttok(ptr noundef %178)
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.buzzparser_s, ptr %180, i32 0, i32 4
  store ptr %179, ptr %181, align 8, !tbaa !13
  br label %182

182:                                              ; preds = %173
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.buzzparser_s, ptr %183, i32 0, i32 4
  %185 = load ptr, ptr %184, align 8, !tbaa !13
  %186 = getelementptr inbounds %struct.buzztok_s, ptr %185, i32 0, i32 0
  %187 = load i32, ptr %186, align 8, !tbaa !14
  %188 = icmp ne i32 %187, 31
  br i1 %188, label %189, label %196

189:                                              ; preds = %182
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.buzzparser_s, ptr %190, i32 0, i32 4
  %192 = load ptr, ptr %191, align 8, !tbaa !13
  %193 = getelementptr inbounds %struct.buzztok_s, ptr %192, i32 0, i32 0
  %194 = load i32, ptr %193, align 8, !tbaa !14
  %195 = icmp eq i32 %194, 26
  br label %196

196:                                              ; preds = %189, %182
  %197 = phi i1 [ false, %182 ], [ %195, %189 ]
  br i1 %197, label %173, label %198, !llvm.loop !32

198:                                              ; preds = %196
  %199 = 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)
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.buzzparser_s, ptr %200, i32 0, i32 8
  store ptr %199, ptr %201, align 8, !tbaa !33
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.buzzparser_s, ptr %202, i32 0, i32 7
  %204 = load ptr, ptr %203, align 8, !tbaa !19
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.buzzparser_s, ptr %205, i32 0, i32 7
  %207 = load ptr, ptr %206, align 8, !tbaa !19
  %208 = getelementptr inbounds %struct.buzzdarray_s, ptr %207, i32 0, i32 1
  %209 = load i64, ptr %208, align 8, !tbaa !20
  %210 = trunc i64 %209 to i32
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.buzzparser_s, ptr %211, i32 0, i32 8
  call void @buzzdarray_insert(ptr noundef %204, i32 noundef %210, ptr noundef %212)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.buzzparser_s, ptr %213, i32 0, i32 7
  %215 = load ptr, ptr %214, align 8, !tbaa !19
  %216 = call ptr @sym_lookup(ptr noundef @.str.24, ptr noundef %215)
  store ptr %216, ptr %8, align 8, !tbaa !5
  %217 = load ptr, ptr %8, align 8, !tbaa !5
  %218 = icmp ne ptr %217, null
  br i1 %218, label %219, label %224

219:                                              ; preds = %198
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.sym_s, ptr %220, i32 0, i32 2
  %222 = load i32, ptr %221, align 4, !tbaa !34
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %224, label %227

224:                                              ; preds = %219, %198
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = load i32, ptr @SCOPE_LOCAL, align 4, !tbaa !9
  call void @sym_add(ptr noundef %225, ptr noundef @.str.24, i32 noundef %226)
  br label %227

227:                                              ; preds = %224, %219
  %228 = load ptr, ptr %3, align 8, !tbaa !5
  %229 = call i32 @parse_idlist(ptr noundef %228)
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %233, label %231

231:                                              ; preds = %227
  %232 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !9
  store i32 %232, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %348

233:                                              ; preds = %227
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  %235 = call i32 @match(ptr noundef %234, i32 noundef 23)
  %236 = icmp ne i32 %235, 0
  br i1 %236, label %239, label %237

237:                                              ; preds = %233
  %238 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !9
  store i32 %238, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %348

239:                                              ; preds = %233
  br label %240

240:                                              ; preds = %263, %239
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.buzzparser_s, ptr %241, i32 0, i32 4
  call void @buzzlex_destroytok(ptr noundef %242)
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.buzzparser_s, ptr %243, i32 0, i32 3
  %245 = load ptr, ptr %244, align 8, !tbaa !11
  %246 = call ptr @buzzlex_nexttok(ptr noundef %245)
  %247 = load ptr, ptr %3, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.buzzparser_s, ptr %247, i32 0, i32 4
  store ptr %246, ptr %248, align 8, !tbaa !13
  br label %249

249:                                              ; preds = %240
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.buzzparser_s, ptr %250, i32 0, i32 4
  %252 = load ptr, ptr %251, align 8, !tbaa !13
  %253 = getelementptr inbounds %struct.buzztok_s, ptr %252, i32 0, i32 0
  %254 = load i32, ptr %253, align 8, !tbaa !14
  %255 = icmp ne i32 %254, 31
  br i1 %255, label %256, label %263

256:                                              ; preds = %249
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.buzzparser_s, ptr %257, i32 0, i32 4
  %259 = load ptr, ptr %258, align 8, !tbaa !13
  %260 = getelementptr inbounds %struct.buzztok_s, ptr %259, i32 0, i32 0
  %261 = load i32, ptr %260, align 8, !tbaa !14
  %262 = icmp eq i32 %261, 26
  br label %263

263:                                              ; preds = %256, %249
  %264 = phi i1 [ false, %249 ], [ %262, %256 ]
  br i1 %264, label %240, label %265, !llvm.loop !36

265:                                              ; preds = %263
  %266 = load ptr, ptr %3, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.buzzparser_s, ptr %266, i32 0, i32 4
  %268 = load ptr, ptr %267, align 8, !tbaa !13
  %269 = getelementptr inbounds %struct.buzztok_s, ptr %268, i32 0, i32 0
  %270 = load i32, ptr %269, align 8, !tbaa !14
  %271 = icmp eq i32 %270, 2
  br i1 %271, label %272, label %299

272:                                              ; preds = %265
  br label %273

273:                                              ; preds = %296, %272
  %274 = load ptr, ptr %3, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.buzzparser_s, ptr %274, i32 0, i32 4
  call void @buzzlex_destroytok(ptr noundef %275)
  %276 = load ptr, ptr %3, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.buzzparser_s, ptr %276, i32 0, i32 3
  %278 = load ptr, ptr %277, align 8, !tbaa !11
  %279 = call ptr @buzzlex_nexttok(ptr noundef %278)
  %280 = load ptr, ptr %3, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.buzzparser_s, ptr %280, i32 0, i32 4
  store ptr %279, ptr %281, align 8, !tbaa !13
  br label %282

282:                                              ; preds = %273
  %283 = load ptr, ptr %3, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.buzzparser_s, ptr %283, i32 0, i32 4
  %285 = load ptr, ptr %284, align 8, !tbaa !13
  %286 = getelementptr inbounds %struct.buzztok_s, ptr %285, i32 0, i32 0
  %287 = load i32, ptr %286, align 8, !tbaa !14
  %288 = icmp ne i32 %287, 31
  br i1 %288, label %289, label %296

289:                                              ; preds = %282
  %290 = load ptr, ptr %3, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.buzzparser_s, ptr %290, i32 0, i32 4
  %292 = load ptr, ptr %291, align 8, !tbaa !13
  %293 = getelementptr inbounds %struct.buzztok_s, ptr %292, i32 0, i32 0
  %294 = load i32, ptr %293, align 8, !tbaa !14
  %295 = icmp eq i32 %294, 26
  br label %296

296:                                              ; preds = %289, %282
  %297 = phi i1 [ false, %282 ], [ %295, %289 ]
  br i1 %297, label %273, label %298, !llvm.loop !37

298:                                              ; preds = %296
  br label %299

299:                                              ; preds = %298, %265
  %300 = load ptr, ptr %3, align 8, !tbaa !5
  %301 = call i32 @parse_block(ptr noundef %300, i32 noundef 0)
  %302 = icmp ne i32 %301, 0
  br i1 %302, label %305, label %303

303:                                              ; preds = %299
  %304 = load i32, ptr @PARSE_ERROR, align 4, !tbaa !9
  store i32 %304, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %348

305:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %306 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %9, ptr noundef @.str.25) #4
  %307 = load ptr, ptr %3, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.buzzparser_s, ptr %307, i32 0, i32 6
  %309 = load ptr, ptr %308, align 8, !tbaa !28
  %310 = load ptr, ptr %9, align 8, !tbaa !5
  %311 = load ptr, ptr %3, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.buzzparser_s, ptr %311, i32 0, i32 4
  %313 = load ptr, ptr %312, align 8, !tbaa !13
  call void @chunk_addcode(ptr noundef %309, ptr noundef %310, ptr noundef %313)
  %314 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %314) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %315 = load ptr, ptr %3, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.buzzparser_s, ptr %315, i32 0, i32 7
  %317 = load ptr, ptr %316, align 8, !tbaa !19
  %318 = load ptr, ptr %3, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.buzzparser_s, ptr %318, i32 0, i32 7
  %320 = load ptr, ptr %319, align 8, !tbaa !19
  %321 = getelementptr inbounds %struct.buzzdarray_s, ptr %320, i32 0, i32 1
  %322 = load i64, ptr %321, align 8, !tbaa !20
  %323 = sub nsw i64 %322, 1
  %324 = trunc i64 %323 to i32
  call void @buzzdarray_remove(ptr noundef %317, i32 noundef %324)
  %325 = load ptr, ptr %3, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.buzzparser_s, ptr %325, i32 0, i32 7
  %327 = load ptr, ptr %326, align 8, !tbaa !19
  %328 = getelementptr inbounds %struct.buzzdarray_s, ptr %327, i32 0, i32 0
  %329 = load ptr, ptr %328, align 8, !tbaa !22
  %330 = load ptr, ptr %3, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.buzzparser_s, ptr %330, i32 0, i32 7
  %332 = load ptr, ptr %331, align 8, !tbaa !19
  %333 = getelementptr inbounds %struct.buzzdarray_s, ptr %332, i32 0, i32 1
  %334 = load i64, ptr %333, align 8, !tbaa !20
  %335 = sub nsw i64 %334, 1
  %336 = getelementptr inbounds ptr, ptr %329, i64 %335
  %337 = load ptr, ptr %336, align 8, !tbaa !5
  %338 = load ptr, ptr %3, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.buzzparser_s, ptr %338, i32 0, i32 8
  store ptr %337, ptr %339, align 8, !tbaa !33
  %340 = load ptr, ptr %3, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.buzzparser_s, ptr %340, i32 0, i32 6
  %342 = load ptr, ptr %341, align 8, !tbaa !28
  call void @chunk_finalize(ptr noundef %342)
  %343 = load ptr, ptr %6, align 8, !tbaa !5
  %344 = load ptr, ptr %3, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.buzzparser_s, ptr %344, i32 0, i32 6
  store ptr %343, ptr %345, align 8, !tbaa !28
  %346 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %346) #4
  %347 = load i32, ptr @PARSE_OK, align 4, !tbaa !9
  store i32 %347, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %348

348:                                              ; preds = %305, %303, %237, %231
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %349

349:                                              ; preds = %348, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %350

350:                                              ; preds = %349, %54, %45, %13
  %351 = load i32, ptr %2, align 4
  ret i32 %351
}

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @parse_idlist(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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"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, !10, i64 80}
!13 = !{!12, !6, i64 32}
!14 = !{!15, !10, i64 0}
!15 = !{!"buzztok_s", !10, i64 0, !6, i64 8, !16, i64 16, !16, i64 24, !6, i64 32}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !6, i64 56}
!20 = !{!21, !16, i64 8}
!21 = !{!"buzzdarray_s", !6, i64 0, !16, i64 8, !10, i64 16, !10, i64 20, !6, i64 24}
!22 = !{!21, !6, i64 0}
!23 = !{!24, !6, i64 40}
!24 = !{!"buzzlex_file_s", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !6, i64 32, !6, i64 40}
!25 = !{!15, !16, i64 16}
!26 = !{!15, !16, i64 24}
!27 = !{!15, !6, i64 8}
!28 = !{!12, !6, i64 48}
!29 = !{!12, !10, i64 80}
!30 = !{!12, !6, i64 40}
!31 = distinct !{!31, !18}
!32 = distinct !{!32, !18}
!33 = !{!12, !6, i64 64}
!34 = !{!35, !10, i64 12}
!35 = !{!"sym_s", !16, i64 0, !10, i64 8, !10, i64 12}
!36 = distinct !{!36, !18}
!37 = distinct !{!37, !18}


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

@SCOPE_AUTO = external hidden local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@PARSE_ERROR = external hidden local_unnamed_addr global i32, align 4
@PARSE_OK = external hidden local_unnamed_addr global i32, align 4
@SCOPE_LOCAL = external hidden local_unnamed_addr global i32, align 4
@.str.23 = external hidden unnamed_addr constant [165 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = 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: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @sym_lookup(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local void @sym_add(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

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

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

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

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

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
define dso_local i32 @parse_fun(ptr noundef %0) local_unnamed_addr #5 {
  %2 = alloca ptr, align 8
  %3 = tail call i32 @match(ptr noundef %0, i32 noundef 7)
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %110, label %.preheader107

.preheader107:                                    ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  br label %6

6:                                                ; preds = %.preheader107, %6
  tail call void @buzzlex_destroytok(ptr noundef nonnull %4) #7
  %7 = load ptr, ptr %5, align 8, !tbaa !5
  %8 = tail call ptr @buzzlex_nexttok(ptr noundef %7) #7
  store ptr %8, ptr %4, align 8, !tbaa !11
  %9 = load i32, ptr %8, align 8, !tbaa !12
  %cond = icmp eq i32 %9, 26
  br i1 %cond, label %6, label %.critedge

.critedge:                                        ; preds = %6
  %10 = tail call i32 @match(ptr noundef nonnull %0, i32 noundef 0)
  %.not88 = icmp eq i32 %10, 0
  br i1 %.not88, label %110, label %11

11:                                               ; preds = %.critedge
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load i64, ptr %14, align 8, !tbaa !16
  %16 = icmp sgt i64 %15, 1
  br i1 %16, label %17, label %36

17:                                               ; preds = %11
  %18 = load ptr, ptr @stderr, align 8, !tbaa !18
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !19
  %21 = getelementptr inbounds i8, ptr %19, i64 8
  %22 = load i64, ptr %21, align 8, !tbaa !16
  %23 = getelementptr ptr, ptr %20, i64 %22
  %24 = getelementptr i8, ptr %23, i64 -8
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %26 = getelementptr inbounds i8, ptr %25, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !20
  %28 = load ptr, ptr %4, align 8, !tbaa !11
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = load i64, ptr %29, align 8, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %28, i64 24
  %32 = load i64, ptr %31, align 8, !tbaa !23
  %33 = getelementptr inbounds i8, ptr %28, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !24
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.23, ptr noundef %27, i64 noundef %30, i64 noundef %32, ptr noundef %34, ptr noundef %34) #8
  br label %110

36:                                               ; preds = %11
  %37 = load ptr, ptr %4, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  %40 = tail call noalias ptr @strdup(ptr noundef %39) #7
  %41 = tail call ptr @sym_lookup(ptr noundef %40, ptr noundef nonnull %13)
  %.not89 = icmp eq ptr %41, null
  br i1 %.not89, label %42, label %44

42:                                               ; preds = %36
  %43 = load i32, ptr @SCOPE_AUTO, align 4, !tbaa !25
  tail call void @sym_add(ptr noundef nonnull %0, ptr noundef %40, i32 noundef %43)
  br label %44

44:                                               ; preds = %42, %36
  %45 = getelementptr inbounds i8, ptr %0, i64 48
  %46 = load ptr, ptr %45, align 8, !tbaa !26
  %47 = getelementptr inbounds i8, ptr %0, i64 80
  %48 = load i32, ptr %47, align 8, !tbaa !27
  %49 = load ptr, ptr %12, align 8, !tbaa !15
  %50 = tail call ptr @sym_lookup(ptr noundef %40, ptr noundef %49)
  %51 = tail call ptr @chunk_new(i32 noundef %48, ptr noundef %50)
  store ptr %51, ptr %45, align 8, !tbaa !26
  %52 = getelementptr inbounds i8, ptr %0, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !28
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = load i64, ptr %54, align 8, !tbaa !16
  %56 = trunc i64 %55 to i32
  tail call void @buzzdarray_insert(ptr noundef %53, i32 noundef %56, ptr noundef nonnull %45) #7
  %57 = load i32, ptr %47, align 8, !tbaa !27
  %58 = add i32 %57, 1
  store i32 %58, ptr %47, align 8, !tbaa !27
  br label %59

59:                                               ; preds = %59, %44
  tail call void @buzzlex_destroytok(ptr noundef nonnull %4) #7
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = tail call ptr @buzzlex_nexttok(ptr noundef %60) #7
  store ptr %61, ptr %4, align 8, !tbaa !11
  %62 = load i32, ptr %61, align 8, !tbaa !12
  %cond100 = icmp eq i32 %62, 26
  br i1 %cond100, label %59, label %.critedge2

.critedge2:                                       ; preds = %59
  %63 = tail call i32 @match(ptr noundef nonnull %0, i32 noundef 22)
  %.not91 = icmp eq i32 %63, 0
  br i1 %.not91, label %110, label %.preheader106

.preheader106:                                    ; preds = %.critedge2, %.preheader106
  tail call void @buzzlex_destroytok(ptr noundef nonnull %4) #7
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = tail call ptr @buzzlex_nexttok(ptr noundef %64) #7
  store ptr %65, ptr %4, align 8, !tbaa !11
  %66 = load i32, ptr %65, align 8, !tbaa !12
  %cond101 = icmp eq i32 %66, 26
  br i1 %cond101, label %.preheader106, label %.critedge4

.critedge4:                                       ; preds = %.preheader106
  %67 = 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) #7
  %68 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %67, ptr %68, align 8, !tbaa !29
  %69 = load ptr, ptr %12, align 8, !tbaa !15
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i64, ptr %70, align 8, !tbaa !16
  %72 = trunc i64 %71 to i32
  tail call void @buzzdarray_insert(ptr noundef %69, i32 noundef %72, ptr noundef nonnull %68) #7
  %73 = load ptr, ptr %12, align 8, !tbaa !15
  %74 = tail call ptr @sym_lookup(ptr noundef nonnull @.str.24, ptr noundef %73)
  %.not93 = icmp eq ptr %74, null
  br i1 %.not93, label %78, label %75

75:                                               ; preds = %.critedge4
  %76 = getelementptr inbounds i8, ptr %74, i64 12
  %77 = load i32, ptr %76, align 4, !tbaa !30
  %.not94 = icmp eq i32 %77, 0
  br i1 %.not94, label %80, label %78

78:                                               ; preds = %75, %.critedge4
  %79 = load i32, ptr @SCOPE_LOCAL, align 4, !tbaa !25
  tail call void @sym_add(ptr noundef nonnull %0, ptr noundef nonnull @.str.24, i32 noundef %79)
  br label %80

80:                                               ; preds = %78, %75
  %81 = tail call i32 @parse_idlist(ptr noundef nonnull %0)
  %.not95 = icmp eq i32 %81, 0
  br i1 %.not95, label %110, label %82

82:                                               ; preds = %80
  %83 = tail call i32 @match(ptr noundef nonnull %0, i32 noundef 23)
  %.not96 = icmp eq i32 %83, 0
  br i1 %.not96, label %110, label %.preheader104

.preheader104:                                    ; preds = %82, %.preheader104
  tail call void @buzzlex_destroytok(ptr noundef nonnull %4) #7
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = tail call ptr @buzzlex_nexttok(ptr noundef %84) #7
  store ptr %85, ptr %4, align 8, !tbaa !11
  %86 = load i32, ptr %85, align 8, !tbaa !12
  switch i32 %86, label %.critedge8 [
    i32 26, label %.preheader104
    i32 2, label %.preheader
  ]

.preheader:                                       ; preds = %.preheader104, %.preheader
  tail call void @buzzlex_destroytok(ptr noundef nonnull %4) #7
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = tail call ptr @buzzlex_nexttok(ptr noundef %87) #7
  store ptr %88, ptr %4, align 8, !tbaa !11
  %89 = load i32, ptr %88, align 8, !tbaa !12
  %cond103 = icmp eq i32 %89, 26
  br i1 %cond103, label %.preheader, label %.critedge8

.critedge8:                                       ; preds = %.preheader104, %.preheader
  %90 = tail call i32 @parse_block(ptr noundef nonnull %0, i32 noundef 0)
  %.not99 = icmp eq i32 %90, 0
  br i1 %.not99, label %110, label %91

91:                                               ; preds = %.critedge8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %92 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.25) #7
  %93 = load ptr, ptr %45, align 8, !tbaa !26
  %94 = load ptr, ptr %2, align 8, !tbaa !18
  %95 = load ptr, ptr %4, align 8, !tbaa !11
  call void @chunk_addcode(ptr noundef %93, ptr noundef %94, ptr noundef %95)
  %96 = load ptr, ptr %2, align 8, !tbaa !18
  call void @free(ptr noundef %96) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %97 = load ptr, ptr %12, align 8, !tbaa !15
  %98 = getelementptr inbounds i8, ptr %97, i64 8
  %99 = load i64, ptr %98, align 8, !tbaa !16
  %100 = trunc i64 %99 to i32
  %101 = add i32 %100, -1
  call void @buzzdarray_remove(ptr noundef %97, i32 noundef %101) #7
  %102 = load ptr, ptr %12, align 8, !tbaa !15
  %103 = load ptr, ptr %102, align 8, !tbaa !19
  %104 = getelementptr inbounds i8, ptr %102, i64 8
  %105 = load i64, ptr %104, align 8, !tbaa !16
  %106 = getelementptr ptr, ptr %103, i64 %105
  %107 = getelementptr i8, ptr %106, i64 -8
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  store ptr %108, ptr %68, align 8, !tbaa !29
  %109 = load ptr, ptr %45, align 8, !tbaa !26
  call void @chunk_finalize(ptr noundef %109)
  store ptr %46, ptr %45, align 8, !tbaa !26
  call void @free(ptr noundef %40) #7
  br label %110

110:                                              ; preds = %.critedge2, %.critedge8, %82, %80, %91, %.critedge, %1, %17
  %.2.in = phi ptr [ @PARSE_ERROR, %17 ], [ @PARSE_ERROR, %1 ], [ @PARSE_ERROR, %.critedge ], [ @PARSE_ERROR, %.critedge2 ], [ @PARSE_OK, %91 ], [ @PARSE_ERROR, %80 ], [ @PARSE_ERROR, %82 ], [ @PARSE_ERROR, %.critedge8 ]
  %.2 = load i32, ptr %.2.in, align 4, !tbaa !25
  ret i32 %.2
}

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

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

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

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 = { mustprogress nofree nounwind willreturn 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !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 = !{!6, !7, i64 56}
!16 = !{!17, !14, i64 8}
!17 = !{!"buzzdarray_s", !7, i64 0, !14, i64 8, !10, i64 16, !10, i64 20, !7, i64 24}
!18 = !{!7, !7, i64 0}
!19 = !{!17, !7, i64 0}
!20 = !{!21, !7, i64 40}
!21 = !{!"buzzlex_file_s", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !7, i64 32, !7, i64 40}
!22 = !{!13, !14, i64 16}
!23 = !{!13, !14, i64 24}
!24 = !{!13, !7, i64 8}
!25 = !{!10, !10, i64 0}
!26 = !{!6, !7, i64 48}
!27 = !{!6, !10, i64 80}
!28 = !{!6, !7, i64 40}
!29 = !{!6, !7, i64 64}
!30 = !{!31, !10, i64 12}
!31 = !{!"sym_s", !14, i64 0, !10, i64 8, !10, i64 12}


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