; LLVM IR from aap/pdp6 :: tools (as6)

; 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.Token = type { i32, %union.anon.0 }
%union.anon.0 = type { i64 }
%struct.Value = type { i64, i32 }
%struct.Expr = type { i32, %struct.Value, ptr, i32, ptr, ptr }

@radix = external dso_local global i32, align 4
@litlevel = external dso_local global i32, align 4
@curlit = external dso_local global ptr, align 8
@peekt = external dso_local global %struct.Token, align 8
@.str.17 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @addlit(ptr noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare dso_local { i32, i64 } @token() #0

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @parseexpr(i32 noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.Token, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %struct.Token, align 8
  %11 = alloca %struct.Value, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.Token, align 8
  %14 = alloca %struct.Token, align 8
  %15 = alloca %struct.Value, align 8
  %16 = alloca %struct.Token, align 8
  %17 = alloca %struct.Token, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #3
  %18 = call { i32, i64 } @token()
  %19 = getelementptr inbounds { i32, i64 }, ptr %10, i32 0, i32 0
  %20 = extractvalue { i32, i64 } %18, 0
  store i32 %20, ptr %19, align 8
  %21 = getelementptr inbounds { i32, i64 }, ptr %10, i32 0, i32 1
  %22 = extractvalue { i32, i64 } %18, 1
  store i64 %22, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #3
  %23 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = icmp eq i32 %24, 13
  br i1 %25, label %30, label %26

26:                                               ; preds = %1
  %27 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = icmp eq i32 %28, 44
  br i1 %29, label %30, label %37

30:                                               ; preds = %26, %1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @peekt, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  %31 = call ptr @newexpr(i32 noundef 0)
  store ptr %31, ptr %4, align 8, !tbaa !13
  %32 = load ptr, ptr %4, align 8, !tbaa !13
  %33 = getelementptr inbounds %struct.Expr, ptr %32, i32 0, i32 1
  %34 = getelementptr inbounds %struct.Value, ptr %11, i32 0, i32 0
  store i64 0, ptr %34, align 8, !tbaa !15
  %35 = getelementptr inbounds %struct.Value, ptr %11, i32 0, i32 1
  store i32 0, ptr %35, align 8, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !19
  %36 = load ptr, ptr %4, align 8, !tbaa !13
  store ptr %36, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %240

37:                                               ; preds = %26
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 4
  br i1 %39, label %40, label %166

40:                                               ; preds = %37
  %41 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !11
  %43 = icmp eq i32 %42, 2
  br i1 %43, label %44, label %54

44:                                               ; preds = %40
  %45 = call ptr @newexpr(i32 noundef 0)
  store ptr %45, ptr %4, align 8, !tbaa !13
  %46 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 1
  %47 = load i64, ptr %46, align 8, !tbaa !10
  %48 = load ptr, ptr %4, align 8, !tbaa !13
  %49 = getelementptr inbounds %struct.Expr, ptr %48, i32 0, i32 1
  %50 = getelementptr inbounds %struct.Value, ptr %49, i32 0, i32 0
  store i64 %47, ptr %50, align 8, !tbaa !21
  %51 = load ptr, ptr %4, align 8, !tbaa !13
  %52 = getelementptr inbounds %struct.Expr, ptr %51, i32 0, i32 1
  %53 = getelementptr inbounds %struct.Value, ptr %52, i32 0, i32 1
  store i32 0, ptr %53, align 8, !tbaa !23
  br label %164

54:                                               ; preds = %40
  %55 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !11
  %57 = icmp eq i32 %56, 1
  br i1 %57, label %58, label %64

58:                                               ; preds = %54
  %59 = call ptr @newexpr(i32 noundef 1)
  store ptr %59, ptr %4, align 8, !tbaa !13
  %60 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !10
  %62 = load ptr, ptr %4, align 8, !tbaa !13
  %63 = getelementptr inbounds %struct.Expr, ptr %62, i32 0, i32 2
  store ptr %61, ptr %63, align 8, !tbaa !24
  br label %163

64:                                               ; preds = %54
  %65 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !11
  %67 = icmp eq i32 %66, 4
  br i1 %67, label %68, label %76

68:                                               ; preds = %64
  %69 = call ptr @newexpr(i32 noundef 2)
  store ptr %69, ptr %4, align 8, !tbaa !13
  %70 = load ptr, ptr %4, align 8, !tbaa !13
  %71 = getelementptr inbounds %struct.Expr, ptr %70, i32 0, i32 3
  store i32 4, ptr %71, align 8, !tbaa !25
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = call ptr @parseexpr(i32 noundef %72)
  %74 = load ptr, ptr %4, align 8, !tbaa !13
  %75 = getelementptr inbounds %struct.Expr, ptr %74, i32 0, i32 5
  store ptr %73, ptr %75, align 8, !tbaa !26
  br label %162

76:                                               ; preds = %64
  %77 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !11
  %79 = icmp eq i32 %78, 10
  br i1 %79, label %88, label %80

80:                                               ; preds = %76
  %81 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !11
  %83 = icmp eq i32 %82, 11
  br i1 %83, label %88, label %84

84:                                               ; preds = %80
  %85 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !11
  %87 = icmp eq i32 %86, 12
  br i1 %87, label %88, label %110

88:                                               ; preds = %84, %80, %76
  %89 = load i32, ptr @radix, align 4, !tbaa !5
  store i32 %89, ptr %8, align 4, !tbaa !5
  %90 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !11
  %92 = icmp eq i32 %91, 10
  br i1 %92, label %93, label %94

93:                                               ; preds = %88
  store i32 10, ptr @radix, align 4, !tbaa !5
  br label %106

94:                                               ; preds = %88
  %95 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !11
  %97 = icmp eq i32 %96, 11
  br i1 %97, label %98, label %99

98:                                               ; preds = %94
  store i32 8, ptr @radix, align 4, !tbaa !5
  br label %105

99:                                               ; preds = %94
  %100 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !11
  %102 = icmp eq i32 %101, 12
  br i1 %102, label %103, label %104

103:                                              ; preds = %99
  store i32 2, ptr @radix, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %103, %99
  br label %105

105:                                              ; preds = %104, %98
  br label %106

106:                                              ; preds = %105, %93
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = call ptr @parseexpr(i32 noundef %107)
  store ptr %108, ptr %4, align 8, !tbaa !13
  %109 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %109, ptr @radix, align 4, !tbaa !5
  br label %161

110:                                              ; preds = %84
  %111 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %112 = load i32, ptr %111, align 8, !tbaa !11
  %113 = icmp eq i32 %112, 60
  br i1 %113, label %114, label %126

114:                                              ; preds = %110
  %115 = call ptr @parseexpr(i32 noundef 0)
  store ptr %115, ptr %4, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #3
  %116 = call { i32, i64 } @token()
  %117 = getelementptr inbounds { i32, i64 }, ptr %13, i32 0, i32 0
  %118 = extractvalue { i32, i64 } %116, 0
  store i32 %118, ptr %117, align 8
  %119 = getelementptr inbounds { i32, i64 }, ptr %13, i32 0, i32 1
  %120 = extractvalue { i32, i64 } %116, 1
  store i64 %120, ptr %119, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  %121 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !11
  %123 = icmp ne i32 %122, 62
  br i1 %123, label %124, label %125

124:                                              ; preds = %114
  call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef @.str.17)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @peekt, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  br label %125

125:                                              ; preds = %124, %114
  br label %160

126:                                              ; preds = %110
  %127 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !11
  %129 = icmp eq i32 %128, 91
  br i1 %129, label %130, label %156

130:                                              ; preds = %126
  %131 = load i32, ptr @litlevel, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr @litlevel, align 4, !tbaa !5
  %133 = load ptr, ptr @curlit, align 8, !tbaa !13
  store ptr %133, ptr %9, align 8, !tbaa !13
  store ptr null, ptr @curlit, align 8, !tbaa !13
  call void @statement()
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #3
  %134 = call { i32, i64 } @token()
  %135 = getelementptr inbounds { i32, i64 }, ptr %14, i32 0, i32 0
  %136 = extractvalue { i32, i64 } %134, 0
  store i32 %136, ptr %135, align 8
  %137 = getelementptr inbounds { i32, i64 }, ptr %14, i32 0, i32 1
  %138 = extractvalue { i32, i64 } %134, 1
  store i64 %138, ptr %137, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #3
  %139 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %140 = load i32, ptr %139, align 8, !tbaa !11
  %141 = icmp ne i32 %140, 93
  br i1 %141, label %142, label %143

142:                                              ; preds = %130
  call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef @.str.18)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @peekt, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  br label %143

