; LLVM IR from aap/pdp6 :: fe6 (fe)

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

@.str.31 = external hidden unnamed_addr constant [4 x i8], align 1
@stdout = external global ptr, align 8

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @tyo(i8 noundef signext) #1

; Function Attrs: nounwind uwtable
declare dso_local void @typenum(i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @typestr(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @prword(i32 noundef %0, i64 noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca [7 x i8], align 1
  %8 = alloca double, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 7, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %9 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %9, label %90 [
    i32 4, label %10
    i32 5, label %47
    i32 6, label %68
    i32 3, label %74
    i32 2, label %77
    i32 7, label %83
  ]

10:                                               ; preds = %2
  call void @tyo(i8 noundef signext 27)
  %11 = load i64, ptr %4, align 8, !tbaa !9
  %12 = and i64 %11, 1
  %13 = add i64 48, %12
  %14 = trunc i64 %13 to i8
  call void @tyo(i8 noundef signext %14)
  call void @tyo(i8 noundef signext 34)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %43, %10
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 5
  br i1 %17, label %18, label %46

18:                                               ; preds = %15
  %19 = load i64, ptr %4, align 8, !tbaa !9
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = sub nsw i32 4, %20
  %22 = mul nsw i32 7, %21
  %23 = add nsw i32 %22, 1
  %24 = zext i32 %23 to i64
  %25 = lshr i64 %19, %24
  %26 = and i64 %25, 127
  %27 = trunc i64 %26 to i8
  store i8 %27, ptr %6, align 1, !tbaa !11
  %28 = load i8, ptr %6, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = icmp slt i32 %29, 32
  br i1 %30, label %35, label %31

31:                                               ; preds = %18
  %32 = load i8, ptr %6, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 127
  br i1 %34, label %35, label %40

35:                                               ; preds = %31, %18
  call void @tyo(i8 noundef signext 94)
  %36 = load i8, ptr %6, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = xor i32 %37, 64
  %39 = trunc i32 %38 to i8
  call void @tyo(i8 noundef signext %39)
  br label %42

40:                                               ; preds = %31
  %41 = load i8, ptr %6, align 1, !tbaa !11
  call void @tyo(i8 noundef signext %41)
  br label %42

42:                                               ; preds = %40, %35
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !5
  br label %15, !llvm.loop !12

46:                                               ; preds = %15
  call void @tyo(i8 noundef signext 27)
  br label %92

47:                                               ; preds = %2
  call void @tyo(i8 noundef signext 27)
  call void @tyo(i8 noundef signext 49)
  call void @tyo(i8 noundef signext 39)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %64, %47
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = icmp slt i32 %49, 6
  br i1 %50, label %51, label %67

51:                                               ; preds = %48
  %52 = load i64, ptr %4, align 8, !tbaa !9
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sub nsw i32 5, %53
  %55 = mul nsw i32 6, %54
  %56 = zext i32 %55 to i64
  %57 = lshr i64 %52, %56
  %58 = and i64 %57, 63
  %59 = trunc i64 %58 to i8
  store i8 %59, ptr %6, align 1, !tbaa !11
  %60 = load i8, ptr %6, align 1, !tbaa !11
  %61 = sext i8 %60 to i32
  %62 = add nsw i32 %61, 32
  %63 = trunc i32 %62 to i8
  call void @tyo(i8 noundef signext %63)
  br label %64

64:                                               ; preds = %51
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !14

67:                                               ; preds = %48
  call void @tyo(i8 noundef signext 27)
  br label %92

68:                                               ; preds = %2
  call void @tyo(i8 noundef signext 27)
  %69 = load i64, ptr %4, align 8, !tbaa !9
  %70 = getelementptr inbounds [7 x i8], ptr %7, i64 0, i64 0
  %71 = call i32 @unrad50(i64 noundef %69, ptr noundef %70)
  %72 = sext i32 %71 to i64
  call void @typenum(i64 noundef %72)
  call void @tyo(i8 noundef signext 38)
  %73 = getelementptr inbounds [7 x i8], ptr %7, i64 0, i64 0
  call void @typestr(ptr noundef %73)
  call void @tyo(i8 noundef signext 27)
  br label %92

74:                                               ; preds = %2
  %75 = load i64, ptr %4, align 8, !tbaa !9
  %76 = call ptr @disasm(i64 noundef %75)
  call void @typestr(ptr noundef %76)
  br label %92

77:                                               ; preds = %2
  call void @tyo(i8 noundef signext 40)
  %78 = load i64, ptr %4, align 8, !tbaa !9
  %79 = and i64 %78, 262143
  call void @typenum(i64 noundef %79)
  call void @tyo(i8 noundef signext 41)
  %80 = load i64, ptr %4, align 8, !tbaa !9
  %81 = lshr i64 %80, 18
  %82 = and i64 %81, 262143
  call void @typenum(i64 noundef %82)
  br label %92

83:                                               ; preds = %2
  %84 = load i64, ptr %4, align 8, !tbaa !9
  %85 = call double @pdptod(i64 noundef %84)
  store double %85, ptr %8, align 8, !tbaa !15
  %86 = load double, ptr %8, align 8, !tbaa !15
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.31, double noundef %86)
  %88 = load ptr, ptr @stdout, align 8, !tbaa !17
  %89 = call i32 @fflush(ptr noundef %88)
  br label %92

90:                                               ; preds = %2
  %91 = load i64, ptr %4, align 8, !tbaa !9
  call void @typenum(i64 noundef %91)
  br label %92

92:                                               ; preds = %90, %83, %77, %74, %68, %67, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 7, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret void
}

declare i32 @unrad50(i64 noundef, ptr noundef) #2

declare ptr @disasm(i64 noundef) #2

declare double @pdptod(i64 noundef) #2

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

declare i32 @fflush(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}


; 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.31 = external hidden unnamed_addr constant [4 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @tyo(i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @typenum(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @typestr(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @prword(i32 noundef %0, i64 noundef %1) local_unnamed_addr #1 {
  %3 = alloca [7 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %3) #4
  switch i32 %0, label %85 [
    i32 4, label %4
    i32 5, label %47
    i32 6, label %71
    i32 3, label %74
    i32 2, label %76
    i32 7, label %80
  ]

4:                                                ; preds = %2
  tail call void @tyo(i8 noundef signext 27)
  %5 = trunc i64 %1 to i8
  %6 = and i8 %5, 1
  %7 = or disjoint i8 %6, 48
  tail call void @tyo(i8 noundef signext %7)
  tail call void @tyo(i8 noundef signext 34)
  %8 = lshr i64 %1, 29
  %9 = trunc i64 %8 to i8
  %10 = and i8 %9, 127
  %11 = icmp ult i8 %10, 32
  %12 = icmp eq i8 %10, 127
  %or.cond = or i1 %11, %12
  br i1 %or.cond, label %13, label %15

13:                                               ; preds = %4
  tail call void @tyo(i8 noundef signext 94)
  %14 = xor i8 %10, 64
  br label %15

15:                                               ; preds = %4, %13
  %.sink = phi i8 [ %14, %13 ], [ %10, %4 ]
  tail call void @tyo(i8 noundef signext %.sink)
  %16 = lshr i64 %1, 22
  %17 = trunc i64 %16 to i8
  %18 = and i8 %17, 127
  %19 = icmp ult i8 %18, 32
  %20 = icmp eq i8 %18, 127
  %or.cond.1 = or i1 %19, %20
  br i1 %or.cond.1, label %21, label %23

21:                                               ; preds = %15
  tail call void @tyo(i8 noundef signext 94)
  %22 = xor i8 %18, 64
  br label %23

23:                                               ; preds = %15, %21
  %.sink27 = phi i8 [ %22, %21 ], [ %18, %15 ]
  tail call void @tyo(i8 noundef signext %.sink27)
  %24 = lshr i64 %1, 15
  %25 = trunc i64 %24 to i8
  %26 = and i8 %25, 127
  %27 = icmp ult i8 %26, 32
  %28 = icmp eq i8 %26, 127
  %or.cond.2 = or i1 %27, %28
  br i1 %or.cond.2, label %29, label %31

29:                                               ; preds = %23
  tail call void @tyo(i8 noundef signext 94)
  %30 = xor i8 %26, 64
  br label %31

31:                                               ; preds = %23, %29
  %.sink28 = phi i8 [ %30, %29 ], [ %26, %23 ]
  tail call void @tyo(i8 noundef signext %.sink28)
  %32 = lshr i64 %1, 8
  %33 = trunc i64 %32 to i8
  %34 = and i8 %33, 127
  %35 = icmp ult i8 %34, 32
  %36 = icmp eq i8 %34, 127
  %or.cond.3 = or i1 %35, %36
  br i1 %or.cond.3, label %37, label %39

37:                                               ; preds = %31
  tail call void @tyo(i8 noundef signext 94)
  %38 = xor i8 %34, 64
  br label %39

39:                                               ; preds = %31, %37
  %.sink29 = phi i8 [ %38, %37 ], [ %34, %31 ]
  tail call void @tyo(i8 noundef signext %.sink29)
  %40 = trunc i64 %1 to i8
  %41 = lshr i8 %40, 1
  %42 = icmp ult i8 %40, 64
  %43 = icmp eq i8 %41, 127
  %or.cond.4 = or i1 %42, %43
  br i1 %or.cond.4, label %44, label %46

44:                                               ; preds = %39
  tail call void @tyo(i8 noundef signext 94)
  %45 = xor i8 %41, 64
  br label %46

46:                                               ; preds = %39, %44
  %.sink30 = phi i8 [ %45, %44 ], [ %41, %39 ]
  tail call void @tyo(i8 noundef signext %.sink30)
  tail call void @tyo(i8 noundef signext 27)
  br label %86

47:                                               ; preds = %2
  tail call void @tyo(i8 noundef signext 27)
  tail call void @tyo(i8 noundef signext 49)
  tail call void @tyo(i8 noundef signext 39)
  %48 = lshr i64 %1, 30
  %49 = trunc i64 %48 to i8
  %50 = and i8 %49, 63
  %51 = add nuw nsw i8 %50, 32
  tail call void @tyo(i8 noundef signext %51)
  %52 = lshr i64 %1, 24
  %53 = trunc i64 %52 to i8
  %54 = and i8 %53, 63
  %55 = add nuw nsw i8 %54, 32
  tail call void @tyo(i8 noundef signext %55)
  %56 = lshr i64 %1, 18
  %57 = trunc i64 %56 to i8
  %58 = and i8 %57, 63
  %59 = add nuw nsw i8 %58, 32
  tail call void @tyo(i8 noundef signext %59)
  %60 = lshr i64 %1, 12
  %61 = trunc i64 %60 to i8
  %62 = and i8 %61, 63
  %63 = add nuw nsw i8 %62, 32
  tail call void @tyo(i8 noundef signext %63)
  %64 = lshr i64 %1, 6
  %65 = trunc i64 %64 to i8
  %66 = and i8 %65, 63
  %67 = add nuw nsw i8 %66, 32
  tail call void @tyo(i8 noundef signext %67)
  %68 = trunc i64 %1 to i8
  %69 = and i8 %68, 63
  %70 = add nuw nsw i8 %69, 32
  tail call void @tyo(i8 noundef signext %70)
  tail call void @tyo(i8 noundef signext 27)
  br label %86

71:                                               ; preds = %2
  tail call void @tyo(i8 noundef signext 27)
  %72 = call i32 @unrad50(i64 noundef %1, ptr noundef nonnull %3) #4
  %73 = sext i32 %72 to i64
  call void @typenum(i64 noundef %73)
  call void @tyo(i8 noundef signext 38)
  call void @typestr(ptr noundef nonnull %3)
  call void @tyo(i8 noundef signext 27)
  br label %86

74:                                               ; preds = %2
  %75 = tail call ptr @disasm(i64 noundef %1) #4
  tail call void @typestr(ptr noundef %75)
  br label %86

76:                                               ; preds = %2
  tail call void @tyo(i8 noundef signext 40)
  %77 = and i64 %1, 262143
  tail call void @typenum(i64 noundef %77)
  tail call void @tyo(i8 noundef signext 41)
  %78 = lshr i64 %1, 18
  %79 = and i64 %78, 262143
  tail call void @typenum(i64 noundef %79)
  br label %86

80:                                               ; preds = %2
  %81 = tail call double @pdptod(i64 noundef %1) #4
  %82 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31, double noundef %81)
  %83 = load ptr, ptr @stdout, align 8, !tbaa !5
  %84 = tail call i32 @fflush(ptr noundef %83)
  br label %86

85:                                               ; preds = %2
  tail call void @typenum(i64 noundef %1)
  br label %86

86:                                               ; preds = %85, %80, %76, %74, %71, %47, %46
  call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %3) #4
  ret void
}

declare i32 @unrad50(i64 noundef, ptr noundef) local_unnamed_addr #2

declare ptr @disasm(i64 noundef) local_unnamed_addr #2

declare double @pdptod(i64 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass