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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@lp = external dso_local global ptr, align 8
@peekt = external dso_local global %struct.Token, align 8
@numops = external dso_local global i32, align 4
@ops = external dso_local global [20 x ptr], align 16
@.str.38 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [30 x i8], align 1

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

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

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

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

declare i64 @fw(i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @putv(i64 noundef, i32 noundef) #0

declare i32 @right(i64 noundef) #3

declare i32 @left(i64 noundef) #3

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @opline(i64 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.Value, align 8
  %9 = alloca %struct.Value, align 8
  %10 = alloca %struct.Value, align 8
  %11 = alloca %struct.Token, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.Value, align 8
  %14 = alloca %struct.Token, align 8
  %15 = alloca %struct.Value, align 8
  %16 = alloca %struct.Value, align 8
  %17 = alloca %struct.Value, align 8
  %18 = alloca %struct.Token, align 8
  %19 = alloca %struct.Value, align 8
  %20 = alloca %struct.Token, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @splitop()
  %21 = load i32, ptr @numops, align 4, !tbaa !9
  switch i32 %21, label %25 [
    i32 0, label %22
    i32 1, label %23
    i32 2, label %27
  ]

22:                                               ; preds = %2
  store ptr @.str.6, ptr %5, align 8, !tbaa !11
  store ptr @.str.6, ptr %6, align 8, !tbaa !11
  br label %30

23:                                               ; preds = %2
  store ptr @.str.6, ptr %5, align 8, !tbaa !11
  %24 = load ptr, ptr @ops, align 16, !tbaa !11
  store ptr %24, ptr %6, align 8, !tbaa !11
  br label %30

25:                                               ; preds = %2
  %26 = load i32, ptr @numops, align 4, !tbaa !9
  call void (i32, ptr, ...) @err(i32 noundef 0, ptr noundef @.str.40, i32 noundef %26)
  br label %27

27:                                               ; preds = %25, %2
  %28 = load ptr, ptr @ops, align 16, !tbaa !11
  store ptr %28, ptr %5, align 8, !tbaa !11
  %29 = load ptr, ptr getelementptr inbounds ([20 x ptr], ptr @ops, i64 0, i64 1), align 8, !tbaa !11
  store ptr %29, ptr %6, align 8, !tbaa !11
  br label %30

30:                                               ; preds = %27, %23, %22
  %31 = load ptr, ptr %5, align 8, !tbaa !11
  store ptr %31, ptr @lp, align 8, !tbaa !11
  store i32 0, ptr @peekt, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %32 = call { i64, i32 } @expr(i32 noundef 2, ptr noundef null)
  %33 = getelementptr inbounds { i64, i32 }, ptr %13, i32 0, i32 0
  %34 = extractvalue { i64, i32 } %32, 0
  store i64 %34, ptr %33, align 8
  %35 = getelementptr inbounds { i64, i32 }, ptr %13, i32 0, i32 1
  %36 = extractvalue { i64, i32 } %32, 1
  store i32 %36, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !11
  store ptr %37, ptr @lp, align 8, !tbaa !11
  store i32 0, ptr @peekt, align 8, !tbaa !13
  %38 = load ptr, ptr @lp, align 8, !tbaa !11
  %39 = load i8, ptr %38, align 1, !tbaa !16
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 64
  br i1 %41, label %42, label %45

42:                                               ; preds = %30
  %43 = load ptr, ptr @lp, align 8, !tbaa !11
  %44 = getelementptr inbounds i8, ptr %43, i32 1
  store ptr %44, ptr @lp, align 8, !tbaa !11
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %42, %30
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %46 = call { i32, i64 } @token()
  %47 = getelementptr inbounds { i32, i64 }, ptr %14, i32 0, i32 0
  %48 = extractvalue { i32, i64 } %46, 0
  store i32 %48, ptr %47, align 8
  %49 = getelementptr inbounds { i32, i64 }, ptr %14, i32 0, i32 1
  %50 = extractvalue { i32, i64 } %46, 1
  store i64 %50, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @peekt, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !17
  %51 = load i32, ptr @peekt, align 8, !tbaa !13
  %52 = icmp ne i32 %51, 40
  br i1 %52, label %53, label %60

53:                                               ; preds = %45
  store ptr null, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %54 = call { i64, i32 } @expr(i32 noundef 0, ptr noundef %7)
  %55 = getelementptr inbounds { i64, i32 }, ptr %15, i32 0, i32 0
  %56 = extractvalue { i64, i32 } %54, 0
  store i64 %56, ptr %55, align 8
  %57 = getelementptr inbounds { i64, i32 }, ptr %15, i32 0, i32 1
  %58 = extractvalue { i64, i32 } %54, 1
  store i32 %58, ptr %57, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  %59 = load ptr, ptr %7, align 8, !tbaa !11
  call void @updateext(ptr noundef %59, ptr noundef %10, i32 noundef 0)
  br label %63

60:                                               ; preds = %45
  %61 = getelementptr inbounds %struct.Value, ptr %16, i32 0, i32 0
  store i64 0, ptr %61, align 8, !tbaa !18
  %62 = getelementptr inbounds %struct.Value, ptr %16, i32 0, i32 1
  store i32 0, ptr %62, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !15
  br label %63

63:                                               ; preds = %60, %53
  %64 = getelementptr inbounds %struct.Value, ptr %17, i32 0, i32 0
  store i64 0, ptr %64, align 8, !tbaa !18
  %65 = getelementptr inbounds %struct.Value, ptr %17, i32 0, i32 1
  store i32 0, ptr %65, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %66 = call { i32, i64 } @token()
  %67 = getelementptr inbounds { i32, i64 }, ptr %18, i32 0, i32 0
  %68 = extractvalue { i32, i64 } %66, 0
  store i32 %68, ptr %67, align 8
  %69 = getelementptr inbounds { i32, i64 }, ptr %18, i32 0, i32 1
  %70 = extractvalue { i32, i64 } %66, 1
  store i64 %70, ptr %69, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  %71 = getelementptr inbounds %struct.Token, ptr %11, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !13
  %73 = icmp eq i32 %72, 40
  br i1 %73, label %74, label %98

74:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %75 = call { i64, i32 } @expr(i32 noundef 2, ptr noundef null)
  %76 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 0
  %77 = extractvalue { i64, i32 } %75, 0
  store i64 %77, ptr %76, align 8
  %78 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 1
  %79 = extractvalue { i64, i32 } %75, 1
  store i32 %79, ptr %78, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %80 = call { i32, i64 } @token()
  %81 = getelementptr inbounds { i32, i64 }, ptr %20, i32 0, i32 0
  %82 = extractvalue { i32, i64 } %80, 0
  store i32 %82, ptr %81, align 8
  %83 = getelementptr inbounds { i32, i64 }, ptr %20, i32 0, i32 1
  %84 = extractvalue { i32, i64 } %80, 1
  store i64 %84, ptr %83, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  %85 = getelementptr inbounds %struct.Token, ptr %11, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !13
  %87 = icmp ne i32 %86, 41
  br i1 %87, label %88, label %89

88:                                               ; preds = %74
  call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef @.str.38)
  br label %89

89:                                               ; preds = %88, %74
  %90 = getelementptr inbounds %struct.Value, ptr %9, i32 0, i32 0
  %91 = load i64, ptr %90, align 8, !tbaa !18
  %92 = call i32 @right(i64 noundef %91)
  %93 = getelementptr inbounds %struct.Value, ptr %9, i32 0, i32 0
  %94 = load i64, ptr %93, align 8, !tbaa !18
  %95 = call i32 @left(i64 noundef %94)
  %96 = call i64 @fw(i32 noundef %92, i32 noundef %95)
  %97 = getelementptr inbounds %struct.Value, ptr %9, i32 0, i32 0
  store i64 %96, ptr %97, align 8, !tbaa !18
  br label %98

98:                                               ; preds = %89, %63
  %99 = load i32, ptr %4, align 4, !tbaa !9
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %108

101:                                              ; preds = %98
  %102 = getelementptr inbounds %struct.Value, ptr %8, i32 0, i32 0
  %103 = load i64, ptr %102, align 8, !tbaa !18
  %104 = and i64 %103, 508
  %105 = shl i64 %104, 24
  %106 = load i64, ptr %3, align 8, !tbaa !5
  %107 = add i64 %106, %105
  store i64 %107, ptr %3, align 8, !tbaa !5
  br label %115

108:                                              ; preds = %98
  %109 = getelementptr inbounds %struct.Value, ptr %8, i32 0, i32 0
  %110 = load i64, ptr %109, align 8, !tbaa !18
  %111 = and i64 %110, 15
  %112 = shl i64 %111, 23
  %113 = load i64, ptr %3, align 8, !tbaa !5
  %114 = add i64 %113, %112
  store i64 %114, ptr %3, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %108, %101
  %116 = getelementptr inbounds %struct.Value, ptr %8, i32 0, i32 1
  %117 = load i32, ptr %116, align 8, !tbaa !20
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %120

119:                                              ; preds = %115
  call void (i32, ptr, ...) @err(i32 noundef 0, ptr noundef @.str.41)
  br label %120

120:                                              ; preds = %119, %115
  %121 = load i32, ptr %12, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %126

123:                                              ; preds = %120
  %124 = load i64, ptr %3, align 8, !tbaa !5
  %125 = or i64 %124, 4194304
  store i64 %125, ptr %3, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %123, %120
  %127 = load i64, ptr %3, align 8, !tbaa !5
  %128 = call i32 @left(i64 noundef %127)
  %129 = load i64, ptr %3, align 8, !tbaa !5
  %130 = call i32 @right(i64 noundef %129)
  %131 = getelementptr inbounds %struct.Value, ptr %10, i32 0, i32 0
  %132 = load i64, ptr %131, align 8, !tbaa !18
  %133 = call i32 @right(i64 noundef %132)
  %134 = add i32 %130, %133
  %135 = call i64 @fw(i32 noundef %128, i32 noundef %134)
  store i64 %135, ptr %3, align 8, !tbaa !5
  %136 = load i64, ptr %3, align 8, !tbaa !5
  %137 = call i32 @left(i64 noundef %136)
  %138 = getelementptr inbounds %struct.Value, ptr %9, i32 0, i32 0
  %139 = load i64, ptr %138, align 8, !tbaa !18
  %140 = call i32 @left(i64 noundef %139)
  %141 = add i32 %137, %140
  %142 = load i64, ptr %3, align 8, !tbaa !5
  %143 = call i32 @right(i64 noundef %142)
  %144 = getelementptr inbounds %struct.Value, ptr %9, i32 0, i32 0
  %145 = load i64, ptr %144, align 8, !tbaa !18
  %146 = call i32 @right(i64 noundef %145)
  %147 = add i32 %143, %146
  %148 = call i64 @fw(i32 noundef %141, i32 noundef %147)
  store i64 %148, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.Value, ptr %9, i32 0, i32 1
  %150 = load i32, ptr %149, align 8, !tbaa !20
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %153

152:                                              ; preds = %126
  call void (i32, ptr, ...) @err(i32 noundef 0, ptr noundef @.str.42)
  br label %153

153:                                              ; preds = %152, %126
  %154 = load i64, ptr %3, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.Value, ptr %10, i32 0, i32 1
  %156 = load i32, ptr %155, align 8, !tbaa !20
  call void @putv(i64 noundef %154, i32 noundef %156)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

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

!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 = !{!"long", !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, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"Token", !10, i64 0, !7, i64 8}
!15 = !{i64 0, i64 8, !5, i64 8, i64 4, !9}
!16 = !{!7, !7, i64 0}
!17 = !{i64 0, i64 4, !9, i64 8, i64 8, !16}
!18 = !{!19, !6, i64 0}
!19 = !{!"Value", !6, i64 0, !10, i64 8}
!20 = !{!19, !10, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@lp = external dso_local local_unnamed_addr global ptr, align 8
@peekt = external dso_local local_unnamed_addr global %struct.Token, align 8
@numops = external dso_local local_unnamed_addr global i32, align 4
@ops = external dso_local local_unnamed_addr global [20 x ptr], align 16
@.str.38 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @err(i32 noundef, 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

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

declare i64 @fw(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @putv(i64 noundef, i32 noundef) local_unnamed_addr #0

declare i32 @right(i64 noundef) local_unnamed_addr #2

declare i32 @left(i64 noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @opline(i64 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca %struct.Value, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  tail call void @splitop()
  %5 = load i32, ptr @numops, align 4, !tbaa !5
  switch i32 %5, label %8 [
    i32 0, label %12
    i32 1, label %6
    i32 2, label %9
  ]

6:                                                ; preds = %2
  %7 = load ptr, ptr @ops, align 16, !tbaa !9
  br label %12

8:                                                ; preds = %2
  tail call void (i32, ptr, ...) @err(i32 noundef 0, ptr noundef nonnull @.str.40, i32 noundef %5)
  br label %9

9:                                                ; preds = %8, %2
  %10 = load ptr, ptr @ops, align 16, !tbaa !9
  %11 = load ptr, ptr getelementptr inbounds (i8, ptr @ops, i64 8), align 8, !tbaa !9
  br label %12

12:                                               ; preds = %2, %9, %6
  %.040 = phi ptr [ %11, %9 ], [ %7, %6 ], [ @.str.6, %2 ]
  %.039 = phi ptr [ %10, %9 ], [ @.str.6, %6 ], [ @.str.6, %2 ]
  store ptr %.039, ptr @lp, align 8, !tbaa !9
  store i32 0, ptr @peekt, align 8, !tbaa !11
  %13 = tail call { i64, i32 } @expr(i32 noundef 2, ptr noundef null)
  %14 = extractvalue { i64, i32 } %13, 0
  %15 = extractvalue { i64, i32 } %13, 1
  store ptr %.040, ptr @lp, align 8, !tbaa !9
  store i32 0, ptr @peekt, align 8, !tbaa !11
  %16 = load i8, ptr %.040, align 1, !tbaa !13
  %.not46 = icmp eq i8 %16, 64
  br i1 %.not46, label %17, label %19

17:                                               ; preds = %12
  %18 = getelementptr inbounds i8, ptr %.040, i64 1
  store ptr %18, ptr @lp, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %17, %12
  %20 = tail call { i32, i64 } @token()
  %21 = extractvalue { i32, i64 } %20, 0
  %22 = extractvalue { i32, i64 } %20, 1
  store i32 %21, ptr @peekt, align 8, !tbaa !5
  store i64 %22, ptr getelementptr inbounds (i8, ptr @peekt, i64 8), align 8, !tbaa !13
  %.not = icmp eq i32 %21, 40
  br i1 %.not, label %28, label %23

23:                                               ; preds = %19
  store ptr null, ptr %3, align 8, !tbaa !9
  %24 = call { i64, i32 } @expr(i32 noundef 0, ptr noundef nonnull %3)
  %25 = extractvalue { i64, i32 } %24, 0
  %26 = extractvalue { i64, i32 } %24, 1
  store i64 %25, ptr %4, align 8, !tbaa !14
  %.sroa.412.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %26, ptr %.sroa.412.0..sroa_idx, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8, !tbaa !9
  call void @updateext(ptr noundef %27, ptr noundef nonnull %4, i32 noundef 0)
  br label %29

28:                                               ; preds = %19
  store i64 0, ptr %4, align 8, !tbaa !14
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  store i32 0, ptr %.sroa.29.0..sroa_idx, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %28, %23
  %30 = call { i32, i64 } @token()
  %31 = extractvalue { i32, i64 } %30, 0
  %32 = icmp eq i32 %31, 40
  br i1 %32, label %33, label %45

33:                                               ; preds = %29
  %34 = call { i64, i32 } @expr(i32 noundef 2, ptr noundef null)
  %35 = extractvalue { i64, i32 } %34, 0
  %36 = extractvalue { i64, i32 } %34, 1
  %37 = call { i32, i64 } @token()
  %38 = extractvalue { i32, i64 } %37, 0
  %.not42 = icmp eq i32 %38, 41
  br i1 %.not42, label %40, label %39

39:                                               ; preds = %33
  call void (i32, ptr, ...) @err(i32 noundef 1, ptr noundef nonnull @.str.38)
  br label %40

40:                                               ; preds = %39, %33
  %41 = call i32 @right(i64 noundef %35) #3
  %42 = call i32 @left(i64 noundef %35) #3
  %43 = call i64 @fw(i32 noundef %41, i32 noundef %42) #3
  %44 = icmp eq i32 %36, 0
  br label %45

45:                                               ; preds = %40, %29
  %.sroa.022.0 = phi i64 [ %43, %40 ], [ 0, %29 ]
  %.sroa.9.0 = phi i1 [ %44, %40 ], [ true, %29 ]
  %.not43 = icmp eq i32 %1, 0
  %46 = shl i64 %14, 24
  %47 = and i64 %46, 8522825728
  %48 = shl i64 %14, 23
  %49 = and i64 %48, 125829120
  %.pn = select i1 %.not43, i64 %49, i64 %47
  %.0 = add i64 %.pn, %0
  %.not44 = icmp eq i32 %15, 0
  br i1 %.not44, label %51, label %50

50:                                               ; preds = %45
  call void (i32, ptr, ...) @err(i32 noundef 0, ptr noundef nonnull @.str.41)
  br label %51

51:                                               ; preds = %50, %45
  %52 = or i64 %.0, 4194304
  %spec.select = select i1 %.not46, i64 %52, i64 %.0
  %53 = call i32 @left(i64 noundef %spec.select) #3
  %54 = call i32 @right(i64 noundef %spec.select) #3
  %55 = load i64, ptr %4, align 8, !tbaa !16
  %56 = call i32 @right(i64 noundef %55) #3
  %57 = add i32 %56, %54
  %58 = call i64 @fw(i32 noundef %53, i32 noundef %57) #3
  %59 = call i32 @left(i64 noundef %58) #3
  %60 = call i32 @left(i64 noundef %.sroa.022.0) #3
  %61 = add i32 %60, %59
  %62 = call i32 @right(i64 noundef %58) #3
  %63 = call i32 @right(i64 noundef %.sroa.022.0) #3
  %64 = add i32 %63, %62
  %65 = call i64 @fw(i32 noundef %61, i32 noundef %64) #3
  br i1 %.sroa.9.0, label %67, label %66

66:                                               ; preds = %51
  call void (i32, ptr, ...) @err(i32 noundef 0, ptr noundef nonnull @.str.42)
  br label %67

67:                                               ; preds = %66, %51
  %68 = getelementptr inbounds i8, ptr %4, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !18
  call void @putv(i64 noundef %65, i32 noundef %69)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret void
}

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"Token", !6, i64 0, !7, i64 8}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !15, i64 0}
!17 = !{!"Value", !15, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}


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