143:                                              ; preds = %142, %130
  %144 = call ptr @newexpr(i32 noundef 0)
  store ptr %144, ptr %4, align 8, !tbaa !13
  %145 = load ptr, ptr %4, align 8, !tbaa !13
  %146 = getelementptr inbounds %struct.Expr, ptr %145, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #3
  %147 = load ptr, ptr @curlit, align 8, !tbaa !13
  %148 = call { i64, i32 } @addlit(ptr noundef %147)
  %149 = getelementptr inbounds { i64, i32 }, ptr %15, i32 0, i32 0
  %150 = extractvalue { i64, i32 } %148, 0
  store i64 %150, ptr %149, align 8
  %151 = getelementptr inbounds { i64, i32 }, ptr %15, i32 0, i32 1
  %152 = extractvalue { i64, i32 } %148, 1
  store i32 %152, ptr %151, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %146, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #3
  %153 = load ptr, ptr %9, align 8, !tbaa !13
  store ptr %153, ptr @curlit, align 8, !tbaa !13
  %154 = load i32, ptr @litlevel, align 4, !tbaa !5
  %155 = add nsw i32 %154, -1
  store i32 %155, ptr @litlevel, align 4, !tbaa !5
  br label %159

156:                                              ; preds = %126
  %157 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !11
  call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef @.str.19, i32 noundef %158)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %240

159:                                              ; preds = %143
  br label %160

160:                                              ; preds = %159, %125
  br label %161

161:                                              ; preds = %160, %106
  br label %162

162:                                              ; preds = %161, %68
  br label %163

163:                                              ; preds = %162, %58
  br label %164

164:                                              ; preds = %163, %44
  %165 = load ptr, ptr %4, align 8, !tbaa !13
  store ptr %165, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %240

166:                                              ; preds = %37
  %167 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %168 = load i32, ptr %167, align 8, !tbaa !11
  %169 = icmp eq i32 %168, 2
  br i1 %169, label %198, label %170

170:                                              ; preds = %166
  %171 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %172 = load i32, ptr %171, align 8, !tbaa !11
  %173 = icmp eq i32 %172, 1
  br i1 %173, label %198, label %174

174:                                              ; preds = %170
  %175 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %176 = load i32, ptr %175, align 8, !tbaa !11
  %177 = icmp eq i32 %176, 4
  br i1 %177, label %198, label %178

178:                                              ; preds = %174
  %179 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %180 = load i32, ptr %179, align 8, !tbaa !11
  %181 = icmp eq i32 %180, 60
  br i1 %181, label %198, label %182

182:                                              ; preds = %178
  %183 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %184 = load i32, ptr %183, align 8, !tbaa !11
  %185 = icmp eq i32 %184, 91
  br i1 %185, label %198, label %186

186:                                              ; preds = %182
  %187 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %188 = load i32, ptr %187, align 8, !tbaa !11
  %189 = icmp eq i32 %188, 10
  br i1 %189, label %198, label %190

190:                                              ; preds = %186
  %191 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %192 = load i32, ptr %191, align 8, !tbaa !11
  %193 = icmp eq i32 %192, 11
  br i1 %193, label %198, label %194

194:                                              ; preds = %190
  %195 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %196 = load i32, ptr %195, align 8, !tbaa !11
  %197 = icmp eq i32 %196, 12
  br i1 %197, label %198, label %202

198:                                              ; preds = %194, %190, %186, %182, %178, %174, %170, %166
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @peekt, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  %199 = load i32, ptr %3, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  %201 = call ptr @parseexpr(i32 noundef %200)
  store ptr %201, ptr %4, align 8, !tbaa !13
  br label %205

202:                                              ; preds = %194
  %203 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %204 = load i32, ptr %203, align 8, !tbaa !11
  call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef @.str.19, i32 noundef %204)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %240

205:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  %206 = call { i32, i64 } @token()
  %207 = getelementptr inbounds { i32, i64 }, ptr %16, i32 0, i32 0
  %208 = extractvalue { i32, i64 } %206, 0
  store i32 %208, ptr %207, align 8
  %209 = getelementptr inbounds { i32, i64 }, ptr %16, i32 0, i32 1
  %210 = extractvalue { i32, i64 } %206, 1
  store i64 %210, ptr %209, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  br label %211

211:                                              ; preds = %232, %205
  %212 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %213 = load i32, ptr %212, align 8, !tbaa !11
  %214 = call i32 @isop(i32 noundef %213)
  %215 = load i32, ptr %3, align 4, !tbaa !5
  %216 = icmp eq i32 %214, %215
  br i1 %216, label %217, label %238

