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

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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1

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

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

declare ptr @new_Token(i32 noundef) #2

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

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

declare ptr @new_TokenList() #2

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #3

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

14:                                               ; preds = %1
  store i32 1, ptr %10, align 4
  br label %254

15:                                               ; preds = %1
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct._PlNode, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !9
  switch i32 %19, label %252 [
    i32 2008, label %20
    i32 2009, label %20
    i32 2006, label %224
    i32 2007, label %224
    i32 2005, label %238
    i32 2002, label %242
    i32 2000, label %242
    i32 2001, label %242
    i32 2010, label %243
  ]

20:                                               ; preds = %15, %15
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._PlNode, ptr %22, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !12
  %25 = icmp ne ptr %24, null
  br i1 %25, label %28, label %26

26:                                               ; preds = %20
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @exit(i32 noundef 1) #6
  unreachable

28:                                               ; preds = %20
  %29 = call ptr @new_TokenList()
  store ptr %29, ptr %8, align 8, !tbaa !5
  %30 = call ptr @new_TokenList()
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._TokenList, ptr %31, i32 0, i32 1
  store ptr %30, ptr %32, align 8, !tbaa !13
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._PlNode, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  %37 = getelementptr inbounds %struct._TypedList, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = call ptr @copy_Token(ptr noundef %38)
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._TokenList, ptr %40, i32 0, i32 0
  store ptr %39, ptr %41, align 8, !tbaa !17
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._PlNode, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !12
  %46 = getelementptr inbounds %struct._TypedList, ptr %45, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = getelementptr inbounds %struct._TokenList, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %93

51:                                               ; preds = %28
  %52 = call ptr @new_Token(i32 noundef 256)
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._TokenList, ptr %53, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = getelementptr inbounds %struct._TokenList, ptr %55, i32 0, i32 0
  store ptr %52, ptr %56, align 8, !tbaa !17
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._TokenList, ptr %57, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  %60 = getelementptr inbounds %struct._TokenList, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = call ptr @strcpy(ptr noundef %61, ptr noundef @.str) #5
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._PlNode, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !12
  %67 = getelementptr inbounds %struct._TypedList, ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !18
  store ptr %68, ptr %9, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %88, %51
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %92

72:                                               ; preds = %69
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._TokenList, ptr %73, i32 0, i32 1
  %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 !17
  %78 = call ptr @strcat(ptr noundef %77, ptr noundef @.str.1) #5
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._TokenList, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !13
  %82 = getelementptr inbounds %struct._TokenList, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !17
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._TokenList, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !17
  %87 = call ptr @strcat(ptr noundef %83, ptr noundef %86) #5
  br label %88

88:                                               ; preds = %72
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._TokenList, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  store ptr %91, ptr %9, align 8, !tbaa !5
  br label %69, !llvm.loop !19

92:                                               ; preds = %69
  br label %107

93:                                               ; preds = %28
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._PlNode, ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !12
  %98 = getelementptr inbounds %struct._TypedList, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = getelementptr inbounds %struct._TokenList, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !17
  %102 = call ptr @copy_Token(ptr noundef %101)
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._TokenList, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !13
  %106 = getelementptr inbounds %struct._TokenList, ptr %105, i32 0, i32 0
  store ptr %102, ptr %106, align 8, !tbaa !17
  br label %107

107:                                              ; preds = %93, %92
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._PlNode, ptr %110, i32 0, i32 2
  store ptr %108, ptr %111, align 8, !tbaa !21
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._PlNode, ptr %113, i32 0, i32 7
  %115 = load ptr, ptr %114, align 8, !tbaa !22
  store ptr %115, ptr %6, align 8, !tbaa !5
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  store ptr %117, ptr %7, align 8, !tbaa !5
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._PlNode, ptr %119, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !12
  %122 = getelementptr inbounds %struct._TypedList, ptr %121, i32 0, i32 3
  %123 = load ptr, ptr %122, align 8, !tbaa !23
  store ptr %123, ptr %4, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %207, %107
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %211

127:                                              ; preds = %124
  %128 = call ptr @new_TokenList()
  store ptr %128, ptr %8, align 8, !tbaa !5
  %129 = call ptr @new_TokenList()
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._TokenList, ptr %130, i32 0, i32 1
  store ptr %129, ptr %131, align 8, !tbaa !13
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._TypedList, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !15
  %135 = call ptr @copy_Token(ptr noundef %134)
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct._TokenList, ptr %136, i32 0, i32 0
  store ptr %135, ptr %137, align 8, !tbaa !17
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._TypedList, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !18
  %141 = getelementptr inbounds %struct._TokenList, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %183

