; LLVM IR from EarlGray/language-incubator :: llvm/kldscp (ast)

; 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 = type { i32, i32, ptr }
%struct.lexstate = type { i32, double, [256 x i8], i8, i32, ptr }

@stderr = external global ptr, align 8
@binop_preceds = external dso_local global <{ [61 x i32], [67 x i32] }>, align 16
@unary_op = external dso_local global [128 x i32], align 16
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @new_list() #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

; Function Attrs: nounwind uwtable
declare dso_local ptr @list_append(ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @binop_precedence(i32 noundef) #0

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #3

; Function Attrs: nounwind uwtable
declare dso_local void @next_token(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @new_fundef(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @parse_error(ptr noundef, ptr noundef, ...) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @parse_expr(ptr noundef) #0

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @parse_opdef(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [10 x i8], align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.parser, ptr %11, i32 0, i32 0
  %13 = load i32, ptr %12, align 8, !tbaa !9
  switch i32 %13, label %15 [
    i32 -11, label %14
    i32 -10, label %14
  ]

14:                                               ; preds = %1, %1
  br label %18

15:                                               ; preds = %1
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %16, ptr noundef @.str.32)
  store ptr %17, ptr %2, align 8
  br label %192

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.parser, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = icmp eq i32 %21, -10
  %23 = zext i1 %22 to i32
  store i32 %23, ptr %4, align 4, !tbaa !12
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.parser, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !9
  store i32 %27, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 100, ptr %6, align 4, !tbaa !12
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.parser, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !9
  %31 = icmp eq i32 %30, -5
  br i1 %31, label %32, label %42

32:                                               ; preds = %18
  %33 = load i32, ptr %4, align 4, !tbaa !12
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %42, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.parser, ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = getelementptr inbounds %struct.lexstate, ptr %38, i32 0, i32 3
  %40 = load i8, ptr %39, align 8, !tbaa !14
  %41 = sext i8 %40 to i32
  store i32 %41, ptr %5, align 4, !tbaa !12
  br label %42

42:                                               ; preds = %35, %32, %18
  %43 = load i32, ptr %4, align 4, !tbaa !12
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %53

45:                                               ; preds = %42
  %46 = load i32, ptr %5, align 4, !tbaa !12
  %47 = call i32 @binop_precedence(i32 noundef %46)
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %53

49:                                               ; preds = %45
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = load i32, ptr %5, align 4, !tbaa !12
  %52 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %50, ptr noundef @.str.33, i32 noundef %51)
  store ptr %52, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %191

53:                                               ; preds = %45, %42
  %54 = call ptr @__ctype_b_loc() #5
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load i32, ptr %5, align 4, !tbaa !12
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i16, ptr %55, i64 %57
  %59 = load i16, ptr %58, align 2, !tbaa !17
  %60 = zext i16 %59 to i32
  %61 = and i32 %60, 4
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %67, label %63

63:                                               ; preds = %53
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = load i32, ptr %5, align 4, !tbaa !12
  %66 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %64, ptr noundef @.str.34, i32 noundef %65)
  store ptr %66, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %191

67:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 10, ptr %8) #4
  %68 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %69 = load i32, ptr %4, align 4, !tbaa !12
  %70 = icmp ne i32 %69, 0
  %71 = zext i1 %70 to i64
  %72 = select i1 %70, ptr @.str.10, ptr @.str.11
  %73 = load i32, ptr %5, align 4, !tbaa !12
  %74 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %68, i64 noundef 10, ptr noundef @.str.35, ptr noundef %72, i32 noundef %73) #4
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %75)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.parser, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !9
  %79 = icmp eq i32 %78, -6
  br i1 %79, label %80, label %88

80:                                               ; preds = %67
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.parser, ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = getelementptr inbounds %struct.lexstate, ptr %83, i32 0, i32 1
  %85 = load double, ptr %84, align 8, !tbaa !19
  %86 = fptosi double %85 to i32
  store i32 %86, ptr %6, align 4, !tbaa !12
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %87)
  br label %88

