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

@reserved = external dso_local constant [9 x %struct.anon], align 16
@.str.12 = external hidden unnamed_addr constant [2 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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @is_unary(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @lextoken(ptr noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %22, %1
  %11 = call ptr @__ctype_b_loc() #6
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.lexstate, ptr %13, i32 0, i32 4
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i16, ptr %12, i64 %16
  %18 = load i16, ptr %17, align 2, !tbaa !13
  %19 = zext i16 %18 to i32
  %20 = and i32 %19, 8192
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %30

22:                                               ; preds = %10
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.lexstate, ptr %23, i32 0, i32 5
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call i32 %25(ptr noundef %26)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.lexstate, ptr %28, i32 0, i32 4
  store i32 %27, ptr %29, align 4, !tbaa !9
  br label %10, !llvm.loop !16

30:                                               ; preds = %10
  %31 = call ptr @__ctype_b_loc() #6
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.lexstate, ptr %33, i32 0, i32 4
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i16, ptr %32, i64 %36
  %38 = load i16, ptr %37, align 2, !tbaa !13
  %39 = zext i16 %38 to i32
  %40 = and i32 %39, 1024
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %109

42:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.lexstate, ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds [256 x i8], ptr %44, i64 0, i64 0
  store ptr %45, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.lexstate, ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = trunc i32 %48 to i8
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i32 1
  store ptr %51, ptr %4, align 8, !tbaa !5
  store i8 %49, ptr %50, align 1, !tbaa !18
  br label %52

52:                                               ; preds = %68, %42
  %53 = call ptr @__ctype_b_loc() #6
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.lexstate, ptr %55, i32 0, i32 5
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = call i32 %57(ptr noundef %58)
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.lexstate, ptr %60, i32 0, i32 4
  store i32 %59, ptr %61, align 4, !tbaa !9
  %62 = sext i32 %59 to i64
  %63 = getelementptr inbounds i16, ptr %54, i64 %62
  %64 = load i16, ptr %63, align 2, !tbaa !13
  %65 = zext i16 %64 to i32
  %66 = and i32 %65, 8
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %75

68:                                               ; preds = %52
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.lexstate, ptr %69, i32 0, i32 4
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = trunc i32 %71 to i8
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i32 1
  store ptr %74, ptr %4, align 8, !tbaa !5
  store i8 %72, ptr %73, align 1, !tbaa !18
  br label %52, !llvm.loop !19

75:                                               ; preds = %52
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  store i8 0, ptr %76, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !20
  br label %77

77:                                               ; preds = %102, %75
  %78 = load i32, ptr %5, align 4, !tbaa !20
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [9 x %struct.anon], ptr @reserved, i64 0, i64 %79
  %81 = getelementptr inbounds %struct.anon, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 16, !tbaa !21
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %105

84:                                               ; preds = %77
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = load i32, ptr %5, align 4, !tbaa !20
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [9 x %struct.anon], ptr @reserved, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.anon, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 16, !tbaa !21
  %91 = call i32 @lexcmp(ptr noundef %85, ptr noundef %90)
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %101

93:                                               ; preds = %84
  %94 = load i32, ptr %5, align 4, !tbaa !20
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [9 x %struct.anon], ptr @reserved, i64 0, i64 %95
  %97 = getelementptr inbounds %struct.anon, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 8, !tbaa !23
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.lexstate, ptr %99, i32 0, i32 0
  store i32 %98, ptr %100, align 8, !tbaa !24
  store i32 %98, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %108

101:                                              ; preds = %84
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %5, align 4, !tbaa !20
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %5, align 4, !tbaa !20
  br label %77, !llvm.loop !25

105:                                              ; preds = %77
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.lexstate, ptr %106, i32 0, i32 0
  store i32 -4, ptr %107, align 8, !tbaa !24
  store i32 -4, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %108

108:                                              ; preds = %105, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %284

109:                                              ; preds = %30
  %110 = call ptr @__ctype_b_loc() #6
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.lexstate, ptr %112, i32 0, i32 4
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i16, ptr %111, i64 %115
  %117 = load i16, ptr %116, align 2, !tbaa !13
  %118 = zext i16 %117 to i32
  %119 = and i32 %118, 2048
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %126, label %121

121:                                              ; preds = %109
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.lexstate, ptr %122, i32 0, i32 4
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = icmp eq i32 %124, 46
  br i1 %125, label %126, label %183

126:                                              ; preds = %121, %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.lexstate, ptr %127, i32 0, i32 2
  %129 = getelementptr inbounds [256 x i8], ptr %128, i64 0, i64 0
  store ptr %129, ptr %7, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %161, %126
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.lexstate, ptr %131, i32 0, i32 4
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = trunc i32 %133 to i8
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i32 1
  store ptr %136, ptr %7, align 8, !tbaa !5
  store i8 %134, ptr %135, align 1, !tbaa !18
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.lexstate, ptr %137, i32 0, i32 5
  %139 = load ptr, ptr %138, align 8, !tbaa !15
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = call i32 %139(ptr noundef %140)
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.lexstate, ptr %142, i32 0, i32 4
  store i32 %141, ptr %143, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %130
  %145 = call ptr @__ctype_b_loc() #6
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.lexstate, ptr %147, i32 0, i32 4
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds i16, ptr %146, i64 %150
  %152 = load i16, ptr %151, align 2, !tbaa !13
  %153 = zext i16 %152 to i32
  %154 = and i32 %153, 2048
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %161, label %156

156:                                              ; preds = %144
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.lexstate, ptr %157, i32 0, i32 4
  %159 = load i32, ptr %158, align 4, !tbaa !9
  %160 = icmp eq i32 %159, 46
  br label %161

161:                                              ; preds = %156, %144
  %162 = phi i1 [ true, %144 ], [ %160, %156 ]
  br i1 %162, label %130, label %163, !llvm.loop !26

163:                                              ; preds = %161
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 0, ptr %164, align 1, !tbaa !18
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.lexstate, ptr %165, i32 0, i32 2
  %167 = getelementptr inbounds [256 x i8], ptr %166, i64 0, i64 0
  %168 = call i32 @strcmp(ptr noundef %167, ptr noundef @.str.12) #8
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %173, label %170

170:                                              ; preds = %163
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.lexstate, ptr %171, i32 0, i32 0
  store i32 46, ptr %172, align 8, !tbaa !24
  store i32 46, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %182

173:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr null, ptr %8, align 8, !tbaa !5
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.lexstate, ptr %174, i32 0, i32 2
  %176 = getelementptr inbounds [256 x i8], ptr %175, i64 0, i64 0
  %177 = call double @strtod(ptr noundef %176, ptr noundef %8) #7
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.lexstate, ptr %178, i32 0, i32 1
  store double %177, ptr %179, align 8, !tbaa !27
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.lexstate, ptr %180, i32 0, i32 0
  store i32 -6, ptr %181, align 8, !tbaa !24
  store i32 -6, ptr %2, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %182

182:                                              ; preds = %173, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %284

183:                                              ; preds = %121
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.lexstate, ptr %184, i32 0, i32 4
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = icmp eq i32 %186, 35
  br i1 %187, label %188, label %218

188:                                              ; preds = %183
  br label %189

189:                                              ; preds = %207, %188
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.lexstate, ptr %190, i32 0, i32 5
  %192 = load ptr, ptr %191, align 8, !tbaa !15
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = call i32 %192(ptr noundef %193)
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.lexstate, ptr %195, i32 0, i32 4
  store i32 %194, ptr %196, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %189
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.lexstate, ptr %198, i32 0, i32 4
  %200 = load i32, ptr %199, align 4, !tbaa !9
  %201 = icmp ne i32 %200, -1
  br i1 %201, label %202, label %207

202:                                              ; preds = %197
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.lexstate, ptr %203, i32 0, i32 4
  %205 = load i32, ptr %204, align 4, !tbaa !9
  %206 = icmp ne i32 %205, 10
  br label %207

207:                                              ; preds = %202, %197
  %208 = phi i1 [ false, %197 ], [ %206, %202 ]
  br i1 %208, label %189, label %209, !llvm.loop !28

209:                                              ; preds = %207
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.lexstate, ptr %210, i32 0, i32 4
  %212 = load i32, ptr %211, align 4, !tbaa !9
  %213 = icmp ne i32 %212, -1
  br i1 %213, label %214, label %217

214:                                              ; preds = %209
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = call i32 @lextoken(ptr noundef %215)
  store i32 %216, ptr %2, align 4
  br label %284

217:                                              ; preds = %209
  br label %218

218:                                              ; preds = %217, %183
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.lexstate, ptr %219, i32 0, i32 4
  %221 = load i32, ptr %220, align 4, !tbaa !9
  %222 = icmp eq i32 %221, -1
  br i1 %222, label %223, label %226

223:                                              ; preds = %218
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.lexstate, ptr %224, i32 0, i32 0
  store i32 -1, ptr %225, align 8, !tbaa !24
  store i32 -1, ptr %2, align 4
  br label %284

226:                                              ; preds = %218
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.lexstate, ptr %227, i32 0, i32 4
  %229 = load i32, ptr %228, align 4, !tbaa !9
  %230 = call i32 @binop_precedence(i32 noundef %229)
  %231 = icmp ne i32 %230, 0
  br i1 %231, label %232, label %248

232:                                              ; preds = %226
  %233 = load ptr, ptr %3, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.lexstate, ptr %233, i32 0, i32 4
  %235 = load i32, ptr %234, align 4, !tbaa !9
  %236 = trunc i32 %235 to i8
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.lexstate, ptr %237, i32 0, i32 3
  store i8 %236, ptr %238, align 8, !tbaa !29
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.lexstate, ptr %239, i32 0, i32 5
  %241 = load ptr, ptr %240, align 8, !tbaa !15
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  %243 = call i32 %241(ptr noundef %242)
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.lexstate, ptr %244, i32 0, i32 4
  store i32 %243, ptr %245, align 4, !tbaa !9
  %246 = load ptr, ptr %3, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.lexstate, ptr %246, i32 0, i32 0
  store i32 -5, ptr %247, align 8, !tbaa !24
  store i32 -5, ptr %2, align 4
  br label %284

248:                                              ; preds = %226
  %249 = load ptr, ptr %3, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.lexstate, ptr %249, i32 0, i32 4
  %251 = load i32, ptr %250, align 4, !tbaa !9
  %252 = call i32 @is_unary(i32 noundef %251)
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %270

254:                                              ; preds = %248
  %255 = load ptr, ptr %3, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.lexstate, ptr %255, i32 0, i32 4
  %257 = load i32, ptr %256, align 4, !tbaa !9
  %258 = trunc i32 %257 to i8
  %259 = load ptr, ptr %3, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.lexstate, ptr %259, i32 0, i32 3
  store i8 %258, ptr %260, align 8, !tbaa !29
  %261 = load ptr, ptr %3, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.lexstate, ptr %261, i32 0, i32 5
  %263 = load ptr, ptr %262, align 8, !tbaa !15
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = call i32 %263(ptr noundef %264)
  %266 = load ptr, ptr %3, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.lexstate, ptr %266, i32 0, i32 4
  store i32 %265, ptr %267, align 4, !tbaa !9
  %268 = load ptr, ptr %3, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.lexstate, ptr %268, i32 0, i32 0
  store i32 -11, ptr %269, align 8, !tbaa !24
  store i32 -11, ptr %2, align 4
  br label %284

270:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %271 = load ptr, ptr %3, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.lexstate, ptr %271, i32 0, i32 4
  %273 = load i32, ptr %272, align 4, !tbaa !9
  store i32 %273, ptr %9, align 4, !tbaa !20
  %274 = load ptr, ptr %3, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.lexstate, ptr %274, i32 0, i32 5
  %276 = load ptr, ptr %275, align 8, !tbaa !15
  %277 = load ptr, ptr %3, align 8, !tbaa !5
  %278 = call i32 %276(ptr noundef %277)
  %279 = load ptr, ptr %3, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.lexstate, ptr %279, i32 0, i32 4
  store i32 %278, ptr %280, align 4, !tbaa !9
  %281 = load i32, ptr %9, align 4, !tbaa !20
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.lexstate, ptr %282, i32 0, i32 0
  store i32 %281, ptr %283, align 8, !tbaa !24
  store i32 %281, ptr %2, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %284

284:                                              ; preds = %270, %254, %232, %223, %214, %182, %108
  %285 = load i32, ptr %2, align 4
  ret i32 %285
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @lexcmp(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare double @strtod(ptr noundef, ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { inlinehint 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 willreturn memory(read) "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 "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 willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 276}
!10 = !{!"lexstate", !11, i64 0, !12, i64 8, !7, i64 16, !7, i64 272, !11, i64 276, !6, i64 280}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!10, !6, i64 280}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !17}
!20 = !{!11, !11, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"", !6, i64 0, !11, i64 8}
!23 = !{!22, !11, i64 8}
!24 = !{!10, !11, i64 0}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !17}
!27 = !{!10, !12, i64 8}
!28 = distinct !{!28, !17}
!29 = !{!10, !7, i64 272}


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

@reserved = external dso_local local_unnamed_addr constant [9 x %struct.anon], align 16
@.str.12 = external hidden unnamed_addr constant [2 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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @is_unary(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @lextoken(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca ptr, align 8
  %3 = tail call ptr @__ctype_b_loc() #6
  %4 = getelementptr inbounds i8, ptr %0, i64 276
  %5 = getelementptr inbounds i8, ptr %0, i64 280
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  br label %tailrecurse

tailrecurse:                                      ; preds = %.preheader, %1
  %6 = phi i32 [ %.pre, %1 ], [ %75, %.preheader ]
  %7 = load ptr, ptr %3, align 8, !tbaa !12
  %8 = sext i32 %6 to i64
  %9 = getelementptr inbounds i16, ptr %7, i64 %8
  %10 = load i16, ptr %9, align 2, !tbaa !13
  %11 = zext i16 %10 to i32
  %12 = and i32 %11, 8192
  %.not107 = icmp eq i32 %12, 0
  br i1 %.not107, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %tailrecurse, %.lr.ph
  %13 = load ptr, ptr %5, align 8, !tbaa !15
  %14 = tail call i32 %13(ptr noundef nonnull %0) #7
  store i32 %14, ptr %4, align 4, !tbaa !5
  %15 = load ptr, ptr %3, align 8, !tbaa !12
  %16 = sext i32 %14 to i64
  %17 = getelementptr inbounds i16, ptr %15, i64 %16
  %18 = load i16, ptr %17, align 2, !tbaa !13
  %19 = zext i16 %18 to i32
  %20 = and i32 %19, 8192
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph, %tailrecurse
  %21 = phi i32 [ %6, %tailrecurse ], [ %14, %.lr.ph ]
  %.lcssa93 = phi i32 [ %11, %tailrecurse ], [ %19, %.lr.ph ]
  %22 = and i32 %.lcssa93, 1024
  %.not76 = icmp eq i32 %22, 0
  br i1 %.not76, label %51, label %23

23:                                               ; preds = %._crit_edge
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = trunc i32 %21 to i8
  %26 = getelementptr inbounds i8, ptr %0, i64 17
  store i8 %25, ptr %24, align 1, !tbaa !18
  %27 = load ptr, ptr %3, align 8, !tbaa !12
  %28 = load ptr, ptr %5, align 8, !tbaa !15
  %29 = tail call i32 %28(ptr noundef nonnull %0) #7
  store i32 %29, ptr %4, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i16, ptr %27, i64 %30
  %32 = load i16, ptr %31, align 2, !tbaa !13
  %33 = and i16 %32, 8
  %.not85111 = icmp eq i16 %33, 0
  br i1 %.not85111, label %._crit_edge115, label %.lr.ph114

.lr.ph114:                                        ; preds = %23, %.lr.ph114
  %34 = phi i32 [ %39, %.lr.ph114 ], [ %29, %23 ]
  %.071112 = phi ptr [ %36, %.lr.ph114 ], [ %26, %23 ]
  %35 = trunc i32 %34 to i8
  %36 = getelementptr inbounds i8, ptr %.071112, i64 1
  store i8 %35, ptr %.071112, align 1, !tbaa !18
  %37 = load ptr, ptr %3, align 8, !tbaa !12
  %38 = load ptr, ptr %5, align 8, !tbaa !15
  %39 = tail call i32 %38(ptr noundef nonnull %0) #7
  store i32 %39, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i16, ptr %37, i64 %40
  %42 = load i16, ptr %41, align 2, !tbaa !13
  %43 = and i16 %42, 8
  %.not85 = icmp eq i16 %43, 0
  br i1 %.not85, label %._crit_edge115, label %.lr.ph114, !llvm.loop !19

._crit_edge115:                                   ; preds = %.lr.ph114, %23
  %.071.lcssa = phi ptr [ %26, %23 ], [ %36, %.lr.ph114 ]
  store i8 0, ptr %.071.lcssa, align 1, !tbaa !18
  %44 = load ptr, ptr @reserved, align 16, !tbaa !20
  %.not86116 = icmp eq ptr %44, null
  br i1 %.not86116, label %.loopexit, label %.lr.ph119.preheader

.lr.ph119.preheader:                              ; preds = %._crit_edge115
  %45 = tail call i32 @lexcmp(ptr noundef %0, ptr noundef nonnull %44)
  %.not87148 = icmp eq i32 %45, 0
  br i1 %.not87148, label %.lr.ph150, label %.lr.ph119._crit_edge

.lr.ph150:                                        ; preds = %.lr.ph119.preheader, %.lr.ph119
  %indvars.iv149 = phi i64 [ %indvars.iv.next, %.lr.ph119 ], [ 0, %.lr.ph119.preheader ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv149, 1
  %46 = getelementptr inbounds [9 x %struct.anon], ptr @reserved, i64 0, i64 %indvars.iv.next
  %47 = load ptr, ptr %46, align 16, !tbaa !20
  %.not86 = icmp eq ptr %47, null
  br i1 %.not86, label %.loopexit, label %.lr.ph119, !llvm.loop !22

.lr.ph119:                                        ; preds = %.lr.ph150
  %48 = tail call i32 @lexcmp(ptr noundef %0, ptr noundef nonnull %47)
  %.not87 = icmp eq i32 %48, 0
  br i1 %.not87, label %.lr.ph150, label %.lr.ph119._crit_edge, !llvm.loop !22

.lr.ph119._crit_edge:                             ; preds = %.lr.ph119, %.lr.ph119.preheader
  %.lcssa139 = phi ptr [ @reserved, %.lr.ph119.preheader ], [ %46, %.lr.ph119 ]
  %49 = getelementptr inbounds i8, ptr %.lcssa139, i64 8
  %50 = load i32, ptr %49, align 8, !tbaa !23
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph150, %._crit_edge115, %.lr.ph119._crit_edge
  %storemerge = phi i32 [ %50, %.lr.ph119._crit_edge ], [ -4, %._crit_edge115 ], [ -4, %.lr.ph150 ]
  store i32 %storemerge, ptr %0, align 8, !tbaa !24
  br label %95

51:                                               ; preds = %._crit_edge
  %52 = and i32 %.lcssa93, 2048
  %.not77 = icmp ne i32 %52, 0
  %53 = icmp eq i32 %21, 46
  %or.cond = or i1 %53, %.not77
  br i1 %or.cond, label %54, label %73

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.critedge

.critedge:                                        ; preds = %.critedge, %54
  %56 = phi i32 [ %21, %54 ], [ %60, %.critedge ]
  %.069 = phi ptr [ %55, %54 ], [ %58, %.critedge ]
  %57 = trunc i32 %56 to i8
  %58 = getelementptr inbounds i8, ptr %.069, i64 1
  store i8 %57, ptr %.069, align 1, !tbaa !18
  %59 = load ptr, ptr %5, align 8, !tbaa !15
  %60 = tail call i32 %59(ptr noundef nonnull %0) #7
  store i32 %60, ptr %4, align 4, !tbaa !5
  %61 = load ptr, ptr %3, align 8, !tbaa !12
  %62 = sext i32 %60 to i64
  %63 = getelementptr inbounds i16, ptr %61, i64 %62
  %64 = load i16, ptr %63, align 2, !tbaa !13
  %65 = and i16 %64, 2048
  %.not83 = icmp ne i16 %65, 0
  %66 = icmp eq i32 %60, 46
  %or.cond88 = or i1 %66, %.not83
  br i1 %or.cond88, label %.critedge, label %67, !llvm.loop !25

67:                                               ; preds = %.critedge
  store i8 0, ptr %58, align 1, !tbaa !18
  %68 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %55, ptr noundef nonnull dereferenceable(1) @.str.12) #8
  %.not84 = icmp eq i32 %68, 0
  br i1 %.not84, label %69, label %70

69:                                               ; preds = %67
  store i32 46, ptr %0, align 8, !tbaa !24
  br label %95

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store ptr null, ptr %2, align 8, !tbaa !12
  %71 = call double @strtod(ptr noundef nonnull %55, ptr noundef nonnull %2) #7
  %72 = getelementptr inbounds i8, ptr %0, i64 8
  store double %71, ptr %72, align 8, !tbaa !26
  store i32 -6, ptr %0, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %95

73:                                               ; preds = %51
  switch i32 %21, label %76 [
    i32 35, label %.preheader
    i32 -1, label %.loopexit89.thread
  ]

.preheader:                                       ; preds = %73, %.preheader
  %74 = load ptr, ptr %5, align 8, !tbaa !15
  %75 = tail call i32 %74(ptr noundef nonnull %0) #7
  store i32 %75, ptr %4, align 4, !tbaa !5
  switch i32 %75, label %.preheader [
    i32 -1, label %.loopexit89.thread
    i32 10, label %tailrecurse
  ]

.loopexit89.thread:                               ; preds = %73, %.preheader
  store i32 -1, ptr %0, align 8, !tbaa !24
  br label %95

76:                                               ; preds = %73
  %77 = tail call i32 @binop_precedence(i32 noundef %21)
  %.not81 = icmp eq i32 %77, 0
  %78 = load i32, ptr %4, align 4, !tbaa !5
  br i1 %.not81, label %84, label %79

79:                                               ; preds = %76
  %80 = trunc i32 %78 to i8
  %81 = getelementptr inbounds i8, ptr %0, i64 272
  store i8 %80, ptr %81, align 8, !tbaa !27
  %82 = load ptr, ptr %5, align 8, !tbaa !15
  %83 = tail call i32 %82(ptr noundef nonnull %0) #7
  store i32 %83, ptr %4, align 4, !tbaa !5
  store i32 -5, ptr %0, align 8, !tbaa !24
  br label %95

84:                                               ; preds = %76
  %85 = tail call i32 @is_unary(i32 noundef %78)
  %.not82 = icmp eq i32 %85, 0
  %86 = load i32, ptr %4, align 4, !tbaa !5
  br i1 %.not82, label %92, label %87

87:                                               ; preds = %84
  %88 = trunc i32 %86 to i8
  %89 = getelementptr inbounds i8, ptr %0, i64 272
  store i8 %88, ptr %89, align 8, !tbaa !27
  %90 = load ptr, ptr %5, align 8, !tbaa !15
  %91 = tail call i32 %90(ptr noundef nonnull %0) #7
  store i32 %91, ptr %4, align 4, !tbaa !5
  store i32 -11, ptr %0, align 8, !tbaa !24
  br label %95

92:                                               ; preds = %84
  %93 = load ptr, ptr %5, align 8, !tbaa !15
  %94 = tail call i32 %93(ptr noundef nonnull %0) #7
  store i32 %94, ptr %4, align 4, !tbaa !5
  store i32 %86, ptr %0, align 8, !tbaa !24
  br label %95

95:                                               ; preds = %69, %70, %92, %87, %79, %.loopexit89.thread, %.loopexit
  %.2 = phi i32 [ %storemerge, %.loopexit ], [ -1, %.loopexit89.thread ], [ -5, %79 ], [ -11, %87 ], [ %86, %92 ], [ -6, %70 ], [ 46, %69 ]
  ret i32 %.2
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @lexcmp(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn
declare double @strtod(ptr noundef readonly, ptr nocapture noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { inlinehint 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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nofree nounwind willreturn "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 willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 276}
!6 = !{!"lexstate", !7, i64 0, !10, i64 8, !8, i64 16, !8, i64 272, !7, i64 276, !11, i64 280}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!6, !11, i64 280}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!8, !8, i64 0}
!19 = distinct !{!19, !17}
!20 = !{!21, !11, i64 0}
!21 = !{!"", !11, i64 0, !7, i64 8}
!22 = distinct !{!22, !17}
!23 = !{!21, !7, i64 8}
!24 = !{!6, !7, i64 0}
!25 = distinct !{!25, !17}
!26 = !{!6, !10, i64 8}
!27 = !{!6, !8, i64 272}


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