144:                                              ; preds = %127
  %145 = call ptr @new_Token(i32 noundef 256)
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct._TokenList, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !13
  %149 = getelementptr inbounds %struct._TokenList, ptr %148, i32 0, i32 0
  store ptr %145, ptr %149, align 8, !tbaa !17
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct._TokenList, ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !13
  %153 = getelementptr inbounds %struct._TokenList, ptr %152, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8, !tbaa !17
  %155 = call ptr @strcpy(ptr noundef %154, ptr noundef @.str) #5
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._TypedList, ptr %156, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !18
  store ptr %158, ptr %9, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %178, %144
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %182

162:                                              ; preds = %159
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._TokenList, ptr %163, i32 0, i32 1
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  %166 = getelementptr inbounds %struct._TokenList, ptr %165, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !17
  %168 = call ptr @strcat(ptr noundef %167, ptr noundef @.str.1) #5
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._TokenList, ptr %169, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !13
  %172 = getelementptr inbounds %struct._TokenList, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._TokenList, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !17
  %177 = call ptr @strcat(ptr noundef %173, ptr noundef %176) #5
  br label %178

178:                                              ; preds = %162
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._TokenList, ptr %179, i32 0, i32 1
  %181 = load ptr, ptr %180, align 8, !tbaa !13
  store ptr %181, ptr %9, align 8, !tbaa !5
  br label %159, !llvm.loop !24

182:                                              ; preds = %159
  br label %194

183:                                              ; preds = %127
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct._TypedList, ptr %184, i32 0, i32 1
  %186 = load ptr, ptr %185, align 8, !tbaa !18
  %187 = getelementptr inbounds %struct._TokenList, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !17
  %189 = call ptr @copy_Token(ptr noundef %188)
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._TokenList, ptr %190, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !13
  %193 = getelementptr inbounds %struct._TokenList, ptr %192, i32 0, i32 0
  store ptr %189, ptr %193, align 8, !tbaa !17
  br label %194

194:                                              ; preds = %183, %182
  %195 = load ptr, ptr %2, align 8, !tbaa !5
  %196 = load ptr, ptr %195, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct._PlNode, ptr %196, i32 0, i32 0
  %198 = load i32, ptr %197, align 8, !tbaa !9
  %199 = call ptr @new_PlNode(i32 noundef %198)
  store ptr %199, ptr %5, align 8, !tbaa !5
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct._PlNode, ptr %201, i32 0, i32 2
  store ptr %200, ptr %202, align 8, !tbaa !21
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._PlNode, ptr %204, i32 0, i32 7
  store ptr %203, ptr %205, align 8, !tbaa !22
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %206, ptr %7, align 8, !tbaa !5
  br label %207

207:                                              ; preds = %194
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct._TypedList, ptr %208, i32 0, i32 3
  %210 = load ptr, ptr %209, align 8, !tbaa !23
  store ptr %210, ptr %4, align 8, !tbaa !5
  br label %124, !llvm.loop !25

211:                                              ; preds = %124
  %212 = load ptr, ptr %2, align 8, !tbaa !5
  %213 = load ptr, ptr %212, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._PlNode, ptr %213, i32 0, i32 1
  %215 = load ptr, ptr %214, align 8, !tbaa !12
  call void @free_TypedList(ptr noundef %215)
  %216 = load ptr, ptr %2, align 8, !tbaa !5
  %217 = load ptr, ptr %216, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct._PlNode, ptr %217, i32 0, i32 1
  store ptr null, ptr %218, align 8, !tbaa !12
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = load ptr, ptr %7, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct._PlNode, ptr %220, i32 0, i32 7
  store ptr %219, ptr %221, align 8, !tbaa !22
  %222 = load ptr, ptr %7, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct._PlNode, ptr %222, i32 0, i32 7
  call void @normalize_tyl_in_pl(ptr noundef %223)
  br label %253

224:                                              ; preds = %15, %15
  %225 = load ptr, ptr %2, align 8, !tbaa !5
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct._PlNode, ptr %226, i32 0, i32 7
  %228 = load ptr, ptr %227, align 8, !tbaa !22
  store ptr %228, ptr %3, align 8, !tbaa !5
  br label %229