88:                                               ; preds = %80, %67
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.parser, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !9
  %92 = icmp ne i32 %91, 40
  br i1 %92, label %93, label %96

93:                                               ; preds = %88
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %94, ptr noundef @.str.36)
  store ptr %95, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %190

96:                                               ; preds = %88
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %97)
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.parser, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 8, !tbaa !9
  %101 = icmp ne i32 %100, -4
  br i1 %101, label %102, label %105

102:                                              ; preds = %96
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %103, ptr noundef @.str.37)
  store ptr %104, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %190

105:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %106 = call ptr @new_list()
  store ptr %106, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.parser, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = getelementptr inbounds %struct.lexstate, ptr %110, i32 0, i32 2
  %112 = getelementptr inbounds [256 x i8], ptr %111, i64 0, i64 0
  %113 = call noalias ptr @strdup(ptr noundef %112) #4
  %114 = call ptr @list_append(ptr noundef %107, ptr noundef %113)
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %115)
  %116 = load i32, ptr %4, align 4, !tbaa !12
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %145

118:                                              ; preds = %105
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.parser, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %120, align 8, !tbaa !9
  %122 = icmp ne i32 %121, 44
  br i1 %122, label %123, label %126

123:                                              ; preds = %118
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %124, ptr noundef @.str.38)
  store ptr %125, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %189

126:                                              ; preds = %118
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %127)
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.parser, ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 8, !tbaa !9
  %131 = icmp ne i32 %130, -4
  br i1 %131, label %132, label %135

132:                                              ; preds = %126
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %133, ptr noundef @.str.39)
  store ptr %134, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %189

135:                                              ; preds = %126
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.parser, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !13
  %140 = getelementptr inbounds %struct.lexstate, ptr %139, i32 0, i32 2
  %141 = getelementptr inbounds [256 x i8], ptr %140, i64 0, i64 0
  %142 = call noalias ptr @strdup(ptr noundef %141) #4
  %143 = call ptr @list_append(ptr noundef %136, ptr noundef %142)
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %144)
  br label %145

145:                                              ; preds = %135, %105
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.parser, ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !9
  %149 = icmp ne i32 %148, 41
  br i1 %149, label %150, label %158

150:                                              ; preds = %145
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %153 = load i32, ptr %4, align 4, !tbaa !12
  %154 = icmp ne i32 %153, 0
  %155 = zext i1 %154 to i64
  %156 = select i1 %154, i32 2, i32 1
  %157 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef %151, ptr noundef @.str.40, ptr noundef %152, i32 noundef %156)
  store ptr %157, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %189

158:                                              ; preds = %145
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  call void @next_token(ptr noundef %159)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = call ptr @parse_expr(ptr noundef %160)
  store ptr %161, ptr %10, align 8, !tbaa !5
  br label %162

162:                                              ; preds = %158
  %163 = load ptr, ptr %10, align 8, !tbaa !5
  %164 = icmp ne ptr %163, null
  br i1 %164, label %168, label %165

165:                                              ; preds = %162
  %166 = load ptr, ptr @stderr, align 8, !tbaa !5
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %166, ptr noundef @.str.41) #4
  store ptr null, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %188

168:                                              ; preds = %162
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %4, align 4, !tbaa !12
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %178

173:                                              ; preds = %170
  %174 = load i32, ptr %6, align 4, !tbaa !12
  %175 = load i32, ptr %5, align 4, !tbaa !12
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [128 x i32], ptr @binop_preceds, i64 0, i64 %176
  store i32 %174, ptr %177, align 4, !tbaa !12
  br label %182

178:                                              ; preds = %170
  %179 = load i32, ptr %5, align 4, !tbaa !12
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [128 x i32], ptr @unary_op, i64 0, i64 %180
  store i32 1, ptr %181, align 4, !tbaa !12
  br label %182

182:                                              ; preds = %178, %173
  %183 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %184 = call noalias ptr @strdup(ptr noundef %183) #4
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = load ptr, ptr %10, align 8, !tbaa !5
  %187 = call ptr @new_fundef(ptr noundef %184, ptr noundef %185, ptr noundef %186)
  store ptr %187, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %188

188:                                              ; preds = %182, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %189

189:                                              ; preds = %188, %150, %132, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %190

190:                                              ; preds = %189, %102, %93
  call void @llvm.lifetime.end.p0(i64 10, ptr %8) #4
  br label %191

191:                                              ; preds = %190, %63, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %192

192:                                              ; preds = %191, %15
  %193 = load ptr, ptr %2, align 8
  ret ptr %193
}

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(none) }

!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, !11, i64 0}
!10 = !{!"parser", !11, i64 0, !11, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!15, !7, i64 272}
!15 = !{!"lexstate", !11, i64 0, !16, i64 8, !7, i64 16, !7, i64 272, !11, i64 276, !6, i64 280}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{!15, !16, i64 8}


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

@stderr = external local_unnamed_addr global ptr, align 8
@binop_preceds = external dso_local local_unnamed_addr global <{ [61 x i32], [67 x i32] }>, align 16
@unary_op = external dso_local local_unnamed_addr global [128 x i32], align 16
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @new_list() 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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @binop_precedence(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @parse_error(ptr noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @parse_expr(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local ptr @parse_opdef(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [10 x i8], align 1
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %.off = add i32 %3, 11
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %6, label %4

4:                                                ; preds = %1
  %5 = tail call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.32)
  br label %83

6:                                                ; preds = %1
  %7 = icmp eq i32 %3, -10
  tail call void @next_token(ptr noundef nonnull %0)
  %8 = load i32, ptr %0, align 8, !tbaa !5
  %9 = icmp ne i32 %8, -5
  %or.cond = or i1 %7, %9
  br i1 %or.cond, label %15, label %.thread

.thread:                                          ; preds = %6
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %11, i64 272
  %13 = load i8, ptr %12, align 8, !tbaa !12
  %14 = sext i8 %13 to i32
  br label %20

15:                                               ; preds = %6
  br i1 %7, label %16, label %20

16:                                               ; preds = %15
  %17 = tail call i32 @binop_precedence(i32 noundef %8)
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %20, label %18

18:                                               ; preds = %16
  %19 = tail call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.33, i32 noundef %8)
  br label %83

20:                                               ; preds = %.thread, %16, %15
  %.05162 = phi i32 [ %14, %.thread ], [ %8, %16 ], [ %8, %15 ]
  %21 = tail call ptr @__ctype_b_loc() #5
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %23 = sext i32 %.05162 to i64
  %24 = getelementptr inbounds i16, ptr %22, i64 %23
  %25 = load i16, ptr %24, align 2, !tbaa !16
  %26 = and i16 %25, 4
  %.not54 = icmp eq i16 %26, 0
  br i1 %.not54, label %27, label %29

27:                                               ; preds = %20
  %28 = tail call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.34, i32 noundef %.05162)
  br label %83

29:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %2) #6
  %30 = select i1 %7, ptr @.str.10, ptr @.str.11
  %31 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 10, ptr noundef nonnull @.str.35, ptr noundef nonnull %30, i32 noundef %.05162) #6
  tail call void @next_token(ptr noundef nonnull %0)
  %32 = load i32, ptr %0, align 8, !tbaa !5
  %33 = icmp eq i32 %32, -6
  br i1 %33, label %34, label %40

34:                                               ; preds = %29
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load double, ptr %37, align 8, !tbaa !18
  %39 = fptosi double %38 to i32
  tail call void @next_token(ptr noundef nonnull %0)
  %.pr = load i32, ptr %0, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %34, %29
  %41 = phi i32 [ %.pr, %34 ], [ %32, %29 ]
  %.052 = phi i32 [ %39, %34 ], [ 100, %29 ]
  %.not55 = icmp eq i32 %41, 40
  br i1 %.not55, label %44, label %42

42:                                               ; preds = %40
  %43 = tail call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.36)
  br label %82

44:                                               ; preds = %40
  tail call void @next_token(ptr noundef nonnull %0)
  %45 = load i32, ptr %0, align 8, !tbaa !5
  %.not56 = icmp eq i32 %45, -4
  br i1 %.not56, label %48, label %46

