; LLVM IR from askforalfred/alfred :: gen/ff_planner (inst_pre)

; 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._PlNode = type { i32, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr }
%struct._TokenList = type { ptr, ptr }
%struct._WffNode = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, i8 }

@lvar_types = external dso_local global [15 x i32], align 16
@lvar_names = external dso_local global [15 x ptr], align 16
@.str.54 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [65 x i8], align 1

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

declare i32 @printf(ptr noundef, ...) #1

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

declare ptr @new_Token(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @position_in_types_table(ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @make_Wff(ptr noundef %0, i32 noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %15, label %13

13:                                               ; preds = %2
  store ptr null, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %14, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %246

15:                                               ; preds = %2
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._PlNode, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = call ptr @new_WffNode(i32 noundef %18)
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._PlNode, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !11
  switch i32 %22, label %239 [
    i32 2008, label %23
    i32 2009, label %23
    i32 2006, label %141
    i32 2007, label %141
    i32 2005, label %201
    i32 2002, label %209
    i32 2000, label %218
    i32 2001, label %218
    i32 2003, label %219
  ]

23:                                               ; preds = %15, %15
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %59, %23
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %62

28:                                               ; preds = %24
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [15 x ptr], ptr @lvar_names, i64 0, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._PlNode, ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = getelementptr inbounds %struct._TokenList, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = icmp eq ptr %32, %37
  br i1 %38, label %51, label %39

39:                                               ; preds = %28
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [15 x ptr], ptr @lvar_names, i64 0, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._PlNode, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = getelementptr inbounds %struct._TokenList, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !14
  %49 = call i32 @strcmp(ptr noundef %43, ptr noundef %48) #7
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %58

51:                                               ; preds = %39, %28
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._PlNode, ptr %52, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  %55 = getelementptr inbounds %struct._TokenList, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !14
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.54, ptr noundef %56)
  br label %58

58:                                               ; preds = %51, %39
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %7, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %7, align 4, !tbaa !9
  br label %24, !llvm.loop !16

62:                                               ; preds = %24
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._PlNode, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds %struct._TokenList, ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !18
  %68 = getelementptr inbounds %struct._TokenList, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = call i32 @position_in_types_table(ptr noundef %69)
  store i32 %70, ptr %8, align 4, !tbaa !9
  %71 = icmp eq i32 %70, -1
  br i1 %71, label %72, label %94

72:                                               ; preds = %62
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._PlNode, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = getelementptr inbounds %struct._TokenList, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !14
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._PlNode, ptr %78, i32 0, i32 2
  %80 = load ptr, ptr %79, align 8, !tbaa !13
  %81 = getelementptr inbounds %struct._TokenList, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !18
  %83 = getelementptr inbounds %struct._TokenList, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !14
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.55, ptr noundef %77, ptr noundef %84)
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._PlNode, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !11
  %89 = icmp eq i32 %88, 2009
  %90 = zext i1 %89 to i64
  %91 = select i1 %89, i32 2001, i32 2000
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._WffNode, ptr %92, i32 0, i32 0
  store i32 %91, ptr %93, align 8, !tbaa !19
  br label %244

94:                                               ; preds = %62
  %95 = load i32, ptr %5, align 4, !tbaa !9
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._WffNode, ptr %96, i32 0, i32 1
  store i32 %95, ptr %97, align 4, !tbaa !21
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._WffNode, ptr %99, i32 0, i32 2
  store i32 %98, ptr %100, align 8, !tbaa !22
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._PlNode, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = getelementptr inbounds %struct._TokenList, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !14
  %106 = call i64 @strlen(ptr noundef %105) #7
  %107 = add i64 %106, 1
  %108 = trunc i64 %107 to i32
  %109 = call ptr @new_Token(i32 noundef %108)
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._WffNode, ptr %110, i32 0, i32 3
  store ptr %109, ptr %111, align 8, !tbaa !23
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._WffNode, ptr %112, i32 0, i32 3
  %114 = load ptr, ptr %113, align 8, !tbaa !23
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._PlNode, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !13
  %118 = getelementptr inbounds %struct._TokenList, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !14
  %120 = call ptr @strcpy(ptr noundef %114, ptr noundef %119) #6
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._PlNode, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !13
  %124 = getelementptr inbounds %struct._TokenList, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !14
  %126 = load i32, ptr %5, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [15 x ptr], ptr @lvar_names, i64 0, i64 %127
  store ptr %125, ptr %128, align 8, !tbaa !5
  %129 = load i32, ptr %8, align 4, !tbaa !9
  %130 = load i32, ptr %5, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [15 x i32], ptr @lvar_types, i64 0, i64 %131
  store i32 %129, ptr %132, align 4, !tbaa !9
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._PlNode, ptr %133, i32 0, i32 7
  %135 = load ptr, ptr %134, align 8, !tbaa !24
  %136 = load i32, ptr %5, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  %138 = call ptr @make_Wff(ptr noundef %135, i32 noundef %137)
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._WffNode, ptr %139, i32 0, i32 9
  store ptr %138, ptr %140, align 8, !tbaa !25
  br label %244

141:                                              ; preds = %15, %15
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._PlNode, ptr %142, i32 0, i32 7
  %144 = load ptr, ptr %143, align 8, !tbaa !24
  %145 = icmp ne ptr %144, null
  br i1 %145, label %156, label %146

146:                                              ; preds = %141
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.56)
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._PlNode, ptr %148, i32 0, i32 0
  %150 = load i32, ptr %149, align 8, !tbaa !11
  %151 = icmp eq i32 %150, 2007
  %152 = zext i1 %151 to i64
  %153 = select i1 %151, i32 2001, i32 2000
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._WffNode, ptr %154, i32 0, i32 0
  store i32 %153, ptr %155, align 8, !tbaa !19
  br label %244