229:                                              ; preds = %233, %224
  %230 = load ptr, ptr %3, align 8, !tbaa !5
  %231 = icmp ne ptr %230, null
  br i1 %231, label %232, label %237

232:                                              ; preds = %229
  call void @normalize_tyl_in_pl(ptr noundef %3)
  br label %233

233:                                              ; preds = %232
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct._PlNode, ptr %234, i32 0, i32 8
  %236 = load ptr, ptr %235, align 8, !tbaa !26
  store ptr %236, ptr %3, align 8, !tbaa !5
  br label %229, !llvm.loop !27

237:                                              ; preds = %229
  br label %253

238:                                              ; preds = %15
  %239 = load ptr, ptr %2, align 8, !tbaa !5
  %240 = load ptr, ptr %239, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct._PlNode, ptr %240, i32 0, i32 7
  call void @normalize_tyl_in_pl(ptr noundef %241)
  br label %253

242:                                              ; preds = %15, %15, %15
  br label %253

243:                                              ; preds = %15
  %244 = load ptr, ptr %2, align 8, !tbaa !5
  %245 = load ptr, ptr %244, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct._PlNode, ptr %245, i32 0, i32 7
  call void @normalize_tyl_in_pl(ptr noundef %246)
  %247 = load ptr, ptr %2, align 8, !tbaa !5
  %248 = load ptr, ptr %247, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct._PlNode, ptr %248, i32 0, i32 7
  %250 = load ptr, ptr %249, align 8, !tbaa !22
  %251 = getelementptr inbounds %struct._PlNode, ptr %250, i32 0, i32 8
  call void @normalize_tyl_in_pl(ptr noundef %251)
  br label %253

252:                                              ; preds = %15
  br label %253

253:                                              ; preds = %252, %243, %242, %238, %237, %211
  store i32 0, ptr %10, align 4
  br label %254

254:                                              ; preds = %253, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %255 = load i32, ptr %10, align 4
  switch i32 %255, label %257 [
    i32 0, label %256
    i32 1, label %256
  ]

256:                                              ; preds = %254, %254
  ret void

257:                                              ; preds = %254
  unreachable
}

declare void @free_TypedList(ptr noundef) #2

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

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

declare ptr @new_PlNode(i32 noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 = { 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 #5 = { nounwind }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"_PlNode", !11, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!14, !6, i64 8}
!14 = !{!"_TokenList", !6, i64 0, !6, i64 8}
!15 = !{!16, !6, i64 0}
!16 = !{!"_TypedList", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24}
!17 = !{!14, !6, i64 0}
!18 = !{!16, !6, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !6, i64 16}
!22 = !{!10, !6, i64 48}
!23 = !{!16, !6, i64 24}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}
!26 = !{!10, !6, i64 56}
!27 = distinct !{!27, !20}


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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1

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

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

declare ptr @new_Token(i32 noundef) local_unnamed_addr #2

; 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 #3

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

declare ptr @new_TokenList() local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @normalize_tyl_in_pl(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %.loopexit65, label %4

4:                                                ; preds = %1
  %5 = load i32, ptr %3, align 8, !tbaa !9
  switch i32 %5, label %.loopexit65 [
    i32 2008, label %6
    i32 2009, label %6
    i32 2006, label %86
    i32 2007, label %86
    i32 2005, label %89
    i32 2010, label %91
  ]

6:                                                ; preds = %4, %4
  %7 = getelementptr inbounds i8, ptr %3, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !12
  %.not57 = icmp eq ptr %8, null
  br i1 %.not57, label %9, label %11

9:                                                ; preds = %6
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @exit(i32 noundef 1) #7
  unreachable

11:                                               ; preds = %6
  %12 = tail call ptr @new_TokenList() #6
  %13 = tail call ptr @new_TokenList() #6
  %14 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr %13, ptr %14, align 8, !tbaa !13
  %15 = load ptr, ptr %0, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  %19 = tail call ptr @copy_Token(ptr noundef %18)
  store ptr %19, ptr %12, align 8, !tbaa !17
  %20 = load ptr, ptr %0, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %.not58 = icmp eq ptr %26, null
  br i1 %.not58, label %41, label %27

27:                                               ; preds = %11
  %28 = tail call ptr @new_Token(i32 noundef 256) #6
  %29 = load ptr, ptr %14, align 8, !tbaa !13
  store ptr %28, ptr %29, align 8, !tbaa !17
  %30 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %28, ptr noundef nonnull dereferenceable(1) @.str) #6
  %31 = load ptr, ptr %0, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !12
  %.0.in69 = getelementptr inbounds i8, ptr %33, i64 8
  %.070 = load ptr, ptr %.0.in69, align 8, !tbaa !5
  %.not5971 = icmp eq ptr %.070, null
  br i1 %.not5971, label %.loopexit64, label %.lr.ph73

.lr.ph73:                                         ; preds = %27, %.lr.ph73
  %.072 = phi ptr [ %.0, %.lr.ph73 ], [ %.070, %27 ]
  %34 = load ptr, ptr %14, align 8, !tbaa !13
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %35, ptr noundef nonnull dereferenceable(1) @.str.1) #6
  %37 = load ptr, ptr %14, align 8, !tbaa !13
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = load ptr, ptr %.072, align 8, !tbaa !17
  %40 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %38, ptr noundef nonnull dereferenceable(1) %39) #6
  %.0.in = getelementptr inbounds i8, ptr %.072, i64 8
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !5
  %.not59 = icmp eq ptr %.0, null
  br i1 %.not59, label %.loopexit64, label %.lr.ph73, !llvm.loop !19