217:                                              ; preds = %211
  %218 = call ptr @newexpr(i32 noundef 3)
  store ptr %218, ptr %5, align 8, !tbaa !13
  %219 = getelementptr inbounds %struct.Token, ptr %6, i32 0, i32 0
  %220 = load i32, ptr %219, align 8, !tbaa !11
  %221 = load ptr, ptr %5, align 8, !tbaa !13
  %222 = getelementptr inbounds %struct.Expr, ptr %221, i32 0, i32 3
  store i32 %220, ptr %222, align 8, !tbaa !25
  %223 = load ptr, ptr %4, align 8, !tbaa !13
  %224 = load ptr, ptr %5, align 8, !tbaa !13
  %225 = getelementptr inbounds %struct.Expr, ptr %224, i32 0, i32 4
  store ptr %223, ptr %225, align 8, !tbaa !27
  %226 = load i32, ptr %3, align 4, !tbaa !5
  %227 = add nsw i32 %226, 1
  %228 = call ptr @parseexpr(i32 noundef %227)
  %229 = load ptr, ptr %5, align 8, !tbaa !13
  %230 = getelementptr inbounds %struct.Expr, ptr %229, i32 0, i32 5
  store ptr %228, ptr %230, align 8, !tbaa !26
  %231 = load ptr, ptr %5, align 8, !tbaa !13
  store ptr %231, ptr %4, align 8, !tbaa !13
  br label %232

232:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #3
  %233 = call { i32, i64 } @token()
  %234 = getelementptr inbounds { i32, i64 }, ptr %17, i32 0, i32 0
  %235 = extractvalue { i32, i64 } %233, 0
  store i32 %235, ptr %234, align 8
  %236 = getelementptr inbounds { i32, i64 }, ptr %17, i32 0, i32 1
  %237 = extractvalue { i32, i64 } %233, 1
  store i64 %237, ptr %236, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #3
  br label %211, !llvm.loop !28

238:                                              ; preds = %211
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @peekt, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  %239 = load ptr, ptr %4, align 8, !tbaa !13
  store ptr %239, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %240

240:                                              ; preds = %238, %202, %164, %156, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %241 = load ptr, ptr %2, align 8
  ret ptr %241
}

; Function Attrs: nounwind uwtable
declare dso_local void @statement() #0

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i64 0, i64 4, !5, i64 8, i64 8, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"Token", !6, i64 0, !7, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"Value", !17, i64 0, !6, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !6, i64 8}
!19 = !{i64 0, i64 8, !20, i64 8, i64 4, !5}
!20 = !{!17, !17, i64 0}
!21 = !{!22, !17, i64 8}
!22 = !{!"Expr", !6, i64 0, !16, i64 8, !14, i64 24, !6, i64 32, !14, i64 40, !14, i64 48}
!23 = !{!22, !6, i64 16}
!24 = !{!22, !14, i64 24}
!25 = !{!22, !6, i64 32}
!26 = !{!22, !14, i64 48}
!27 = !{!22, !14, i64 40}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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

%struct.Token = type { i32, %union.anon.0 }
%union.anon.0 = type { i64 }