156:                                              ; preds = %141
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._PlNode, ptr %157, i32 0, i32 7
  %159 = load ptr, ptr %158, align 8, !tbaa !24
  %160 = load i32, ptr %5, align 4, !tbaa !9
  %161 = call ptr @make_Wff(ptr noundef %159, i32 noundef %160)
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct._WffNode, ptr %162, i32 0, i32 4
  store ptr %161, ptr %163, align 8, !tbaa !26
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._PlNode, ptr %164, i32 0, i32 7
  %166 = load ptr, ptr %165, align 8, !tbaa !24
  %167 = getelementptr inbounds %struct._PlNode, ptr %166, i32 0, i32 8
  %168 = load ptr, ptr %167, align 8, !tbaa !27
  store ptr %168, ptr %9, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %196, %156
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %200

172:                                              ; preds = %169
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = load i32, ptr %5, align 4, !tbaa !9
  %175 = call ptr @make_Wff(ptr noundef %173, i32 noundef %174)
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct._WffNode, ptr %176, i32 0, i32 4
  %178 = load ptr, ptr %177, align 8, !tbaa !26
  %179 = getelementptr inbounds %struct._WffNode, ptr %178, i32 0, i32 6
  store ptr %175, ptr %179, align 8, !tbaa !28
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct._WffNode, ptr %180, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !26
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._WffNode, ptr %183, i32 0, i32 4
  %185 = load ptr, ptr %184, align 8, !tbaa !26
  %186 = getelementptr inbounds %struct._WffNode, ptr %185, i32 0, i32 6
  %187 = load ptr, ptr %186, align 8, !tbaa !28
  %188 = getelementptr inbounds %struct._WffNode, ptr %187, i32 0, i32 5
  store ptr %182, ptr %188, align 8, !tbaa !29
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct._WffNode, ptr %189, i32 0, i32 4
  %191 = load ptr, ptr %190, align 8, !tbaa !26
  %192 = getelementptr inbounds %struct._WffNode, ptr %191, i32 0, i32 6
  %193 = load ptr, ptr %192, align 8, !tbaa !28
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct._WffNode, ptr %194, i32 0, i32 4
  store ptr %193, ptr %195, align 8, !tbaa !26
  br label %196

196:                                              ; preds = %172
  %197 = load ptr, ptr %9, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._PlNode, ptr %197, i32 0, i32 8
  %199 = load ptr, ptr %198, align 8, !tbaa !27
  store ptr %199, ptr %9, align 8, !tbaa !5
  br label %169, !llvm.loop !30

200:                                              ; preds = %169
  br label %244

201:                                              ; preds = %15
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._PlNode, ptr %202, i32 0, i32 7
  %204 = load ptr, ptr %203, align 8, !tbaa !24
  %205 = load i32, ptr %5, align 4, !tbaa !9
  %206 = call ptr @make_Wff(ptr noundef %204, i32 noundef %205)
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct._WffNode, ptr %207, i32 0, i32 9
  store ptr %206, ptr %208, align 8, !tbaa !25
  br label %244

