#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 */
typedef int uint32_t;
typedef scalar_t__ uint16_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ EOF;
int EXIT_SUCCESS;
scalar_t__ getchar();
scalar_t__ ispunct(scalar_t__);
scalar_t__ isspace(scalar_t__);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int main(void) {
  uint32_t word_length_frequencies[10 + 1] = {0};
  uint32_t largest_frequency = 0;
  uint32_t largest_frequency_length = 1;
  uint32_t current_word_length = 0;
  int32_t character = 0;
  bool finished_counting = false;
  while (finished_counting == false) {
    character = getchar();
    if (isspace(character) || ispunct(character) || character == EOF) {
      if (current_word_length > 0) {
        if (current_word_length > 10) {
          current_word_length = 10 + 1;
        }
        word_length_frequencies[current_word_length - 1]++;
        if (word_length_frequencies[current_word_length - 1] >
            largest_frequency) {
          largest_frequency = word_length_frequencies[current_word_length - 1];
          largest_frequency_length = 0;
          for (uint32_t i = largest_frequency; i > 0; i /= 10) {
            largest_frequency_length++;
          }
        }
      }
      current_word_length = 0;
      finished_counting = (character == EOF);
    } else {
      current_word_length++;
    }
  }
  for (uint16_t i = largest_frequency; i > 0; i--) {
    printf("%*d | ", largest_frequency_length, i);
    for (uint16_t j = 0; j < (10 + 1); j++) {
      printf("%c  ", (word_length_frequencies[j] >= i) ? '#' : ' ');
    }
    printf("\n");
  }
  printf("%*c", largest_frequency_length + 2, '+');
  for (uint16_t i = 0; i < (10 * 3) + 4; i++) {
    putchar('-');
  }
  printf("\n%*c", largest_frequency_length + 2, ' ');
  for (uint16_t i = 0; i < 10; i++) {
    printf(" %-2d", i + 1);
  }
  printf(" >%d\n", 10);
  printf("\nX-axis: Word length\nY-axis: Frequency\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x2c,%edx
call   1050 <memset@plt>
movl   $0x0,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    12b4 <main+0x154>
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   1070 <isspace@plt>
cmp    $0x0,%rax
jne    11f2 <main+0x92>
mov    -0x48(%rbp),%rdi
call   1060 <ispunct@plt>
cmp    $0x0,%rax
jne    11f2 <main+0x92>
mov    -0x48(%rbp),%rax
mov    0x2dff(%rip),%rcx
cmp    (%rcx),%rax
jne    12a6 <main+0x146>
cmpl   $0x0,-0x3c(%rbp)
jle    1281 <main+0x121>
cmpl   $0xa,-0x3c(%rbp)
jle    120d <main+0xad>
movl   $0xb,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%eax
cmp    -0x34(%rbp),%eax
jle    127c <main+0x11c>
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x50(%rbp)
jle    1277 <main+0x117>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x50(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x50(%rbp)
jmp    1251 <main+0xf1>
jmp    127c <main+0x11c>
jmp    1281 <main+0x121>
movl   $0x0,-0x3c(%rbp)
mov    -0x48(%rbp),%rax
mov    0x2d55(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4c(%rbp)
jmp    12af <main+0x14f>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11a3 <main+0x43>
movslq -0x34(%rbp),%rax
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jle    134a <main+0x1ea>
mov    -0x38(%rbp),%esi
mov    -0x58(%rbp),%rdx
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x60(%rbp)
cmpq   $0xb,-0x60(%rbp)
jge    132b <main+0x1cb>
mov    -0x60(%rbp),%rax
movslq -0x30(%rbp,%rax,4),%rcx
mov    -0x58(%rbp),%rdx
mov    $0x20,%esi
mov    $0x23,%eax
cmp    %rdx,%rcx
cmovge %eax,%esi
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    12e4 <main+0x184>
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x58(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x58(%rbp)
jmp    12bc <main+0x15c>
mov    -0x38(%rbp),%esi
add    $0x2,%esi
lea    0xcb6(%rip),%rdi
mov    $0x2b,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x68(%rbp)
cmpq   $0x22,-0x68(%rbp)
jge    1391 <main+0x231>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    136b <main+0x20b>
mov    -0x38(%rbp),%esi
add    $0x2,%esi
lea    0xc6e(%rip),%rdi
mov    $0x20,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x70(%rbp)
cmpq   $0xa,-0x70(%rbp)
jge    13e4 <main+0x284>
mov    -0x70(%rbp),%rsi
add    $0x1,%rsi
lea    0xc45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    13b2 <main+0x252>
lea    0xc2c(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2bcc(%rip),%rax
mov    (%rax),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x1c(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    $0x1,%ebx
mov    0x2e5d(%rip),%r12
mov    $0xcccccccd,%ebp
xor    %r15d,%r15d
xor    %r13d,%r13d
jmp    11b7 <main+0x57>
nopl   0x0(%rax,%rax,1)
mov    %eax,%r13d
xor    %eax,%eax
cmp    (%r12),%r14
sete   %al
xor    %r15d,%r15d
test   %eax,%eax
jne    1241 <main+0xe1>
xor    %eax,%eax
call   1080 <getchar@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1070 <isspace@plt>
test   %rax,%rax
je     1220 <main+0xc0>
test   %r15d,%r15d
jle    11a3 <main+0x43>
cmp    $0xb,%r15d
mov    $0xb,%eax
cmovae %eax,%r15d
add    $0xffffffff,%r15d
mov    (%rsp,%r15,4),%ecx
lea    0x1(%rcx),%eax
mov    %eax,(%rsp,%r15,4)
cmp    %r13d,%ecx
jl     11a3 <main+0x43>
xor    %ebx,%ebx
test   %ecx,%ecx
js     11a0 <main+0x40>
mov    %eax,%ecx
nopl   0x0(%rax)
add    $0x1,%ebx
mov    %ecx,%edx
imul   %rbp,%rdx
shr    $0x23,%rdx
cmp    $0x9,%ecx
mov    %edx,%ecx
ja     1200 <main+0xa0>
jmp    11a0 <main+0x40>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1060 <ispunct@plt>
test   %rax,%rax
jne    11ce <main+0x6e>
cmp    (%r12),%r14
je     11ce <main+0x6e>
add    $0x1,%r15d
xor    %eax,%eax
test   %eax,%eax
je     11b7 <main+0x57>
test   %r13d,%r13d
jle    1406 <main+0x2a6>
mov    %r13d,%r14d
movslq (%rsp),%rax
mov    %rax,0x70(%rsp)
movslq 0x4(%rsp),%rax
mov    %rax,0x68(%rsp)
movslq 0x8(%rsp),%rax
mov    %rax,0x60(%rsp)
movslq 0xc(%rsp),%rax
mov    %rax,0x58(%rsp)
movslq 0x10(%rsp),%rax
mov    %rax,0x50(%rsp)
movslq 0x14(%rsp),%rax
mov    %rax,0x48(%rsp)
movslq 0x18(%rsp),%rax
mov    %rax,0x40(%rsp)
movslq 0x1c(%rsp),%rax
mov    %rax,0x38(%rsp)
movslq 0x20(%rsp),%r15
movslq 0x24(%rsp),%r13
movslq 0x28(%rsp),%rbp
lea    0xd55(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xd39(%rip),%rdi
mov    %ebx,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x70(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x68(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x60(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x58(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x50(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x48(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x40(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    0x38(%rsp),%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    %r15,%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    %r13,%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
cmp    %rbp,%r14
setle  %al
lea    (%rax,%rax,2),%esi
or     $0x20,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x1(%r14),%rax
cmp    $0x1,%r14
mov    %rax,%r14
ja     12c0 <main+0x160>
add    $0x2,%ebx
lea    0xbfd(%rip),%rdi
mov    %ebx,%esi
mov    $0x2b,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
lea    0xa93(%rip),%rdi
mov    %ebx,%esi
mov    $0x20,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa83(%rip),%rbx
mov    $0x1,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x2,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x4,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x6,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x9,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x9ec(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x9df(%rip),%rdi
call   1040 <puts@plt>
mov    0x298e(%rip),%rax
mov    (%rax),%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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