#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 *, ...);
main() {
  int c, ccount, i, j, greatest;
  int lengths[10];
  ccount = 0;
  for (i = 0; i < 10; ++i)
    lengths[i] = 0;
  while ((c = getchar()) != EOF) {
    if (c == ' ' || c == '\n' || c == '\t') {
      if (ccount >= 10)
        ++lengths[0];
      else if (ccount > 0)
        ++lengths[ccount];
      ccount = 0;
    } else {
      ++ccount;
    }
  }
  for (i = 1; i < 10; ++i) {
    printf("%d   | ", i);
    for (j = 0; j < lengths[i]; ++j)
      printf("-");
    printf("\n");
  }
  printf("10+ | ");
  for (j = 0; j < lengths[0]; ++j)
    printf("-");
  printf(
      "\n\n------------------------------------------------------------\n\n");
  greatest = 0;
  for (i = 0; i < 10; ++i)
    if (lengths[i] > greatest)
      greatest = lengths[i];
  for (i = greatest; i > 0; --i) {
    for (j = 1; j < 10; ++j) {
      if (lengths[j] >= i)
        printf("| ");
      else
        printf("  ");
    }
    if (lengths[0] >= i)
      printf(" | ");
    else
      printf("   ");
    printf("\n");
  }
  printf("---------------------\n");
  for (i = 1; i < 10; ++i)
    printf("%d ", i);
  printf("10+\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1161 <main+0x41>
movslq -0x10(%rbp),%rax
movl   $0x0,-0x40(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x1d>
jmp    1166 <main+0x46>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e71(%rip),%rcx
cmp    (%rcx),%eax
je     11ed <main+0xcd>
cmpl   $0x20,-0x8(%rbp)
je     119d <main+0x7d>
cmpl   $0xa,-0x8(%rbp)
je     119d <main+0x7d>
cmpl   $0x9,-0x8(%rbp)
jne    11df <main+0xbf>
cmpl   $0xa,-0xc(%rbp)
jl     11b5 <main+0x95>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11d3 <main+0xb3>
cmpl   $0x0,-0xc(%rbp)
jle    11ce <main+0xae>
movslq -0xc(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
jmp    11d3 <main+0xb3>
movl   $0x0,-0xc(%rbp)
jmp    11e8 <main+0xc8>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1166 <main+0x46>
movl   $0x1,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    125f <main+0x13f>
mov    -0x10(%rbp),%esi
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movslq -0x10(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jge    1243 <main+0x123>
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1216 <main+0xf6>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11f4 <main+0xd4>
lea    0xda4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    129c <main+0x17c>
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1274 <main+0x154>
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    12f1 <main+0x1d1>
movslq -0x10(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
cmp    -0x18(%rbp),%eax
jle    12de <main+0x1be>
movslq -0x10(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
mov    %eax,-0x18(%rbp)
jmp    12e3 <main+0x1c3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12b8 <main+0x198>
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    13a0 <main+0x280>
movl   $0x1,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1357 <main+0x237>
movslq -0x14(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
cmp    -0x10(%rbp),%eax
jl     1336 <main+0x216>
lea    0xcdb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1344 <main+0x224>
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1349 <main+0x229>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1308 <main+0x1e8>
mov    -0x40(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1376 <main+0x256>
lea    0xc9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1384 <main+0x264>
lea    0xcd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    12f7 <main+0x1d7>
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    13de <main+0x2be>
mov    -0x10(%rbp),%esi
lea    0xca4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13b5 <main+0x295>
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movq   $0x0,0x40(%rsp)
xor    %eax,%eax
call   1060 <getchar@plt>
mov    0x2e76(%rip),%rbx
cmp    (%rbx),%eax
jne    1199 <main+0x59>
lea    0xe83(%rip),%rdi
movl   $0x0,0x4(%rsp)
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %r15d,%r15d
jmp    122f <main+0xef>
movabs $0x100000600,%r14
xor    %r15d,%r15d
xor    %ecx,%ecx
jmp    11c2 <main+0x82>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ecx
mov    %ecx,%ebp
xor    %eax,%eax
call   1060 <getchar@plt>
mov    %ebp,%ecx
cmp    (%rbx),%eax
je     11f8 <main+0xb8>
cmp    $0x20,%eax
ja     11b0 <main+0x70>
mov    %eax,%eax
bt     %rax,%r14
jae    11b0 <main+0x70>
cmp    $0xa,%ecx
jge    11f0 <main+0xb0>
xor    %ebp,%ebp
test   %ecx,%ecx
jle    11b5 <main+0x75>
mov    %ecx,%eax
addl   $0x1,0x20(%rsp,%rax,4)
jmp    11b5 <main+0x75>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r15d
xor    %ebp,%ebp
jmp    11b5 <main+0x75>
mov    %r15d,0x20(%rsp)
mov    0x24(%rsp),%ebx
lea    0xdf8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebx,%ebx
mov    %ebx,0x4(%rsp)
jle    122f <main+0xef>
nopl   0x0(%rax)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1220 <main+0xe0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdc0(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%rsp),%r14d
test   %r14d,%r14d
jle    126f <main+0x12f>
mov    %r14d,%ebx
nopl   0x0(%rax)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1260 <main+0x120>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd80(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c(%rsp),%ebp
test   %ebp,%ebp
jle    12af <main+0x16f>
mov    %ebp,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    12a0 <main+0x160>
mov    %ebp,0x14(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd3c(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%rsp),%ebp
test   %ebp,%ebp
jle    12ef <main+0x1af>
mov    %ebp,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    12e0 <main+0x1a0>
mov    %ebp,0x10(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcfc(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x34(%rsp),%ebp
test   %ebp,%ebp
jle    132f <main+0x1ef>
mov    %ebp,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1320 <main+0x1e0>
mov    %ebp,0x18(%rsp)
mov    %r15d,0x8(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcb7(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%rsp),%ebp
test   %ebp,%ebp
jle    136f <main+0x22f>
mov    %ebp,%ebx
nop
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1360 <main+0x220>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc80(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x3c(%rsp),%r12d
test   %r12d,%r12d
jle    13af <main+0x26f>
mov    %r12d,%ebx
nopl   0x0(%rax)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    13a0 <main+0x260>
mov    %ebp,0xc(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc3c(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%rsp),%r15d
test   %r15d,%r15d
jle    13ef <main+0x2af>
mov    %r15d,%ebx
nopl   (%rax)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    13e0 <main+0x2a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc00(%rip),%rdi
xor    %ebx,%ebx
mov    $0x9,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x44(%rsp),%eax
mov    %eax,%r13d
test   %eax,%eax
jle    142f <main+0x2ef>
mov    %r13d,%ebp
nopl   0x0(%rax)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1420 <main+0x2e0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xbc8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%eax
test   %eax,%eax
mov    0x14(%rsp),%ebp
jle    1475 <main+0x335>
mov    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1460 <main+0x320>
mov    0x8(%rsp),%eax
mov    %eax,%ebx
lea    0xb9b(%rip),%rdi
call   1040 <puts@plt>
mov    0x4(%rsp),%eax
cmp    %ebx,%eax
cmovg  %eax,%ebx
cmp    %ebx,%r14d
cmovg  %r14d,%ebx
cmp    %ebx,%ebp
cmovg  %ebp,%ebx
mov    0x10(%rsp),%ecx
cmp    %ebx,%ecx
cmovg  %ecx,%ebx
mov    0x18(%rsp),%edx
cmp    %ebx,%edx
cmovg  %edx,%ebx
mov    0xc(%rsp),%ecx
cmp    %ebx,%ecx
cmovg  %ecx,%ebx
cmp    %ebx,%r12d
cmovg  %r12d,%ebx
cmp    %ebx,%r15d
cmovg  %r15d,%ebx
cmp    %ebx,%r13d
cmovg  %r13d,%ebx
test   %ebx,%ebx
mov    %r14d,0x1c(%rsp)
jle    15c6 <main+0x486>
lea    0xb36(%rip),%rbp
lea    0xb24(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    %ebx,%eax
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,0x1c(%rsp)
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,0x14(%rsp)
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,0x10(%rsp)
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,0x18(%rsp)
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,0xc(%rsp)
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,%r12d
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,%r15d
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,%r13d
mov    %r14,%rdi
cmovl  %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %ebx,0x8(%rsp)
lea    0xa6c(%rip),%rdi
lea    0xa70(%rip),%rax
cmovl  %rax,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
mov    0x4(%rsp),%eax
jg     14f0 <main+0x3b0>
lea    0xa8a(%rip),%rdi
call   1040 <puts@plt>
lea    0xa3a(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa06(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [8 x i8] c"%d | \00"
@.str.3 = [7 x i8] c"10+ | \00"
@.str.5 = [3 x i8] c"| \00"
@.str.6 = [3 x i8] c" \00"
@.str.7 = [4 x i8] c" | \00"
@.str.8 = [4 x i8] c" \00"
@.str.10 = [4 x i8] c"%d \00"
@str = [64 x i8] c"\0A\0A------------------------------------------------------------\0A\00"
@str.12 = [22 x i8] c"---------------------\00"
@str.13 = [4 x i8] c"10+\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1)
br label %43
8: ; preds = %0
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
br label %15
10: ; preds = %32
store i32 %33, i32* %9
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%12 = load i32, i32* %11
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1)
%14 = icmp sgt i32 %12, 0
br i1 %14, label %38, label %43
15: ; preds = %8, %32
%16 = phi i32 [ 0, %8 ], [ %33, %32 ]
%17 = phi i32 [ %3, %8 ], [ %35, %32 ]
%18 = phi i32 [ 0, %8 ], [ %34, %32 ]
switch i32 %17, label %30 [
i32 32, label %19
i32 10, label %19
i32 9, label %19
]
19: ; preds = %15, %15, %15
%20 = icmp sgt i32 %18, 9
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = add nsw i32 %16, 1
br label %32
23: ; preds = %19
%24 = icmp sgt i32 %18, 0
br i1 %24, label %25, label %32
25: ; preds = %23
%26 = zext i32 %18 to i64
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = add nsw i32 %28, 1
store i32 %29, i32* %27
br label %32
30: ; preds = %15
%31 = add nsw i32 %18, 1
br label %32
32: ; preds = %21, %25, %23, %30
%33 = phi i32 [ %16, %30 ], [ %16, %23 ], [ %16, %25 ], [ %22, %21 ]
%34 = phi i32 [ %31, %30 ], [ 0, %23 ], [ 0, %25 ], [ 0, %21 ]
%35 = tail call i32 (...) @getchar()
%36 = load i32, i32* @EOF
%37 = icmp eq i32 %35, %36
br i1 %37, label %10, label %15
38: ; preds = %10, %38
%39 = phi i32 [ %41, %38 ], [ 0, %10 ]
%40 = tail call i32 @putchar(i32 45)
%41 = add nuw nsw i32 %39, 1
%42 = icmp eq i32 %41, %12
br i1 %42, label %43, label %38
43: ; preds = %38, %6, %10
%44 = phi i32 [ 0, %6 ], [ %12, %10 ], [ %12, %38 ]
%45 = phi i32 [ 0, %6 ], [ %33, %10 ], [ %33, %38 ]
%46 = tail call i32 @putchar(i32 10)
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2)
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%49 = load i32, i32* %48
%50 = icmp sgt i32 %49, 0
br i1 %50, label %51, label %56
51: ; preds = %43, %51
%52 = phi i32 [ %54, %51 ], [ 0, %43 ]
%53 = tail call i32 @putchar(i32 45)
%54 = add nuw nsw i32 %52, 1
%55 = icmp eq i32 %54, %49
br i1 %55, label %56, label %51
56: ; preds = %51, %43
%57 = tail call i32 @putchar(i32 10)
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3)
%59 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%60 = load i32, i32* %59
%61 = icmp sgt i32 %60, 0
br i1 %61, label %62, label %67
62: ; preds = %56, %62
%63 = phi i32 [ %65, %62 ], [ 0, %56 ]
%64 = tail call i32 @putchar(i32 45)
%65 = add nuw nsw i32 %63, 1
%66 = icmp eq i32 %65, %60
br i1 %66, label %67, label %62
67: ; preds = %62, %56
%68 = tail call i32 @putchar(i32 10)
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4)
%70 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%71 = load i32, i32* %70
%72 = icmp sgt i32 %71, 0
br i1 %72, label %73, label %78
73: ; preds = %67, %73
%74 = phi i32 [ %76, %73 ], [ 0, %67 ]
%75 = tail call i32 @putchar(i32 45)
%76 = add nuw nsw i32 %74, 1
%77 = icmp eq i32 %76, %71
br i1 %77, label %78, label %73
78: ; preds = %73, %67
%79 = tail call i32 @putchar(i32 10)
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5)
%81 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%82 = load i32, i32* %81
%83 = icmp sgt i32 %82, 0
br i1 %83, label %84, label %89
84: ; preds = %78, %84
%85 = phi i32 [ %87, %84 ], [ 0, %78 ]
%86 = tail call i32 @putchar(i32 45)
%87 = add nuw nsw i32 %85, 1
%88 = icmp eq i32 %87, %82
br i1 %88, label %89, label %84
89: ; preds = %84, %78
%90 = tail call i32 @putchar(i32 10)
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 6)
%92 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
%93 = load i32, i32* %92
%94 = icmp sgt i32 %93, 0
br i1 %94, label %95, label %100
95: ; preds = %89, %95
%96 = phi i32 [ %98, %95 ], [ 0, %89 ]
%97 = tail call i32 @putchar(i32 45)
%98 = add nuw nsw i32 %96, 1
%99 = icmp eq i32 %98, %93
br i1 %99, label %100, label %95
100: ; preds = %95, %89
%101 = tail call i32 @putchar(i32 10)
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%103 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%104 = load i32, i32* %103
%105 = icmp sgt i32 %104, 0
br i1 %105, label %106, label %111
106: ; preds = %100, %106
%107 = phi i32 [ %109, %106 ], [ 0, %100 ]
%108 = tail call i32 @putchar(i32 45)
%109 = add nuw nsw i32 %107, 1
%110 = icmp eq i32 %109, %104
br i1 %110, label %111, label %106
111: ; preds = %106, %100
%112 = tail call i32 @putchar(i32 10)
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 8)
%114 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%115 = load i32, i32* %114
%116 = icmp sgt i32 %115, 0
br i1 %116, label %117, label %122
117: ; preds = %111, %117
%118 = phi i32 [ %120, %117 ], [ 0, %111 ]
%119 = tail call i32 @putchar(i32 45)
%120 = add nuw nsw i32 %118, 1
%121 = icmp eq i32 %120, %115
br i1 %121, label %122, label %117
122: ; preds = %117, %111
%123 = tail call i32 @putchar(i32 10)
%124 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 9)
%125 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
%126 = load i32, i32* %125
%127 = icmp sgt i32 %126, 0
br i1 %127, label %128, label %133
128: ; preds = %122, %128
%129 = phi i32 [ %131, %128 ], [ 0, %122 ]
%130 = tail call i32 @putchar(i32 45)
%131 = add nuw nsw i32 %129, 1
%132 = icmp eq i32 %131, %126
br i1 %132, label %133, label %128
133: ; preds = %128, %122
%134 = tail call i32 @putchar(i32 10)
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%136 = icmp sgt i32 %45, 0
br i1 %136, label %137, label %142
137: ; preds = %133, %137
%138 = phi i32 [ %140, %137 ], [ 0, %133 ]
%139 = tail call i32 @putchar(i32 45)
%140 = add nuw nsw i32 %138, 1
%141 = icmp eq i32 %140, %45
br i1 %141, label %142, label %137
142: ; preds = %137, %133
%143 = phi i32 [ 0, %133 ], [ %45, %137 ]
%144 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%145 = icmp sgt i32 %44, %143
%146 = select i1 %145, i32 %44, i32 %143
%147 = icmp sgt i32 %49, %146
%148 = select i1 %147, i32 %49, i32 %146
%149 = icmp sgt i32 %60, %148
%150 = select i1 %149, i32 %60, i32 %148
%151 = icmp sgt i32 %71, %150
%152 = select i1 %151, i32 %71, i32 %150
%153 = icmp sgt i32 %82, %152
%154 = select i1 %153, i32 %82, i32 %152
%155 = icmp sgt i32 %93, %154
%156 = select i1 %155, i32 %93, i32 %154
%157 = icmp sgt i32 %104, %156
%158 = select i1 %157, i32 %104, i32 %156
%159 = icmp sgt i32 %115, %158
%160 = select i1 %159, i32 %115, i32 %158
%161 = icmp sgt i32 %126, %160
%162 = select i1 %161, i32 %126, i32 %160
%163 = icmp sgt i32 %162, 0
br i1 %163, label %164, label %199
164: ; preds = %142, %164
%165 = phi i32 [ %197, %164 ], [ %162, %142 ]
%166 = icmp slt i32 %44, %165
%167 = select i1 %166, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%168 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %167)
%169 = icmp slt i32 %49, %165
%170 = select i1 %169, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%171 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %170)
%172 = icmp slt i32 %60, %165
%173 = select i1 %172, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%174 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %173)
%175 = icmp slt i32 %71, %165
%176 = select i1 %175, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%177 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %176)
%178 = icmp slt i32 %82, %165
%179 = select i1 %178, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%180 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %179)
%181 = icmp slt i32 %93, %165
%182 = select i1 %181, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%183 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %182)
%184 = icmp slt i32 %104, %165
%185 = select i1 %184, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%186 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %185)
%187 = icmp slt i32 %115, %165
%188 = select i1 %187, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%189 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %188)
%190 = icmp slt i32 %126, %165
%191 = select i1 %190, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%192 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %191)
%193 = icmp slt i32 %45, %165
%194 = select i1 %193, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0)
%195 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %194)
%196 = tail call i32 @putchar(i32 10)
%197 = add nsw i32 %165, -1
%198 = icmp sgt i32 %165, 1
br i1 %198, label %164, label %199
199: ; preds = %164, %142
%200 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.12, i64 0, i64 0))
%201 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 1)
%202 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 2)
%203 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%204 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 4)
%205 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 5)
%206 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 6)
%207 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 7)
%208 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 8)
%209 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 9)
%210 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.13, i64 0, i64 0))
ret i32 0
}