209:                                              ; preds = %15
  %210 = call ptr @new_Fact()
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._WffNode, ptr %211, i32 0, i32 7
  store ptr %210, ptr %212, align 8, !tbaa !31
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._WffNode, ptr %213, i32 0, i32 7
  %215 = load ptr, ptr %214, align 8, !tbaa !31
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = load i32, ptr %5, align 4, !tbaa !9
  call void @make_Fact(ptr noundef %215, ptr noundef %216, i32 noundef %217)
  br label %244

218:                                              ; preds = %15, %15
  br label %244

219:                                              ; preds = %15
  %220 = load ptr, ptr %4, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct._PlNode, ptr %220, i32 0, i32 3
  %222 = load i32, ptr %221, align 8, !tbaa !32
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct._WffNode, ptr %223, i32 0, i32 10
  store i32 %222, ptr %224, align 8, !tbaa !33
  %225 = load ptr, ptr %4, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct._PlNode, ptr %225, i32 0, i32 5
  %227 = load ptr, ptr %226, align 8, !tbaa !34
  %228 = load i32, ptr %5, align 4, !tbaa !9
  %229 = call ptr @make_ExpNode(ptr noundef %227, i32 noundef %228)
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._WffNode, ptr %230, i32 0, i32 11
  store ptr %229, ptr %231, align 8, !tbaa !35
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct._PlNode, ptr %232, i32 0, i32 6
  %234 = load ptr, ptr %233, align 8, !tbaa !36
  %235 = load i32, ptr %5, align 4, !tbaa !9
  %236 = call ptr @make_ExpNode(ptr noundef %234, i32 noundef %235)
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct._WffNode, ptr %237, i32 0, i32 12
  store ptr %236, ptr %238, align 8, !tbaa !37
  br label %244

239:                                              ; preds = %15
  %240 = load ptr, ptr %4, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct._PlNode, ptr %240, i32 0, i32 0
  %242 = load i32, ptr %241, align 8, !tbaa !11
  %243 = call i32 (ptr, ...) @printf(ptr noundef @.str.57, i32 noundef %242)
  call void @exit(i32 noundef 1) #8
  unreachable

244:                                              ; preds = %219, %218, %209, %201, %200, %146, %94, %72
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %245, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %246

246:                                              ; preds = %244, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %247 = load ptr, ptr %3, align 8
  ret ptr %247
}

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

declare ptr @new_WffNode(i32 noundef) #1

declare ptr @new_Fact() #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_PlNode", !10, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!13 = !{!12, !6, i64 16}
!14 = !{!15, !6, i64 0}
!15 = !{!"_TokenList", !6, i64 0, !6, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!15, !6, i64 8}
!19 = !{!20, !10, i64 0}
!20 = !{!"_WffNode", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 88, !7, i64 96}
!21 = !{!20, !10, i64 4}
!22 = !{!20, !10, i64 8}
!23 = !{!20, !6, i64 16}
!24 = !{!12, !6, i64 48}
!25 = !{!20, !6, i64 64}
!26 = !{!20, !6, i64 24}
!27 = !{!12, !6, i64 56}
!28 = !{!20, !6, i64 40}
!29 = !{!20, !6, i64 32}
!30 = distinct !{!30, !17}
!31 = !{!20, !6, i64 48}
!32 = !{!12, !10, i64 24}
!33 = !{!20, !10, i64 72}
!34 = !{!12, !6, i64 32}
!35 = !{!20, !6, i64 80}
!36 = !{!12, !6, i64 40}
!37 = !{!20, !6, i64 88}


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

@lvar_types = external dso_local local_unnamed_addr global [15 x i32], align 16
@lvar_names = external dso_local local_unnamed_addr global [15 x ptr], align 16
@.str.54 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [65 x i8], align 1

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

declare ptr @new_Token(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #5

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @make_Wff(ptr noundef %0, i32 noundef %1) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %common.ret82, label %3

3:                                                ; preds = %2
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %5 = tail call ptr @new_WffNode(i32 noundef %4) #6
  %6 = load i32, ptr %0, align 8, !tbaa !5
  switch i32 %6, label %98 [
    i32 2008, label %7
    i32 2009, label %7
    i32 2006, label %62
    i32 2007, label %62
    i32 2005, label %78
    i32 2002, label %83
    i32 2000, label %common.ret82
    i32 2001, label %common.ret82
    i32 2003, label %86
  ]

7:                                                ; preds = %3, %3
  %8 = icmp sgt i32 %1, 0
  br i1 %8, label %.lr.ph80, label %._crit_edge

.lr.ph80:                                         ; preds = %7
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %10

10:                                               ; preds = %.lr.ph80, %21
  %indvars.iv = phi i64 [ 0, %.lr.ph80 ], [ %indvars.iv.next, %21 ]
  %11 = getelementptr inbounds [15 x ptr], ptr @lvar_names, i64 0, i64 %indvars.iv
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = load ptr, ptr %9, align 8, !tbaa !12
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = icmp eq ptr %12, %14
  br i1 %15, label %19, label %16

16:                                               ; preds = %10
  %17 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) %14) #7
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %21

