#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 getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int toupper(int);
void count_4(void) {
  int x, c, nr_maxim, state, lit, nre, words;
  nr_maxim = lit = nre = words = 0;
  int litere[27] = {0};
  state = 0;
  while ((c = getchar()) != '~') {
    if (c >= 'A' && c <= 'z') {
      c = toupper(c);
      litere[c - 'A']++;
      lit++;
      state = 1;
    } else if (c >= '0' && c <= '9') {
      nre++;
      state = 1;
    } else if (c == ' ' || c == '\t' || c == '\n')
      state = 0;
    if (state == 0) {
      words++;
      state = 1;
    }
  }
  printf("So you had %d words with %d letters and %d numbers\n\n\n", words, lit,
         nre);
  for (x = 0; x < 26; x++) {
    if (nr_maxim < litere[x]) {
      nr_maxim = litere[x];
    }
  }
  for (x = nr_maxim; x >= 0; x--) {
    while (x <= nr_maxim) {
      printf("Times x %d|", x);
      break;
    }
    for (c = 0; c < 26; c++) {
      if (litere[c] >= x)
        printf(" * ");
      else
        printf("   ");
    }
    putchar('\n');
    puts("---------------------------------------------------------------------"
         "-------------------");
  }
  printf("  Letter |");
  for (x = 65; x < 91; x++)
    printf(" %c ", x);
}