41:                                               ; preds = %11
  %42 = load ptr, ptr %24, align 8, !tbaa !17
  %43 = tail call ptr @copy_Token(ptr noundef %42)
  %44 = load ptr, ptr %14, align 8, !tbaa !13
  store ptr %43, ptr %44, align 8, !tbaa !17
  br label %.loopexit64

.loopexit64:                                      ; preds = %.lr.ph73, %27, %41
  %45 = load ptr, ptr %0, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  store ptr %12, ptr %46, align 8, !tbaa !21
  %47 = load ptr, ptr %0, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 48
  %49 = load ptr, ptr %48, align 8, !tbaa !22
  %50 = getelementptr inbounds i8, ptr %47, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !12
  %.054.in78 = getelementptr inbounds i8, ptr %51, i64 24
  %.05479 = load ptr, ptr %.054.in78, align 8, !tbaa !23
  %.not6080 = icmp eq ptr %.05479, null
  br i1 %.not6080, label %._crit_edge, label %.lr.ph83

.lr.ph83:                                         ; preds = %.loopexit64, %.loopexit
  %.05482 = phi ptr [ %.054, %.loopexit ], [ %.05479, %.loopexit64 ]
  %.05381 = phi ptr [ %79, %.loopexit ], [ %47, %.loopexit64 ]
  %52 = tail call ptr @new_TokenList() #6
  %53 = tail call ptr @new_TokenList() #6
  %54 = getelementptr inbounds i8, ptr %52, i64 8
  store ptr %53, ptr %54, align 8, !tbaa !13
  %55 = load ptr, ptr %.05482, align 8, !tbaa !15
  %56 = tail call ptr @copy_Token(ptr noundef %55)
  store ptr %56, ptr %52, align 8, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %.05482, i64 8
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %.not61 = icmp eq ptr %60, null
  br i1 %.not61, label %73, label %61

61:                                               ; preds = %.lr.ph83
  %62 = tail call ptr @new_Token(i32 noundef 256) #6
  %63 = load ptr, ptr %54, align 8, !tbaa !13
  store ptr %62, ptr %63, align 8, !tbaa !17
  %64 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %62, ptr noundef nonnull dereferenceable(1) @.str) #6
  %.174 = load ptr, ptr %57, align 8, !tbaa !5
  %.not6275 = icmp eq ptr %.174, null
  br i1 %.not6275, label %.loopexit, label %.lr.ph77

.lr.ph77:                                         ; preds = %61, %.lr.ph77
  %.176 = phi ptr [ %.1, %.lr.ph77 ], [ %.174, %61 ]
  %65 = load ptr, ptr %54, align 8, !tbaa !13
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  %67 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %66, ptr noundef nonnull dereferenceable(1) @.str.1) #6
  %68 = load ptr, ptr %54, align 8, !tbaa !13
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %70 = load ptr, ptr %.176, align 8, !tbaa !17
  %71 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %69, ptr noundef nonnull dereferenceable(1) %70) #6
  %72 = getelementptr inbounds i8, ptr %.176, i64 8
  %.1 = load ptr, ptr %72, align 8, !tbaa !5
  %.not62 = icmp eq ptr %.1, null
  br i1 %.not62, label %.loopexit, label %.lr.ph77, !llvm.loop !24