19:                                               ; preds = %16, %10
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54, ptr noundef %14)
  br label %21

21:                                               ; preds = %16, %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %10, !llvm.loop !15

._crit_edge:                                      ; preds = %21, %7
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = tail call i32 @position_in_types_table(ptr noundef %26)
  %28 = icmp eq i32 %27, -1
  br i1 %28, label %29, label %39

29:                                               ; preds = %._crit_edge
  %30 = load ptr, ptr %22, align 8, !tbaa !12
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %30, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55, ptr noundef %31, ptr noundef %34)
  %36 = load i32, ptr %0, align 8, !tbaa !5
  %37 = icmp eq i32 %36, 2009
  %38 = select i1 %37, i32 2001, i32 2000
  store i32 %38, ptr %5, align 8, !tbaa !18
  br label %common.ret82

common.ret82:                                     ; preds = %29, %65, %83, %86, %3, %3, %2, %70, %.lr.ph, %78, %39
  %common.ret82.op = phi ptr [ %5, %39 ], [ %5, %78 ], [ null, %2 ], [ %5, %3 ], [ %5, %3 ], [ %5, %86 ], [ %5, %83 ], [ %5, %65 ], [ %5, %29 ], [ %5, %70 ], [ %5, %.lr.ph ]
  ret ptr %common.ret82.op

39:                                               ; preds = %._crit_edge
  %40 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %1, ptr %40, align 4, !tbaa !20
  %41 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 %27, ptr %41, align 8, !tbaa !21
  %42 = load ptr, ptr %22, align 8, !tbaa !12
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %43) #7
  %45 = trunc i64 %44 to i32
  %46 = add i32 %45, 1
  %47 = tail call ptr @new_Token(i32 noundef %46) #6
  %48 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %47, ptr %48, align 8, !tbaa !22
  %49 = load ptr, ptr %22, align 8, !tbaa !12
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  %51 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) %50) #6
  %52 = load ptr, ptr %22, align 8, !tbaa !12
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = sext i32 %1 to i64
  %55 = getelementptr inbounds [15 x ptr], ptr @lvar_names, i64 0, i64 %54
  store ptr %53, ptr %55, align 8, !tbaa !11
  %56 = getelementptr inbounds [15 x i32], ptr @lvar_types, i64 0, i64 %54
  store i32 %27, ptr %56, align 4, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %0, i64 48
  %58 = load ptr, ptr %57, align 8, !tbaa !24
  %59 = add nsw i32 %1, 1
  %60 = tail call ptr @make_Wff(ptr noundef %58, i32 noundef %59)
  %61 = getelementptr inbounds i8, ptr %5, i64 64
  store ptr %60, ptr %61, align 8, !tbaa !25
  br label %common.ret82

62:                                               ; preds = %3, %3
  %63 = getelementptr inbounds i8, ptr %0, i64 48
  %64 = load ptr, ptr %63, align 8, !tbaa !24
  %.not73 = icmp eq ptr %64, null
  br i1 %.not73, label %65, label %70

65:                                               ; preds = %62
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56)
  %67 = load i32, ptr %0, align 8, !tbaa !5
  %68 = icmp eq i32 %67, 2007
  %69 = select i1 %68, i32 2001, i32 2000
  store i32 %69, ptr %5, align 8, !tbaa !18
  br label %common.ret82

70:                                               ; preds = %62
  %71 = tail call ptr @make_Wff(ptr noundef nonnull %64, i32 noundef %1)
  %72 = getelementptr inbounds i8, ptr %5, i64 24
  store ptr %71, ptr %72, align 8, !tbaa !26
  %73 = load ptr, ptr %63, align 8, !tbaa !24
  %.0.in75 = getelementptr inbounds i8, ptr %73, i64 56
  %.076 = load ptr, ptr %.0.in75, align 8, !tbaa !27
  %.not7477 = icmp eq ptr %.076, null
  br i1 %.not7477, label %common.ret82, label %.lr.ph