x86 assembly (clang, -O0):
<count_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x6c,%edx
call   1070 <memset@plt>
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x7e,%eax
je     1278 <count_4+0x118>
cmpl   $0x41,-0x8(%rbp)
jl     1201 <count_4+0xa1>
cmpl   $0x7a,-0x8(%rbp)
jg     1201 <count_4+0xa1>
mov    -0x8(%rbp),%edi
call   1040 <toupper@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
cltq
mov    -0x90(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
jmp    1259 <count_4+0xf9>
cmpl   $0x30,-0x8(%rbp)
jl     122a <count_4+0xca>
cmpl   $0x39,-0x8(%rbp)
jg     122a <count_4+0xca>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x10(%rbp)
jmp    1254 <count_4+0xf4>
cmpl   $0x20,-0x8(%rbp)
je     1248 <count_4+0xe8>
cmpl   $0x9,-0x8(%rbp)
je     1248 <count_4+0xe8>
cmpl   $0xa,-0x8(%rbp)
jne    124f <count_4+0xef>
movl   $0x0,-0x10(%rbp)
jmp    1254 <count_4+0xf4>
jmp    1259 <count_4+0xf9>
cmpl   $0x0,-0x10(%rbp)
jne    1273 <count_4+0x113>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x10(%rbp)
jmp    11a1 <count_4+0x41>
mov    -0x1c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xd78(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1a,-0x4(%rbp)
jge    12d5 <count_4+0x175>
mov    -0xc(%rbp),%eax
movslq -0x4(%rbp),%rcx
cmp    -0x90(%rbp,%rcx,4),%eax
jge    12c2 <count_4+0x162>
movslq -0x4(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%eax
mov    %eax,-0xc(%rbp)
jmp    12c7 <count_4+0x167>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1296 <count_4+0x136>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1384 <count_4+0x224>
jmp    12ea <count_4+0x18a>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1307 <count_4+0x1a7>
mov    -0x4(%rbp),%esi
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    1360 <count_4+0x200>
movslq -0x8(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%eax
cmp    -0x4(%rbp),%eax
jl     133f <count_4+0x1df>
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    134d <count_4+0x1ed>
lea    0xd00(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1352 <count_4+0x1f2>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    130e <count_4+0x1ae>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcd9(%rip),%rdi
call   1050 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    12db <count_4+0x17b>
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x41,-0x4(%rbp)
cmpl   $0x5b,-0x4(%rbp)
jge    13c2 <count_4+0x262>
mov    -0x4(%rbp),%esi
lea    0xd01(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1399 <count_4+0x239>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x7c(%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)
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0x7e,%eax
jne    11cf <count_4+0x7f>
lea    0xe64(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
xor    %r8d,%r8d
xor    %esi,%esi
xor    %edi,%edi
xor    %ebp,%ebp
xor    %r15d,%r15d
xor    %r13d,%r13d
xor    %ecx,%ecx
pxor   %xmm2,%xmm2
pxor   %xmm1,%xmm1
pxor   %xmm3,%xmm3
pxor   %xmm4,%xmm4
jmp    12de <count_4+0x18e>
lea    -0x41(%rax),%ecx
cmp    $0x3a,%ecx
jae    11f5 <count_4+0xa5>
mov    %eax,%edi
call   1040 <toupper@plt>
cltq
addl   $0x1,-0xe4(%rsp,%rax,4)
01
mov    $0x1,%ebp
xor    %r12d,%r12d
xor    %r14d,%r14d
jmp    120b <count_4+0xbb>
add    $0xffffffd0,%eax
xor    %r14d,%r14d
xor    %r12d,%r12d
cmp    $0xa,%eax
setae  %r14b
setb   %r12b
xor    %ebp,%ebp
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0x7e,%eax
jne    15cc <count_4+0x47c>
mov    0x20(%rsp),%ebx
mov    0x24(%rsp),%eax
mov    %eax,0x1c(%rsp)
mov    0x28(%rsp),%eax
mov    %eax,0x18(%rsp)
mov    0x2c(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    0x30(%rsp),%eax
mov    %eax,0x10(%rsp)
mov    0x34(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x38(%rsp),%r15d
mov    0x3c(%rsp),%r13d
movaps 0x70(%rsp),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0x60(%rsp),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0x50(%rsp),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0x40(%rsp),%xmm0
movaps %xmm0,0x90(%rsp)
lea    0xd74(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
movdqa 0x90(%rsp),%xmm4
movdqa 0xb0(%rsp),%xmm1
movdqa 0xc0(%rsp),%xmm3
movdqa 0xa0(%rsp),%xmm2
mov    0xc(%rsp),%ebp
mov    0x10(%rsp),%edi
mov    0x14(%rsp),%esi
mov    0x18(%rsp),%r8d
test   %ebx,%ebx
mov    $0x0,%ecx
cmovns %ebx,%ecx
mov    0x1c(%rsp),%ebx
movdqa %xmm4,%xmm0
pcmpgtd %xmm1,%xmm0
pand   %xmm0,%xmm4
pandn  %xmm1,%xmm0
por    %xmm4,%xmm0
movdqa %xmm2,%xmm1
pcmpgtd %xmm3,%xmm1
pand   %xmm1,%xmm2
pandn  %xmm3,%xmm1
por    %xmm2,%xmm1
movdqa %xmm0,%xmm2
pcmpgtd %xmm1,%xmm2
pand   %xmm2,%xmm0
pandn  %xmm1,%xmm2
por    %xmm0,%xmm2
pshufd $0xee,%xmm2,%xmm0
movdqa %xmm2,%xmm1
pcmpgtd %xmm0,%xmm1
pand   %xmm1,%xmm2
pandn  %xmm0,%xmm1
por    %xmm2,%xmm1
pshufd $0x55,%xmm1,%xmm0
movdqa %xmm1,%xmm2
pcmpgtd %xmm0,%xmm2
pand   %xmm2,%xmm1
pandn  %xmm0,%xmm2
por    %xmm1,%xmm2
movd   %xmm2,%eax
cmp    %r13d,%eax
cmovg  %eax,%r13d
cmp    %r15d,%r13d
cmovle %r15d,%r13d
cmp    %ebp,%r13d
cmovle %ebp,%r13d
cmp    %edi,%r13d
cmovle %edi,%r13d
cmp    %esi,%r13d
cmovle %esi,%r13d
cmp    %r8d,%r13d
cmovle %r8d,%r13d
cmp    %ebx,%r13d
cmovle %ebx,%r13d
cmp    %ecx,%r13d
cmovle %ecx,%r13d
mov    0x80(%rsp),%eax
cmp    %eax,%r13d
cmovl  %eax,%r13d
mov    0x84(%rsp),%eax
cmp    %eax,%r13d
cmovl  %eax,%r13d
lea    0xc9b(%rip),%rbx
lea    0xc90(%rip),%r12
lea    0xc91(%rip),%r15
mov    %r13d,%ebp
jmp    13db <count_4+0x28b>
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
call   1050 <puts@plt>
lea    -0x1(%rbp),%eax
test   %ebp,%ebp
mov    %eax,%ebp
jle    1420 <count_4+0x2d0>
cmp    %r13d,%ebp
jg     13f0 <count_4+0x2a0>
lea    0xc4f(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %r14d,%r14d
jmp    1411 <count_4+0x2c1>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r14
cmp    $0x1a,%r14
je     13c0 <count_4+0x270>
mov    %rbx,%rdi
cmp    %ebp,0x20(%rsp,%r14,4)
jl     1400 <count_4+0x2b0>
mov    %r12,%rdi
jmp    1400 <count_4+0x2b0>
lea    0xc7c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc79(%rip),%rbx
mov    %rbx,%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x42,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x43,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x44,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x45,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x49,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x4a,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x4b,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x4c,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x4d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x4e,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x51,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x52,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x55,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x56,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x57,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x58,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x59,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x5a,%esi
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <printf@plt>
movabs $0x100000600,%rbx
jmp    1604 <count_4+0x4b4>
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1040 <toupper@plt>
cltq
addl   $0x1,-0xe4(%rsp,%rax,4)
01
add    $0x1,%ebp
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0x7e,%eax
je     121b <count_4+0xcb>
lea    -0x41(%rax),%ecx
cmp    $0x39,%ecx
jbe    15e0 <count_4+0x490>
lea    -0x30(%rax),%ecx
cmp    $0x9,%ecx
ja     1620 <count_4+0x4d0>
add    $0x1,%r12d
jmp    15f4 <count_4+0x4a4>
nopw   0x0(%rax,%rax,1)
cmp    $0x20,%eax
ja     15f4 <count_4+0x4a4>
mov    %eax,%eax
bt     %rax,%rbx
jae    15f4 <count_4+0x4a4>
add    $0x1,%r14d
jmp    15f4 <count_4+0x4a4>

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

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