#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
main() {
  int c, length, max;
  int nw[22 + 2];
  int i, j;
  for (i = 1; i <= 22 + 1; i++)
    nw[i] = 0;
  length = 0;
  while ((c = getchar()) != EOF) {
    if (c == ' ' || c == '\n' || c == '\t') {
      if (length != 0) {
        if (length > 22)
          ++nw[22 + 1];
        else
          ++nw[length];
        length = 0;
      }
    } else
      ++length;
  }
  for (i = 1; i <= 22 + 1; i++) {
    if (i > 22)
      printf(" + | ");
    else
      printf("%2d | ", i);
    for (j = 0; j < nw[i]; j++)
      putchar('#');
    putchar('\n');
  }
  putchar('\n');
  max = 0;
  for (i = 1; i <= 22 + 1; i++)
    if (nw[i] > max)
      max = nw[i];
  for (i = 0; i < max; i++) {
    for (j = 1; j <= 22 + 1; j++)
      if (i + nw[j] < max)
        printf("   ");
      else
        printf(" # ");
    putchar('\n');
  }
  for (i = 1; i <= (22 + 1) * 3; i++)
    putchar('-');
  putchar('\n');
  for (i = 1; i <= 22; i++)
    printf("%2d ", i);
  printf(" +");
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x74(%rbp)
cmpl   $0x17,-0x74(%rbp)
jg     116d <main+0x3d>
movslq -0x74(%rbp),%rax
movl   $0x0,-0x70(%rbp,%rax,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1149 <main+0x19>
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e63(%rip),%rcx
cmp    (%rcx),%eax
je     11f6 <main+0xc6>
cmpl   $0x20,-0x8(%rbp)
je     11ab <main+0x7b>
cmpl   $0xa,-0x8(%rbp)
je     11ab <main+0x7b>
cmpl   $0x9,-0x8(%rbp)
jne    11e8 <main+0xb8>
cmpl   $0x0,-0xc(%rbp)
je     11e3 <main+0xb3>
cmpl   $0x16,-0xc(%rbp)
jle    11cd <main+0x9d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11dc <main+0xac>
movslq -0xc(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x70(%rbp,%rax,4)
movl   $0x0,-0xc(%rbp)
jmp    11f1 <main+0xc1>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1174 <main+0x44>
movl   $0x1,-0x74(%rbp)
cmpl   $0x17,-0x74(%rbp)
jg     127d <main+0x14d>
cmpl   $0x16,-0x74(%rbp)
jle    1224 <main+0xf4>
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1235 <main+0x105>
mov    -0x74(%rbp),%esi
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
movslq -0x74(%rbp),%rcx
cmp    -0x70(%rbp,%rcx,4),%eax
jge    1265 <main+0x135>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    123c <main+0x10c>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11fd <main+0xcd>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x74(%rbp)
cmpl   $0x17,-0x74(%rbp)
jg     12ce <main+0x19e>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
cmp    -0x10(%rbp),%eax
jle    12bb <main+0x18b>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
mov    %eax,-0x10(%rbp)
jmp    12c0 <main+0x190>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1295 <main+0x165>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1352 <main+0x222>
movl   $0x1,-0x78(%rbp)
cmpl   $0x17,-0x78(%rbp)
jg     133a <main+0x20a>
mov    -0x74(%rbp),%eax
movslq -0x78(%rbp),%rcx
add    -0x70(%rbp,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jge    1319 <main+0x1e9>
lea    0xd00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1327 <main+0x1f7>
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    132c <main+0x1fc>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    12e8 <main+0x1b8>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12d5 <main+0x1a5>
movl   $0x1,-0x74(%rbp)
cmpl   $0x45,-0x74(%rbp)
jg     137b <main+0x24b>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1359 <main+0x229>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x1,-0x74(%rbp)
cmpl   $0x16,-0x74(%rbp)
jg     13b5 <main+0x285>
mov    -0x74(%rbp),%esi
lea    0xc75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    138c <main+0x25c>
lea    0xc5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x60,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x50(%rsp)
movups %xmm0,0x44(%rsp)
movups %xmm0,0x34(%rsp)
movups %xmm0,0x24(%rsp)
movups %xmm0,0x14(%rsp)
movups %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e7d(%rip),%rbx
cmp    (%rbx),%eax
jne    14d1 <main+0x3a1>
mov    $0x1,%ebx
lea    0xe81(%rip),%r14
lea    0xe80(%rip),%r15
jmp    11a4 <main+0x74>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x18,%rbx
je     11f1 <main+0xc1>
cmp    $0x17,%rbx
jne    11c0 <main+0x90>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11cc <main+0x9c>
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp,%rbx,4),%ebp
test   %ebp,%ebp
jle    1190 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x23,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11e0 <main+0xb0>
jmp    1190 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x1c(%rsp),%r15d
movdqa 0x40(%rsp),%xmm0
movdqa 0x20(%rsp),%xmm1
movdqa 0x50(%rsp),%xmm2
movdqa 0x30(%rsp),%xmm3
movdqa %xmm3,%xmm4
pcmpgtd %xmm2,%xmm4
pand   %xmm4,%xmm3
pandn  %xmm2,%xmm4
por    %xmm3,%xmm4
movdqa %xmm1,%xmm2
pcmpgtd %xmm0,%xmm2
pand   %xmm2,%xmm1
pandn  %xmm0,%xmm2
por    %xmm1,%xmm2
movdqa %xmm2,%xmm0
pcmpgtd %xmm4,%xmm0
pand   %xmm0,%xmm2
pandn  %xmm4,%xmm0
por    %xmm2,%xmm0
pshufd $0xee,%xmm0,%xmm1
movdqa %xmm0,%xmm2
pcmpgtd %xmm1,%xmm2
pand   %xmm2,%xmm0
pandn  %xmm1,%xmm2
por    %xmm0,%xmm2
pshufd $0x55,%xmm2,%xmm0
movdqa %xmm2,%xmm1
pcmpgtd %xmm0,%xmm1
pand   %xmm1,%xmm2
pandn  %xmm0,%xmm1
por    %xmm2,%xmm1
movd   %xmm1,%eax
cmp    %r15d,%eax
cmovg  %eax,%r15d
mov    0x18(%rsp),%eax
cmp    %eax,%r15d
cmovle %eax,%r15d
mov    0x14(%rsp),%eax
cmp    %eax,%r15d
cmovle %eax,%r15d
mov    0x10(%rsp),%eax
cmp    %eax,%r15d
cmovle %eax,%r15d
mov    0xc(%rsp),%eax
cmp    %eax,%r15d
cmovle %eax,%r15d
mov    0x8(%rsp),%eax
cmp    %eax,%r15d
cmovle %eax,%r15d
mov    0x4(%rsp),%eax
cmp    %eax,%r15d
cmovle %eax,%r15d
xor    %eax,%eax
test   %r15d,%r15d
cmovs  %eax,%r15d
jle    1333 <main+0x203>
lea    0xd28(%rip),%r12
lea    0xd25(%rip),%r14
xor    %ebp,%ebp
jmp    1302 <main+0x1d2>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    %r15d,%ebp
je     1333 <main+0x203>
mov    $0x1,%ebx
jmp    1321 <main+0x1f1>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x18,%rbx
je     12f0 <main+0x1c0>
mov    (%rsp,%rbx,4),%eax
add    %ebp,%eax
mov    %r12,%rdi
cmp    %r15d,%eax
jl     1310 <main+0x1e0>
mov    %r14,%rdi
jmp    1310 <main+0x1e0>
mov    $0x45,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1340 <main+0x210>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcb5(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x16,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xb69(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
movabs $0x100000600,%r14
xor    %ecx,%ecx
jmp    14f6 <main+0x3c6>
nop
add    $0x1,%ecx
mov    %ecx,%ebp
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %ebp,%ecx
cmp    (%rbx),%eax
je     1173 <main+0x43>
cmp    $0x20,%eax
ja     14e0 <main+0x3b0>
mov    %eax,%eax
bt     %rax,%r14
jae    14e0 <main+0x3b0>
xor    %ebp,%ebp
test   %ecx,%ecx
je     14e5 <main+0x3b5>
cmp    $0x17,%ecx
jge    1517 <main+0x3e7>
movslq %ecx,%rax
addl   $0x1,(%rsp,%rax,4)
jmp    14e5 <main+0x3b5>
addl   $0x1,0x5c(%rsp)
jmp    14e5 <main+0x3b5>

LLVM IR (-O0):
@EOF = global i32 0
@.str = [6 x i8] c" + | \00"
@.str.1 = [7 x i8] c"%2d | \00"
@.str.2 = [4 x i8] c" \00"
@.str.3 = [4 x i8] c" # \00"
@.str.4 = [5 x i8] c"%2d \00"
@.str.5 = [3 x i8] c" +\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [24 x i32]
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %6
br label %8
8: ; preds = %15, %0
%9 = load i32, i32* %6
%10 = icmp sle i32 %9, 23
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [24 x i32], [24 x i32]* %5, i64 0, i64 %13
store i32 0, i32* %14
br label %15
15: ; preds = %11
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %8
18: ; preds = %8
store i32 0, i32* %3
br label %19
19: ; preds = %53, %18
%20 = call i32 (...) @getchar()
store i32 %20, i32* %2
%21 = load i32, i32* @EOF
%22 = icmp ne i32 %20, %21
br i1 %22, label %23, label %54
23: ; preds = %19
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 32
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 10
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %2
%31 = icmp eq i32 %30, 9
br i1 %31, label %32, label %50
32: ; preds = %29, %26, %23
%33 = load i32, i32* %3
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %49
35: ; preds = %32
%36 = load i32, i32* %3
%37 = icmp sgt i32 %36, 22
br i1 %37, label %38, label %42
38: ; preds = %35
%39 = getelementptr inbounds [24 x i32], [24 x i32]* %5, i64 0, i64 23
%40 = load i32, i32* %39
%41 = add nsw i32 %40, 1
store i32 %41, i32* %39
br label %48
42: ; preds = %35
%43 = load i32, i32* %3
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [24 x i32], [24 x i32]* %5, i64 0, i64 %44
%46 = load i32, i32* %45
%47 = add nsw i32 %46, 1
store i32 %47, i32* %45
br label %48
48: ; preds = %42, %38
store i32 0, i32* %3
br label %49
49: ; preds = %48, %32
br label %53
50: ; preds = %29
%51 = load i32, i32* %3
%52 = add nsw i32 %51, 1
store i32 %52, i32* %3
br label %53
53: ; preds = %50, %49
br label %19
54: ; preds = %19
store i32 1, i32* %6
br label %55
55: ; preds = %81, %54
%56 = load i32, i32* %6
%57 = icmp sle i32 %56, 23
br i1 %57, label %58, label %84
58: ; preds = %55
%59 = load i32, i32* %6
%60 = icmp sgt i32 %59, 22
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %66
63: ; preds = %58
%64 = load i32, i32* %6
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %63, %61
store i32 0, i32* %7
br label %67
67: ; preds = %76, %66
%68 = load i32, i32* %7
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [24 x i32], [24 x i32]* %5, i64 0, i64 %70
%72 = load i32, i32* %71
%73 = icmp slt i32 %68, %72
br i1 %73, label %74, label %79
74: ; preds = %67
%75 = call i32 @putchar(i8 signext 35)
br label %76
76: ; preds = %74
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 1
store i32 %78, i32* %7
br label %67
79: ; preds = %67
%80 = call i32 @putchar(i8 signext 10)
br label %81
81: ; preds = %79
%82 = load i32, i32* %6
%83 = add nsw i32 %82, 1
store i32 %83, i32* %6
br label %55
84: ; preds = %55
%85 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %4
store i32 1, i32* %6
br label %86
86: ; preds = %102, %84
%87 = load i32, i32* %6
%88 = icmp sle i32 %87, 23
br i1 %88, label %89, label %105
89: ; preds = %86
%90 = load i32, i32* %6
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [24 x i32], [24 x i32]* %5, i64 0, i64 %91
%93 = load i32, i32* %92
%94 = load i32, i32* %4
%95 = icmp sgt i32 %93, %94
br i1 %95, label %96, label %101
96: ; preds = %89
%97 = load i32, i32* %6
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [24 x i32], [24 x i32]* %5, i64 0, i64 %98
%100 = load i32, i32* %99
store i32 %100, i32* %4
br label %101
101: ; preds = %96, %89
br label %102
102: ; preds = %101
%103 = load i32, i32* %6
%104 = add nsw i32 %103, 1
store i32 %104, i32* %6
br label %86
105: ; preds = %86
store i32 0, i32* %6
br label %106
106: ; preds = %133, %105
%107 = load i32, i32* %6
%108 = load i32, i32* %4
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %136
110: ; preds = %106
store i32 1, i32* %7
br label %111
111: ; preds = %128, %110
%112 = load i32, i32* %7
%113 = icmp sle i32 %112, 23
br i1 %113, label %114, label %131
114: ; preds = %111
%115 = load i32, i32* %6
%116 = load i32, i32* %7
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [24 x i32], [24 x i32]* %5, i64 0, i64 %117
%119 = load i32, i32* %118
%120 = add nsw i32 %115, %119
%121 = load i32, i32* %4
%122 = icmp slt i32 %120, %121
br i1 %122, label %123, label %125
123: ; preds = %114
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %127
125: ; preds = %114
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %127
127: ; preds = %125, %123
br label %128
128: ; preds = %127
%129 = load i32, i32* %7
%130 = add nsw i32 %129, 1
store i32 %130, i32* %7
br label %111
131: ; preds = %111
%132 = call i32 @putchar(i8 signext 10)
br label %133
133: ; preds = %131
%134 = load i32, i32* %6
%135 = add nsw i32 %134, 1
store i32 %135, i32* %6
br label %106
136: ; preds = %106
store i32 1, i32* %6
br label %137
137: ; preds = %142, %136
%138 = load i32, i32* %6
%139 = icmp sle i32 %138, 69
br i1 %139, label %140, label %145
140: ; preds = %137
%141 = call i32 @putchar(i8 signext 45)
br label %142
142: ; preds = %140
%143 = load i32, i32* %6
%144 = add nsw i32 %143, 1
store i32 %144, i32* %6
br label %137
145: ; preds = %137
%146 = call i32 @putchar(i8 signext 10)
store i32 1, i32* %6
br label %147
147: ; preds = %153, %145
%148 = load i32, i32* %6
%149 = icmp sle i32 %148, 22
br i1 %149, label %150, label %156
150: ; preds = %147
%151 = load i32, i32* %6
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %151)
br label %153
153: ; preds = %150
%154 = load i32, i32* %6
%155 = add nsw i32 %154, 1
store i32 %155, i32* %6
br label %147
156: ; preds = %147
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%158 = call i32 @putchar(i8 signext 10)
%159 = load i32, i32* %1
ret i32 %159
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [6 x i8] c" + | \00"
@.str.1 = [7 x i8] c"%2d | \00"
@.str.2 = [4 x i8] c" \00"
@.str.3 = [4 x i8] c" # \00"
@.str.4 = [5 x i8] c"%2d \00"
@.str.5 = [3 x i8] c" +\00"
define i32 @main() {
%1 = alloca [24 x i32]
%2 = bitcast [24 x i32]* %1 to i8*
%3 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 1
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (...) @getchar()
%6 = load i32, i32* @EOF
%7 = icmp eq i32 %5, %6
br i1 %7, label %32, label %8
8: ; preds = %0
%9 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 23
br label %10
10: ; preds = %8, %27
%11 = phi i32 [ %5, %8 ], [ %29, %27 ]
%12 = phi i32 [ 0, %8 ], [ %28, %27 ]
switch i32 %11, label %25 [
i32 32, label %13
i32 10, label %13
i32 9, label %13
]
13: ; preds = %10, %10, %10
%14 = icmp eq i32 %12, 0
br i1 %14, label %27, label %15
15: ; preds = %13
%16 = icmp sgt i32 %12, 22
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* %9
%19 = add nsw i32 %18, 1
store i32 %19, i32* %9
br label %27
20: ; preds = %15
%21 = sext i32 %12 to i64
%22 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
store i32 %24, i32* %22
br label %27
25: ; preds = %10
%26 = add nsw i32 %12, 1
br label %27
27: ; preds = %17, %20, %13, %25
%28 = phi i32 [ 0, %13 ], [ %26, %25 ], [ 0, %20 ], [ 0, %17 ]
%29 = tail call i32 (...) @getchar()
%30 = load i32, i32* @EOF
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %10
32: ; preds = %27, %0
br label %33
33: ; preds = %32, %50
%34 = phi i64 [ %52, %50 ], [ 1, %32 ]
%35 = icmp eq i64 %34, 23
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %41
38: ; preds = %33
%39 = trunc i64 %34 to i32
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %39)
br label %41
41: ; preds = %38, %36
%42 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 %34
%43 = load i32, i32* %42
%44 = icmp sgt i32 %43, 0
br i1 %44, label %45, label %50
45: ; preds = %41, %45
%46 = phi i32 [ %48, %45 ], [ 0, %41 ]
%47 = tail call i32 @putchar(i8 signext 35)
%48 = add nuw nsw i32 %46, 1
%49 = icmp eq i32 %48, %43
br i1 %49, label %50, label %45
50: ; preds = %45, %41
%51 = tail call i32 @putchar(i8 signext 10)
%52 = add nuw nsw i64 %34, 1
%53 = icmp eq i64 %52, 24
br i1 %53, label %54, label %33
54: ; preds = %50
%55 = tail call i32 @putchar(i8 signext 10)
%56 = load i32, i32* %3
%57 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 2
%58 = load i32, i32* %57
%59 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 3
%60 = load i32, i32* %59
%61 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 4
%62 = load i32, i32* %61
%63 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 5
%64 = load i32, i32* %63
%65 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 6
%66 = load i32, i32* %65
%67 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 7
%68 = load i32, i32* %67
%69 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 8
%70 = bitcast i32* %69 to <16 x i32>*
%71 = load <16 x i32>, <16 x i32>* %70
%72 = call i32 @llvm.vector.reduce.smax.v16i32(<16 x i32> %71)
%73 = icmp sgt i32 %72, %68
%74 = select i1 %73, i32 %72, i32 %68
%75 = icmp sgt i32 %74, %66
%76 = select i1 %75, i32 %74, i32 %66
%77 = icmp sgt i32 %76, %64
%78 = select i1 %77, i32 %76, i32 %64
%79 = icmp sgt i32 %78, %62
%80 = select i1 %79, i32 %78, i32 %62
%81 = icmp sgt i32 %80, %60
%82 = select i1 %81, i32 %80, i32 %60
%83 = icmp sgt i32 %82, %58
%84 = select i1 %83, i32 %82, i32 %58
%85 = icmp sgt i32 %84, %56
%86 = select i1 %85, i32 %84, i32 %56
%87 = icmp sgt i32 %86, 0
%88 = select i1 %87, i32 %86, i32 0
%89 = icmp slt i32 %86, 1
br i1 %89, label %106, label %90
90: ; preds = %54, %102
%91 = phi i32 [ %104, %102 ], [ 0, %54 ]
br label %92
92: ; preds = %90, %92
%93 = phi i64 [ 1, %90 ], [ %100, %92 ]
%94 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 0, i64 %93
%95 = load i32, i32* %94
%96 = add nsw i32 %95, %91
%97 = icmp slt i32 %96, %88
%98 = select i1 %97, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %98)
%100 = add nuw nsw i64 %93, 1
%101 = icmp eq i64 %100, 24
br i1 %101, label %102, label %92
102: ; preds = %92
%103 = tail call i32 @putchar(i8 signext 10)
%104 = add nuw nsw i32 %91, 1
%105 = icmp eq i32 %104, %88
br i1 %105, label %106, label %90
106: ; preds = %102, %54
br label %107
107: ; preds = %106, %107
%108 = phi i32 [ %110, %107 ], [ 1, %106 ]
%109 = tail call i32 @putchar(i8 signext 45)
%110 = add nuw nsw i32 %108, 1
%111 = icmp eq i32 %110, 70
br i1 %111, label %112, label %107
112: ; preds = %107
%113 = tail call i32 @putchar(i8 signext 10)
%114 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 1)
%115 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 2)
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 3)
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%118 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 5)
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 6)
%120 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 7)
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 8)
%122 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 9)
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 10)
%124 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 11)
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 12)
%126 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 13)
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 14)
%128 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 15)
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 16)
%130 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 17)
%131 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 18)
%132 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 19)
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 20)
%134 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 21)
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 22)
%136 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%137 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}