#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 main() {
  int inputChar, lengthCount, arrayLength, maxFrequency;
  arrayLength = 45;
  int wordLengths[arrayLength];
  inputChar = lengthCount = maxFrequency = 0;
  for (int i = 0; i < arrayLength; ++i) {
    wordLengths[i] = 0;
  }
  while ((inputChar = getchar()) != EOF) {
    if (inputChar == ' ' || inputChar == '\n' || inputChar == '\t') {
      printf("New word. Length was: %d. Word lengths before: %d\n", lengthCount,
             wordLengths[lengthCount]);
      ++wordLengths[lengthCount];
      lengthCount = 0;
      printf("Length is now: %d.\n", lengthCount);
    } else {
      ++lengthCount;
    }
  }
  for (int i = 0; i < arrayLength; ++i) {
    if (wordLengths[i] > 0) {
      printf("%d words with %d length\n", wordLengths[i], i);
    }
    if (wordLengths[i] > maxFrequency) {
      maxFrequency++;
    }
  }
  for (int f = 0; f < maxFrequency; f++) {
    for (int l = 0; l < arrayLength; ++l) {
      if (wordLengths[l] > 0 && wordLengths[l] >= (maxFrequency - f)) {
        if ((l / 10) > 0) {
          printf(" _  ");
        } else {
          printf(" _ ");
        }
      } else if (wordLengths[l] > 0) {
        if ((l / 10) > 0) {
          printf("    ");
        } else {
          printf("   ");
        }
      }
    }
    printf("\n");
  }
  printf("\n");
  for (int i = 0; i < arrayLength; ++i) {
    if (wordLengths[i] > 0) {
      printf(" %d ", i);
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2d,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11a2 <main+0x82>
mov    -0x48(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1179 <main+0x59>
jmp    11a7 <main+0x87>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e30(%rip),%rcx
cmp    (%rcx),%eax
je     1236 <main+0x116>
cmpl   $0x20,-0x8(%rbp)
je     11de <main+0xbe>
cmpl   $0xa,-0x8(%rbp)
je     11de <main+0xbe>
cmpl   $0x9,-0x8(%rbp)
jne    1228 <main+0x108>
mov    -0x48(%rbp),%rax
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1231 <main+0x111>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a7 <main+0x87>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12a7 <main+0x187>
mov    -0x48(%rbp),%rax
movslq -0x30(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1277 <main+0x157>
mov    -0x48(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x30(%rbp),%edx
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jle    1294 <main+0x174>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1299 <main+0x179>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    123d <main+0x11d>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13b2 <main+0x292>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1396 <main+0x276>
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1332 <main+0x212>
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x14(%rbp),%ecx
sub    -0x34(%rbp),%ecx
cmp    %ecx,%eax
jl     1332 <main+0x212>
mov    -0x38(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jle    131f <main+0x1ff>
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    132d <main+0x20d>
lea    0xd3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1383 <main+0x263>
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    137e <main+0x25e>
mov    -0x38(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jle    136b <main+0x24b>
lea    0xd0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1379 <main+0x259>
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    137e <main+0x25e>
jmp    1383 <main+0x263>
jmp    1388 <main+0x268>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12c1 <main+0x1a1>
lea    0xca8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12ae <main+0x18e>
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1409 <main+0x2e9>
mov    -0x48(%rbp),%rax
movslq -0x3c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    13f6 <main+0x2d6>
mov    -0x3c(%rbp),%esi
lea    0xc7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13fb <main+0x2db>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13c7 <main+0x2a7>
lea    0xc35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0xb0(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e4c(%rip),%r12
cmp    (%r12),%eax
jne    12cc <main+0x19c>
lea    0xe9a(%rip),%r15
xor    %ebx,%ebx
xor    %r14d,%r14d
jmp    11d5 <main+0xa5>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
cmp    %r14d,%ebp
setg   %al
add    %eax,%r14d
add    $0x1,%rbx
cmp    $0x2d,%rbx
je     11ec <main+0xbc>
mov    (%rsp,%rbx,4),%ebp
test   %ebp,%ebp
jle    11c0 <main+0x90>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11c0 <main+0x90>
test   %r14d,%r14d
je     1275 <main+0x145>
lea    0xe69(%rip),%r13
lea    0xe5d(%rip),%rbp
xor    %ebx,%ebx
jmp    1222 <main+0xf2>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %r14d,%ebx
je     1275 <main+0x145>
mov    %r14d,%r15d
sub    %ebx,%r15d
xor    %r12d,%r12d
jmp    124c <main+0x11c>
nopl   (%rax)
cmp    $0xa,%r12
mov    %rbp,%rdi
cmovb  %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r12
cmp    $0x2d,%r12
je     1210 <main+0xe0>
mov    (%rsp,%r12,4),%eax
test   %eax,%eax
jle    1259 <main+0x129>
cmp    %r15d,%eax
jge    1230 <main+0x100>
test   %eax,%eax
jle    1242 <main+0x112>
cmp    $0xa,%r12
lea    0xe01(%rip),%rdi
lea    0xdfb(%rip),%rax
cmovb  %rax,%rdi
jmp    123b <main+0x10b>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xde8(%rip),%r14
xor    %ebx,%ebx
jmp    129a <main+0x16a>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    $0x2d,%rbx
je     12ae <main+0x17e>
cmpl   $0x0,(%rsp,%rbx,4)
jle    1290 <main+0x160>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1290 <main+0x160>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movabs $0x100000600,%r13
lea    0xd56(%rip),%r15
xor    %r14d,%r14d
jmp    1305 <main+0x1d5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r14d
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%r12),%eax
je     11a6 <main+0x76>
cmp    $0x20,%eax
ja     12f0 <main+0x1c0>
mov    %eax,%eax
bt     %rax,%r13
jae    12f0 <main+0x1c0>
movslq %r14d,%rbp
mov    (%rsp,%rbp,4),%ebx
xor    %r14d,%r14d
lea    0xcde(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
mov    %ebx,(%rsp,%rbp,4)
mov    %r15,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12f4 <main+0x1c4>

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [51 x i8] c"New word. Length was: %d. Word lengths before: %d\0A\00"
@.str.1 = [20 x i8] c"Length is now: %d.\0A\00"
@.str.2 = [25 x i8] c"%d words with %d length\0A\00"
@.str.3 = [5 x i8] c" _ \00"
@.str.4 = [4 x i8] c" _ \00"
@.str.5 = [5 x i8] c" \00"
@.str.6 = [4 x i8] c" \00"
@.str.8 = [5 x i8] c" %d \00"
define i32 @main() {
%1 = alloca [45 x i32]
%2 = bitcast [45 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 %7
6: ; preds = %19, %0
br label %26
7: ; preds = %0, %19
%8 = phi i32 [ %21, %19 ], [ %3, %0 ]
%9 = phi i32 [ %20, %19 ], [ 0, %0 ]
switch i32 %8, label %17 [
i32 32, label %10
i32 10, label %10
i32 9, label %10
]
10: ; preds = %7, %7, %7
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds [45 x i32], [45 x i32]* %1, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %13)
%15 = add nsw i32 %13, 1
store i32 %15, i32* %12
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 0)
br label %19
17: ; preds = %7
%18 = add nsw i32 %9, 1
br label %19
19: ; preds = %17, %10
%20 = phi i32 [ 0, %10 ], [ %18, %17 ]
%21 = tail call i32 (...) @getchar()
%22 = load i32, i32* @EOF
%23 = icmp eq i32 %21, %22
br i1 %23, label %6, label %7
24: ; preds = %35
%25 = icmp eq i32 %38, 0
br i1 %25, label %44, label %41
26: ; preds = %6, %35
%27 = phi i64 [ %39, %35 ], [ 0, %6 ]
%28 = phi i32 [ %38, %35 ], [ 0, %6 ]
%29 = getelementptr inbounds [45 x i32], [45 x i32]* %1, i64 0, i64 %27
%30 = load i32, i32* %29
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %26
%33 = trunc i64 %27 to i32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 %33)
br label %35
35: ; preds = %32, %26
%36 = icmp sgt i32 %30, %28
%37 = zext i1 %36 to i32
%38 = add nuw nsw i32 %28, %37
%39 = add nuw nsw i64 %27, 1
%40 = icmp eq i64 %39, 45
br i1 %40, label %24, label %26
41: ; preds = %24, %46
%42 = phi i32 [ %48, %46 ], [ 0, %24 ]
%43 = sub nsw i32 %38, %42
br label %50
44: ; preds = %46, %24
%45 = tail call i32 @putchar(i32 10)
br label %73
46: ; preds = %68
%47 = tail call i32 @putchar(i32 10)
%48 = add nuw i32 %42, 1
%49 = icmp eq i32 %48, %38
br i1 %49, label %44, label %41
50: ; preds = %41, %68
%51 = phi i64 [ 0, %41 ], [ %69, %68 ]
%52 = getelementptr inbounds [45 x i32], [45 x i32]* %1, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = icmp slt i32 %53, 1
%55 = icmp slt i32 %53, %43
%56 = select i1 %54, i1 true, i1 %55
br i1 %56, label %60, label %57
57: ; preds = %50
%58 = icmp ult i64 %51, 10
%59 = select i1 %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0)
br label %65
60: ; preds = %50
%61 = icmp sgt i32 %53, 0
br i1 %61, label %62, label %68
62: ; preds = %60
%63 = icmp ult i64 %51, 10
%64 = select i1 %63, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0)
br label %65
65: ; preds = %62, %57
%66 = phi i8* [ %59, %57 ], [ %64, %62 ]
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %66)
br label %68
68: ; preds = %65, %60
%69 = add nuw nsw i64 %51, 1
%70 = icmp eq i64 %69, 45
br i1 %70, label %46, label %50
71: ; preds = %81
%72 = tail call i32 @putchar(i32 10)
ret i32 0
73: ; preds = %44, %81
%74 = phi i64 [ 0, %44 ], [ %82, %81 ]
%75 = getelementptr inbounds [45 x i32], [45 x i32]* %1, i64 0, i64 %74
%76 = load i32, i32* %75
%77 = icmp sgt i32 %76, 0
br i1 %77, label %78, label %81
78: ; preds = %73
%79 = trunc i64 %74 to i32
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 %79)
br label %81
81: ; preds = %73, %78
%82 = add nuw nsw i64 %74, 1
%83 = icmp eq i64 %82, 45
br i1 %83, label %71, label %73
}