73:                                               ; preds = %.lr.ph83
  %74 = load ptr, ptr %58, align 8, !tbaa !17
  %75 = tail call ptr @copy_Token(ptr noundef %74)
  %76 = load ptr, ptr %54, align 8, !tbaa !13
  store ptr %75, ptr %76, align 8, !tbaa !17
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph77, %61, %73
  %77 = load ptr, ptr %0, align 8, !tbaa !5
  %78 = load i32, ptr %77, align 8, !tbaa !9
  %79 = tail call ptr @new_PlNode(i32 noundef %78) #6
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  store ptr %52, ptr %80, align 8, !tbaa !21
  %81 = getelementptr inbounds i8, ptr %.05381, i64 48
  store ptr %79, ptr %81, align 8, !tbaa !22
  %.054.in = getelementptr inbounds i8, ptr %.05482, i64 24
  %.054 = load ptr, ptr %.054.in, align 8, !tbaa !23
  %.not60 = icmp eq ptr %.054, null
  br i1 %.not60, label %._crit_edge.loopexit, label %.lr.ph83, !llvm.loop !25

._crit_edge.loopexit:                             ; preds = %.loopexit
  %.pre = load ptr, ptr %0, align 8, !tbaa !5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre, i64 8
  %.pre84 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !12
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.loopexit64
  %82 = phi ptr [ %51, %.loopexit64 ], [ %.pre84, %._crit_edge.loopexit ]
  %.053.lcssa = phi ptr [ %47, %.loopexit64 ], [ %79, %._crit_edge.loopexit ]
  tail call void @free_TypedList(ptr noundef %82) #6
  %83 = load ptr, ptr %0, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 8
  store ptr null, ptr %84, align 8, !tbaa !12
  %85 = getelementptr inbounds i8, ptr %.053.lcssa, i64 48
  store ptr %49, ptr %85, align 8, !tbaa !22
  br label %.loopexit65.sink.split

86:                                               ; preds = %4, %4
  %87 = getelementptr inbounds i8, ptr %3, i64 48
  %storemerge66 = load ptr, ptr %87, align 8, !tbaa !5
  store ptr %storemerge66, ptr %2, align 8, !tbaa !5
  %.not5667 = icmp eq ptr %storemerge66, null
  br i1 %.not5667, label %.loopexit65, label %.lr.ph

.lr.ph:                                           ; preds = %86, %.lr.ph
  %storemerge68 = phi ptr [ %storemerge, %.lr.ph ], [ %storemerge66, %86 ]
  call void @normalize_tyl_in_pl(ptr noundef nonnull %2)
  %88 = getelementptr inbounds i8, ptr %storemerge68, i64 56
  %storemerge = load ptr, ptr %88, align 8, !tbaa !5
  store ptr %storemerge, ptr %2, align 8, !tbaa !5
  %.not56 = icmp eq ptr %storemerge, null
  br i1 %.not56, label %.loopexit65, label %.lr.ph, !llvm.loop !26

89:                                               ; preds = %4
  %90 = getelementptr inbounds i8, ptr %3, i64 48
  br label %.loopexit65.sink.split

91:                                               ; preds = %4
  %92 = getelementptr inbounds i8, ptr %3, i64 48
  tail call void @normalize_tyl_in_pl(ptr noundef nonnull %92)
  %93 = load ptr, ptr %0, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i64 48
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = getelementptr inbounds i8, ptr %95, i64 56
  br label %.loopexit65.sink.split

.loopexit65.sink.split:                           ; preds = %91, %89, %._crit_edge
  %.sink = phi ptr [ %85, %._crit_edge ], [ %90, %89 ], [ %96, %91 ]
  tail call void @normalize_tyl_in_pl(ptr noundef nonnull %.sink)
  br label %.loopexit65

.loopexit65:                                      ; preds = %.lr.ph, %.loopexit65.sink.split, %86, %4, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret void
}

declare void @free_TypedList(ptr noundef) local_unnamed_addr #2

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

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

declare ptr @new_PlNode(i32 noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { 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, !11, i64 0}
!10 = !{!"_PlNode", !11, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!14, !6, i64 8}
!14 = !{!"_TokenList", !6, i64 0, !6, i64 8}
!15 = !{!16, !6, i64 0}
!16 = !{!"_TypedList", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24}
!17 = !{!14, !6, i64 0}
!18 = !{!16, !6, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !6, i64 16}
!22 = !{!10, !6, i64 48}
!23 = !{!16, !6, i64 24}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}
!26 = distinct !{!26, !20}


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