@radix = external dso_local local_unnamed_addr global i32, align 4
@litlevel = external dso_local local_unnamed_addr global i32, align 4
@curlit = external dso_local local_unnamed_addr global ptr, align 8
@peekt = external dso_local local_unnamed_addr global %struct.Token, align 8
@.str.17 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [28 x i8], align 1
@switch.table.parseexpr = private unnamed_addr constant [3 x i32] [i32 10, i32 8, i32 2], align 4

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

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @addlit(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local { i32, i64 } @token() local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @parseexpr(i32 noundef %0) local_unnamed_addr #0 {
  %2 = tail call { i32, i64 } @token()
  %3 = extractvalue { i32, i64 } %2, 0
  %4 = extractvalue { i32, i64 } %2, 1
  switch i32 %3, label %8 [
    i32 44, label %5
    i32 13, label %5
  ]

5:                                                ; preds = %1, %1
  store i32 %3, ptr @peekt, align 8, !tbaa !5
  store i64 %4, ptr getelementptr inbounds (i8, ptr @peekt, i64 8), align 8, !tbaa !9
  %6 = tail call ptr @newexpr(i32 noundef 0)
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 0, ptr %7, align 8, !tbaa !10
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 16
  store i32 0, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  br label %common.ret130

8:                                                ; preds = %1
  %9 = icmp eq i32 %0, 4
  br i1 %9, label %10, label %51

10:                                               ; preds = %8
  switch i32 %3, label %50 [
    i32 2, label %11
    i32 1, label %15
    i32 4, label %19
    i32 12, label %switch.lookup
    i32 11, label %switch.lookup
    i32 10, label %switch.lookup
    i32 60, label %27
    i32 91, label %33
  ]

11:                                               ; preds = %10
  %12 = tail call ptr @newexpr(i32 noundef 0)
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  store i64 %4, ptr %13, align 8, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %12, i64 16
  store i32 0, ptr %14, align 8, !tbaa !16
  br label %common.ret130

15:                                               ; preds = %10
  %16 = tail call ptr @newexpr(i32 noundef 1)
  %17 = inttoptr i64 %4 to ptr
  %18 = getelementptr inbounds i8, ptr %16, i64 24
  store ptr %17, ptr %18, align 8, !tbaa !17
  br label %common.ret130

common.ret130:                                    ; preds = %11, %41, %31, %27, %15, %._crit_edge, %58, %50, %5, %switch.lookup, %19
  %common.ret130.op = phi ptr [ %20, %19 ], [ %26, %switch.lookup ], [ %6, %5 ], [ null, %50 ], [ %.1.lcssa, %._crit_edge ], [ null, %58 ], [ %12, %11 ], [ %16, %15 ], [ %28, %31 ], [ %28, %27 ], [ %42, %41 ]
  ret ptr %common.ret130.op

19:                                               ; preds = %10
  %20 = tail call ptr @newexpr(i32 noundef 2)
  %21 = getelementptr inbounds i8, ptr %20, i64 32
  store i32 4, ptr %21, align 8, !tbaa !18
  %22 = tail call ptr @parseexpr(i32 noundef 4)
  %23 = getelementptr inbounds i8, ptr %20, i64 48
  store ptr %22, ptr %23, align 8, !tbaa !19
  br label %common.ret130

switch.lookup:                                    ; preds = %10, %10, %10
  %24 = load i32, ptr @radix, align 4, !tbaa !5
  %switch.tableidx = add nsw i32 %3, -10
  %25 = sext i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [3 x i32], ptr @switch.table.parseexpr, i64 0, i64 %25
  %switch.load = load i32, ptr %switch.gep, align 4
  store i32 %switch.load, ptr @radix, align 4, !tbaa !5
  %26 = tail call ptr @parseexpr(i32 noundef 4)
  store i32 %24, ptr @radix, align 4, !tbaa !5
  br label %common.ret130

27:                                               ; preds = %10
  %28 = tail call ptr @parseexpr(i32 noundef 0)
  %29 = tail call { i32, i64 } @token()
  %30 = extractvalue { i32, i64 } %29, 0
  %.not114 = icmp eq i32 %30, 62
  br i1 %.not114, label %common.ret130, label %31

31:                                               ; preds = %27
  %32 = extractvalue { i32, i64 } %29, 1
  tail call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef nonnull @.str.17)
  store i32 %30, ptr @peekt, align 8, !tbaa !5
  store i64 %32, ptr getelementptr inbounds (i8, ptr @peekt, i64 8), align 8, !tbaa !9
  br label %common.ret130

33:                                               ; preds = %10
  %34 = load i32, ptr @litlevel, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr @litlevel, align 4, !tbaa !5
  %36 = load ptr, ptr @curlit, align 8, !tbaa !20
  store ptr null, ptr @curlit, align 8, !tbaa !20
  tail call void @statement()
  %37 = tail call { i32, i64 } @token()
  %38 = extractvalue { i32, i64 } %37, 0
  %.not = icmp eq i32 %38, 93
  br i1 %.not, label %41, label %39

39:                                               ; preds = %33
  %40 = extractvalue { i32, i64 } %37, 1
  tail call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef nonnull @.str.18)
  store i32 %38, ptr @peekt, align 8, !tbaa !5
  store i64 %40, ptr getelementptr inbounds (i8, ptr @peekt, i64 8), align 8, !tbaa !9
  br label %41

41:                                               ; preds = %39, %33
  %42 = tail call ptr @newexpr(i32 noundef 0)
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load ptr, ptr @curlit, align 8, !tbaa !20
  %45 = tail call { i64, i32 } @addlit(ptr noundef %44)
  %46 = extractvalue { i64, i32 } %45, 0
  %47 = extractvalue { i64, i32 } %45, 1
  store i64 %46, ptr %43, align 8, !tbaa !10
  %.sroa.435.0..sroa_idx = getelementptr inbounds i8, ptr %42, i64 16
  store i32 %47, ptr %.sroa.435.0..sroa_idx, align 8, !tbaa !5
  store ptr %36, ptr @curlit, align 8, !tbaa !20
  %48 = load i32, ptr @litlevel, align 4, !tbaa !5
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr @litlevel, align 4, !tbaa !5
  br label %common.ret130

50:                                               ; preds = %10
  tail call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef nonnull @.str.19, i32 noundef %3)
  br label %common.ret130

51:                                               ; preds = %8
  switch i32 %3, label %58 [
    i32 91, label %52
    i32 60, label %52
    i32 12, label %52
    i32 11, label %52
    i32 10, label %52
    i32 4, label %52
    i32 2, label %52
    i32 1, label %52
  ]

52:                                               ; preds = %51, %51, %51, %51, %51, %51, %51, %51
  store i32 %3, ptr @peekt, align 8, !tbaa !5
  store i64 %4, ptr getelementptr inbounds (i8, ptr @peekt, i64 8), align 8, !tbaa !9
  %53 = add nsw i32 %0, 1
  %54 = tail call ptr @parseexpr(i32 noundef %53)
  %55 = tail call { i32, i64 } @token()
  %.sroa.046.0115 = extractvalue { i32, i64 } %55, 0
  %56 = tail call i32 @isop(i32 noundef %.sroa.046.0115)
  %57 = icmp eq i32 %56, %0
  br i1 %57, label %.lr.ph, label %._crit_edge

58:                                               ; preds = %51
  tail call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef nonnull @.str.19, i32 noundef %3)
  br label %common.ret130

.lr.ph:                                           ; preds = %52, %.lr.ph
  %.sroa.046.0117 = phi i32 [ %.sroa.046.0, %.lr.ph ], [ %.sroa.046.0115, %52 ]
  %.1116 = phi ptr [ %59, %.lr.ph ], [ %54, %52 ]
  %59 = tail call ptr @newexpr(i32 noundef 3)
  %60 = getelementptr inbounds i8, ptr %59, i64 32
  store i32 %.sroa.046.0117, ptr %60, align 8, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %59, i64 40
  store ptr %.1116, ptr %61, align 8, !tbaa !21
  %62 = tail call ptr @parseexpr(i32 noundef %53)
  %63 = getelementptr inbounds i8, ptr %59, i64 48
  store ptr %62, ptr %63, align 8, !tbaa !19
  %64 = tail call { i32, i64 } @token()
  %.sroa.046.0 = extractvalue { i32, i64 } %64, 0
  %65 = tail call i32 @isop(i32 noundef %.sroa.046.0)
  %66 = icmp eq i32 %65, %0
  br i1 %66, label %.lr.ph, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph, %52
  %.pn.lcssa = phi { i32, i64 } [ %55, %52 ], [ %64, %.lr.ph ]
  %.1.lcssa = phi ptr [ %54, %52 ], [ %59, %.lr.ph ]
  %.sroa.046.0.lcssa = phi i32 [ %.sroa.046.0115, %52 ], [ %.sroa.046.0, %.lr.ph ]
  %.sroa.44.0 = extractvalue { i32, i64 } %.pn.lcssa, 1
  store i32 %.sroa.046.0.lcssa, ptr @peekt, align 8, !tbaa !5
  store i64 %.sroa.44.0, ptr getelementptr inbounds (i8, ptr @peekt, i64 8), align 8, !tbaa !9
  br label %common.ret130
}

; Function Attrs: nounwind uwtable
declare dso_local void @statement() local_unnamed_addr #0

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 8}
!13 = !{!"Expr", !6, i64 0, !14, i64 8, !15, i64 24, !6, i64 32, !15, i64 40, !15, i64 48}
!14 = !{!"Value", !11, i64 0, !6, i64 8}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!13, !6, i64 16}
!17 = !{!13, !15, i64 24}
!18 = !{!13, !6, i64 32}
!19 = !{!13, !15, i64 48}
!20 = !{!15, !15, i64 0}
!21 = !{!13, !15, i64 40}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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