.lr.ph:                                           ; preds = %70, %.lr.ph
  %.078 = phi ptr [ %.0, %.lr.ph ], [ %.076, %70 ]
  %74 = tail call ptr @make_Wff(ptr noundef nonnull %.078, i32 noundef %1)
  %75 = load ptr, ptr %72, align 8, !tbaa !26
  %76 = getelementptr inbounds i8, ptr %75, i64 40
  store ptr %74, ptr %76, align 8, !tbaa !28
  %77 = getelementptr inbounds i8, ptr %74, i64 32
  store ptr %75, ptr %77, align 8, !tbaa !29
  store ptr %74, ptr %72, align 8, !tbaa !26
  %.0.in = getelementptr inbounds i8, ptr %.078, i64 56
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !27
  %.not74 = icmp eq ptr %.0, null
  br i1 %.not74, label %common.ret82, label %.lr.ph, !llvm.loop !30

78:                                               ; preds = %3
  %79 = getelementptr inbounds i8, ptr %0, i64 48
  %80 = load ptr, ptr %79, align 8, !tbaa !24
  %81 = tail call ptr @make_Wff(ptr noundef %80, i32 noundef %1)
  %82 = getelementptr inbounds i8, ptr %5, i64 64
  store ptr %81, ptr %82, align 8, !tbaa !25
  br label %common.ret82

83:                                               ; preds = %3
  %84 = tail call ptr @new_Fact() #6
  %85 = getelementptr inbounds i8, ptr %5, i64 48
  store ptr %84, ptr %85, align 8, !tbaa !31
  tail call void @make_Fact(ptr noundef %84, ptr noundef nonnull %0, i32 noundef %1)
  br label %common.ret82

86:                                               ; preds = %3
  %87 = getelementptr inbounds i8, ptr %0, i64 24
  %88 = load i32, ptr %87, align 8, !tbaa !32
  %89 = getelementptr inbounds i8, ptr %5, i64 72
  store i32 %88, ptr %89, align 8, !tbaa !33
  %90 = getelementptr inbounds i8, ptr %0, i64 32
  %91 = load ptr, ptr %90, align 8, !tbaa !34
  %92 = tail call ptr @make_ExpNode(ptr noundef %91, i32 noundef %1)
  %93 = getelementptr inbounds i8, ptr %5, i64 80
  store ptr %92, ptr %93, align 8, !tbaa !35
  %94 = getelementptr inbounds i8, ptr %0, i64 40
  %95 = load ptr, ptr %94, align 8, !tbaa !36
  %96 = tail call ptr @make_ExpNode(ptr noundef %95, i32 noundef %1)
  %97 = getelementptr inbounds i8, ptr %5, i64 88
  store ptr %96, ptr %97, align 8, !tbaa !37
  br label %common.ret82

98:                                               ; preds = %3
  %99 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57, i32 noundef %6)
  tail call void @exit(i32 noundef 1) #8
  unreachable
}

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

declare ptr @new_WffNode(i32 noundef) local_unnamed_addr #1

declare ptr @new_Fact() local_unnamed_addr #1

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 #3 = { noreturn 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 #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 memory(argmem: readwrite) "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 }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { noreturn 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 = !{!"_PlNode", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!14, !10, i64 0}
!14 = !{!"_TokenList", !10, i64 0, !10, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!14, !10, i64 8}
!18 = !{!19, !7, i64 0}
!19 = !{!"_WffNode", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !10, i64 88, !8, i64 96}
!20 = !{!19, !7, i64 4}
!21 = !{!19, !7, i64 8}
!22 = !{!19, !10, i64 16}
!23 = !{!7, !7, i64 0}
!24 = !{!6, !10, i64 48}
!25 = !{!19, !10, i64 64}
!26 = !{!19, !10, i64 24}
!27 = !{!6, !10, i64 56}
!28 = !{!19, !10, i64 40}
!29 = !{!19, !10, i64 32}
!30 = distinct !{!30, !16}
!31 = !{!19, !10, i64 48}
!32 = !{!6, !7, i64 24}
!33 = !{!19, !7, i64 72}
!34 = !{!6, !10, i64 32}
!35 = !{!19, !10, i64 80}
!36 = !{!6, !10, i64 40}
!37 = !{!19, !10, i64 88}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass