#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, i, j, k;
  int length = 0;
  int ndigit[20];
  for (i = 0; i < 20; ++i) {
    ndigit[i] = 0;
  }
  while ((c = getchar()) != EOF) {
    if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
      ++length;
    } else {
      if (length > 0) {
        ++ndigit[length];
      }
      length = 0;
    }
  }
  if (c == EOF) {
    if (length > 0) {
      ++ndigit[length];
    }
  }
  printf("ndigit: ");
  for (i = 0; i < 20; ++i) {
    printf("%d ", ndigit[i]);
  }
  putchar('\n');
  for (i = 0; i < 20; ++i) {
    printf("%2d %2d: |", i, ndigit[i]);
    for (j = 0; j < ndigit[i]; ++j) {
      printf("▇");
    }
    putchar('\n');
  }
  for (i = 20; i > -1; --i) {
    for (j = 0; j < 20; ++j) {
      if (i == (ndigit[j] + 1)) {
        printf("%2d", ndigit[j]);
      } else if (ndigit[j] >= i) {
        printf("██");
      } else {
        printf("  ");
      }
    }
    putchar('\n');
  }
  for (j = 0; j < 20; ++j) {
    printf("%2d", j);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    1171 <main+0x41>
movslq -0xc(%rbp),%rax
movl   $0x0,-0x70(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114d <main+0x1d>
jmp    1176 <main+0x46>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e61(%rip),%rcx
cmp    (%rcx),%eax
je     11ea <main+0xba>
cmpl   $0x41,-0x8(%rbp)
jl     11a3 <main+0x73>
cmpl   $0x5a,-0x8(%rbp)
jle    11b7 <main+0x87>
cmpl   $0x61,-0x8(%rbp)
jl     11c5 <main+0x95>
cmpl   $0x7a,-0x8(%rbp)
jg     11c5 <main+0x95>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11e5 <main+0xb5>
cmpl   $0x0,-0x18(%rbp)
jle    11de <main+0xae>
movslq -0x18(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x70(%rbp,%rax,4)
movl   $0x0,-0x18(%rbp)
jmp    1176 <main+0x46>
mov    -0x8(%rbp),%eax
mov    0x2df4(%rip),%rcx
cmp    (%rcx),%eax
jne    121a <main+0xea>
cmpl   $0x0,-0x18(%rbp)
jle    1215 <main+0xe5>
movslq -0x18(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x70(%rbp,%rax,4)
jmp    121a <main+0xea>
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    125d <main+0x12d>
movslq -0xc(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    122f <main+0xff>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    12dd <main+0x1ad>
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%edx
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x70(%rbp,%rcx,4),%eax
jge    12c5 <main+0x195>
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1298 <main+0x168>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    126e <main+0x13e>
movl   $0x14,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jle    1392 <main+0x262>
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    137a <main+0x24a>
mov    -0xc(%rbp),%eax
movslq -0x10(%rbp),%rcx
mov    -0x70(%rbp,%rcx,4),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1330 <main+0x200>
movslq -0x10(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1367 <main+0x237>
movslq -0x10(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
cmp    -0xc(%rbp),%eax
jl     1354 <main+0x224>
lea    0xcd8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1362 <main+0x232>
lea    0xccc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1367 <main+0x237>
jmp    136c <main+0x23c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12f5 <main+0x1c5>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    12e4 <main+0x1b4>
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    13c2 <main+0x292>
mov    -0x10(%rbp),%esi
lea    0xc6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1399 <main+0x269>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e83(%rip),%rbx
cmp    (%rbx),%eax
je     11a1 <main+0x71>
xor    %ebp,%ebp
jmp    117e <main+0x4e>
nopl   (%rax)
add    $0x1,%ebp
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%rbx),%eax
je     1197 <main+0x67>
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x19,%eax
jbe    1170 <main+0x40>
test   %ebp,%ebp
jle    1193 <main+0x63>
mov    %ebp,%eax
addl   $0x1,(%rsp,%rax,4)
xor    %ebp,%ebp
jmp    1173 <main+0x43>
test   %ebp,%ebp
jle    11a1 <main+0x71>
mov    %ebp,%eax
addl   $0x1,(%rsp,%rax,4)
lea    0xe58(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe53(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x3c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd30(%rip),%r14
lea    0xd34(%rip),%rbx
xor    %ebp,%ebp
xor    %r15d,%r15d
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
jle    131f <main+0x1ef>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1310 <main+0x1e0>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
cmp    $0x14,%r15
je     1339 <main+0x209>
mov    (%rsp,%r15,4),%ebp
jmp    12f0 <main+0x1c0>
mov    $0x14,%ebp
lea    0xcd7(%rip),%r12
lea    0xcdb(%rip),%r14
lea    0xccd(%rip),%r15
jmp    136f <main+0x23f>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
sub    $0x1,%ebp
jb     13bc <main+0x28c>
xor    %ebx,%ebx
jmp    1394 <main+0x264>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x14,%rbx
je     1360 <main+0x230>
mov    (%rsp,%rbx,4),%esi
lea    0x1(%rsi),%eax
cmp    %eax,%ebp
je     1380 <main+0x250>
cmp    %ebp,%esi
jge    13b0 <main+0x280>
mov    %r14,%rdi
jmp    13b3 <main+0x283>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    138a <main+0x25a>
lea    0xc59(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
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    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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