46:                                               ; preds = %44
  %47 = tail call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.37)
  br label %82

48:                                               ; preds = %44
  %49 = tail call ptr @new_list()
  %50 = getelementptr inbounds i8, ptr %0, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = tail call noalias ptr @strdup(ptr noundef nonnull %52) #6
  %54 = tail call ptr @list_append(ptr noundef %49, ptr noundef %53)
  tail call void @next_token(ptr noundef nonnull %0)
  br i1 %7, label %55, label %68

55:                                               ; preds = %48
  %56 = load i32, ptr %0, align 8, !tbaa !5
  %.not57 = icmp eq i32 %56, 44
  br i1 %.not57, label %59, label %57

57:                                               ; preds = %55
  %58 = tail call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.38)
  br label %82

59:                                               ; preds = %55
  tail call void @next_token(ptr noundef nonnull %0)
  %60 = load i32, ptr %0, align 8, !tbaa !5
  %.not58 = icmp eq i32 %60, -4
  br i1 %.not58, label %63, label %61

61:                                               ; preds = %59
  %62 = tail call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.39)
  br label %82

63:                                               ; preds = %59
  %64 = load ptr, ptr %50, align 8, !tbaa !11
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = tail call noalias ptr @strdup(ptr noundef nonnull %65) #6
  %67 = tail call ptr @list_append(ptr noundef %49, ptr noundef %66)
  tail call void @next_token(ptr noundef nonnull %0)
  br label %68

68:                                               ; preds = %63, %48
  %69 = load i32, ptr %0, align 8, !tbaa !5
  %.not59 = icmp eq i32 %69, 41
  br i1 %.not59, label %73, label %70

70:                                               ; preds = %68
  %71 = select i1 %7, i32 2, i32 1
  %72 = call ptr (ptr, ptr, ...) @parse_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.40, ptr noundef nonnull %2, i32 noundef %71)
  br label %82

73:                                               ; preds = %68
  tail call void @next_token(ptr noundef nonnull %0)
  %74 = tail call ptr @parse_expr(ptr noundef nonnull %0)
  %.not60 = icmp eq ptr %74, null
  br i1 %.not60, label %75, label %78

75:                                               ; preds = %73
  %76 = load ptr, ptr @stderr, align 8, !tbaa !15
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.41) #7
  br label %82

78:                                               ; preds = %73
  %binop_preceds.unary_op = select i1 %7, ptr @binop_preceds, ptr @unary_op
  %.052. = select i1 %7, i32 %.052, i32 1
  %79 = getelementptr inbounds [128 x i32], ptr %binop_preceds.unary_op, i64 0, i64 %23
  store i32 %.052., ptr %79, align 4, !tbaa !19
  %80 = call noalias ptr @strdup(ptr noundef nonnull %2) #6
  %81 = tail call ptr @new_fundef(ptr noundef %80, ptr noundef %49, ptr noundef nonnull %74)
  br label %82

82:                                               ; preds = %57, %61, %70, %78, %75, %46, %42
  %.2 = phi ptr [ %43, %42 ], [ %47, %46 ], [ %58, %57 ], [ %62, %61 ], [ %72, %70 ], [ %81, %78 ], [ null, %75 ]
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %2) #6
  br label %83

83:                                               ; preds = %18, %27, %82, %4
  %.4 = phi ptr [ %5, %4 ], [ %19, %18 ], [ %.2, %82 ], [ %28, %27 ]
  ret ptr %.4
}

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { 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 #5 = { nounwind willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { 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 0}
!6 = !{!"parser", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!13, !8, i64 272}
!13 = !{!"lexstate", !7, i64 0, !14, i64 8, !8, i64 16, !8, i64 272, !7, i64 276, !10, i64 280}
!14 = !{!"double", !8, i64 0}
!15 = !{!10, !10, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !8, i64 0}
!18 = !{!13, !14, i64 8}
!19 = !{!7, !7, i64 0}


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