#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 */
char EOF;
char getchar();
int /*<<< orphan*/ printf(char *, int, int);
void create_letter_distribution_diagram() {
  char ch;
  int c, LettersCount[26][2] = {{0}}, tmp, tmp2, i, l;
  for (c = 0; c < 26; c++) {
    LettersCount[c][0] = c;
  }
  do {
    ch = getchar();
    if (ch >= 'A' && ch <= 'Z') {
      LettersCount[ch - 'A'][1]++;
    } else if (ch >= 'a' && ch <= 'z') {
      LettersCount[ch - 'a'][1]++;
    }
  } while (ch != EOF);
  for (i = 0; i < (26 - 1); i++) {
    for (l = 0; l < 26 - i - 1; l++) {
      if (LettersCount[l][1] < LettersCount[l + 1][1]) {
        tmp = LettersCount[l][0];
        tmp2 = LettersCount[l][1];
        LettersCount[l][0] = LettersCount[l + 1][0];
        LettersCount[l + 1][0] = tmp;
        LettersCount[l][1] = LettersCount[l + 1][1];
        LettersCount[l + 1][1] = tmp2;
      }
      if (LettersCount[l][0] > LettersCount[l + 1][0] &&
          LettersCount[l][1] == LettersCount[l + 1][1]) {
        tmp = LettersCount[l][0];
        tmp2 = LettersCount[l][1];
        LettersCount[l][0] = LettersCount[l + 1][0];
        LettersCount[l + 1][0] = tmp;
        LettersCount[l][1] = LettersCount[l + 1][1];
        LettersCount[l + 1][1] = tmp2;
      }
    }
  }
  for (i = 0; i < 26; i++) {
    printf("%c: %d\n", LettersCount[i][0] + 'a', LettersCount[i][1]);
  }
}


x86 assembly (clang, -O0):
<create_letter_distribution_diagram>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0xd0,%edx
call   1040 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    117b <create_letter_distribution_diagram+0x4b>
mov    -0x8(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0xe0(%rbp,%rax,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <create_letter_distribution_diagram+0x25>
jmp    1180 <create_letter_distribution_diagram+0x50>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     11c3 <create_letter_distribution_diagram+0x93>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     11c3 <create_letter_distribution_diagram+0x93>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
cltq
mov    -0xdc(%rbp,%rax,8),%ecx
add    $0x1,%ecx
mov    %ecx,-0xdc(%rbp,%rax,8)
jmp    11fc <create_letter_distribution_diagram+0xcc>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     11f7 <create_letter_distribution_diagram+0xc7>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     11f7 <create_letter_distribution_diagram+0xc7>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0xdc(%rbp,%rax,8),%ecx
add    $0x1,%ecx
mov    %ecx,-0xdc(%rbp,%rax,8)
jmp    11fc <create_letter_distribution_diagram+0xcc>
jmp    1201 <create_letter_distribution_diagram+0xd1>
movsbl -0x1(%rbp),%eax
mov    0x2ddc(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1180 <create_letter_distribution_diagram+0x50>
movl   $0x0,-0xec(%rbp)
cmpl   $0x19,-0xec(%rbp)
jge    142b <create_letter_distribution_diagram+0x2fb>
movl   $0x0,-0xf0(%rbp)
mov    -0xf0(%rbp),%eax
mov    $0x1a,%ecx
sub    -0xec(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1412 <create_letter_distribution_diagram+0x2e2>
movslq -0xf0(%rbp),%rax
mov    -0xdc(%rbp,%rax,8),%eax
mov    -0xf0(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0xdc(%rbp,%rcx,8),%eax
jge    1313 <create_letter_distribution_diagram+0x1e3>
movslq -0xf0(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%eax
mov    %eax,-0xe4(%rbp)
movslq -0xf0(%rbp),%rax
mov    -0xdc(%rbp,%rax,8),%eax
mov    %eax,-0xe8(%rbp)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0xe0(%rbp,%rax,8),%ecx
movslq -0xf0(%rbp),%rax
mov    %ecx,-0xe0(%rbp,%rax,8)
mov    -0xe4(%rbp),%ecx
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0xe0(%rbp,%rax,8)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0xdc(%rbp,%rax,8),%ecx
movslq -0xf0(%rbp),%rax
mov    %ecx,-0xdc(%rbp,%rax,8)
mov    -0xe8(%rbp),%ecx
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0xdc(%rbp,%rax,8)
movslq -0xf0(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%eax
mov    -0xf0(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0xe0(%rbp,%rcx,8),%eax
jle    13f9 <create_letter_distribution_diagram+0x2c9>
movslq -0xf0(%rbp),%rax
mov    -0xdc(%rbp,%rax,8),%eax
mov    -0xf0(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0xdc(%rbp,%rcx,8),%eax
jne    13f9 <create_letter_distribution_diagram+0x2c9>
movslq -0xf0(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%eax
mov    %eax,-0xe4(%rbp)
movslq -0xf0(%rbp),%rax
mov    -0xdc(%rbp,%rax,8),%eax
mov    %eax,-0xe8(%rbp)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0xe0(%rbp,%rax,8),%ecx
movslq -0xf0(%rbp),%rax
mov    %ecx,-0xe0(%rbp,%rax,8)
mov    -0xe4(%rbp),%ecx
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0xe0(%rbp,%rax,8)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0xdc(%rbp,%rax,8),%ecx
movslq -0xf0(%rbp),%rax
mov    %ecx,-0xdc(%rbp,%rax,8)
mov    -0xe8(%rbp),%ecx
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0xdc(%rbp,%rax,8)
jmp    13fe <create_letter_distribution_diagram+0x2ce>
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    1238 <create_letter_distribution_diagram+0x108>
jmp    1417 <create_letter_distribution_diagram+0x2e7>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    1221 <create_letter_distribution_diagram+0xf1>
movl   $0x0,-0xec(%rbp)
cmpl   $0x1a,-0xec(%rbp)
jge    1481 <create_letter_distribution_diagram+0x351>
movslq -0xec(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%esi
add    $0x61,%esi
movslq -0xec(%rbp),%rax
mov    -0xdc(%rbp,%rax,8),%edx
lea    0xb98(%rip),%rdi
call   1030 <printf@plt>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    1435 <create_letter_distribution_diagram+0x305>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_letter_distribution_diagram>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
mov    $0xffffff9f,%eax
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xc0(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x2,0x10(%rsp)
movl   $0x3,0x18(%rsp)
movl   $0x4,0x20(%rsp)
movl   $0x5,0x28(%rsp)
movl   $0x6,0x30(%rsp)
movl   $0x7,0x38(%rsp)
movl   $0x8,0x40(%rsp)
movl   $0x9,0x48(%rsp)
movl   $0xa,0x50(%rsp)
movl   $0xb,0x58(%rsp)
movl   $0xc,0x60(%rsp)
movl   $0xd,0x68(%rsp)
movl   $0xe,0x70(%rsp)
movl   $0xf,0x78(%rsp)
movl   $0x10,0x80(%rsp)
movl   $0x11,0x88(%rsp)
movl   $0x12,0x90(%rsp)
movl   $0x13,0x98(%rsp)
movl   $0x14,0xa0(%rsp)
movl   $0x15,0xa8(%rsp)
movl   $0x16,0xb0(%rsp)
movl   $0x17,0xb8(%rsp)
movl   $0x18,0xc0(%rsp)
movl   $0x19,0xc8(%rsp)
lea    0x20(%rax),%rbx
mov    0x2d76(%rip),%r14
jmp    1290 <create_letter_distribution_diagram+0x170>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbq %al,%rdx
add    %edx,%ecx
addl   $0x1,0x4(%rsp,%rcx,8)
cmp    (%r14),%al
je     12b1 <create_letter_distribution_diagram+0x191>
xor    %eax,%eax
call   1040 <getchar@plt>
lea    -0x41(%rax),%edx
mov    %rbx,%rcx
cmp    $0x1a,%dl
jb     1280 <create_letter_distribution_diagram+0x160>
lea    -0x61(%rax),%edx
mov    $0xffffff9f,%ecx
cmp    $0x19,%dl
jbe    1280 <create_letter_distribution_diagram+0x160>
jmp    128b <create_letter_distribution_diagram+0x16b>
xor    %r8d,%r8d
mov    $0x19,%r9d
jmp    12ce <create_letter_distribution_diagram+0x1ae>
nopl   0x0(%rax)
add    $0x1,%r8d
add    $0xffffffffffffffff,%r9
cmp    $0x19,%r8d
je     1339 <create_letter_distribution_diagram+0x219>
mov    0x4(%rsp),%r10d
xor    %edx,%edx
jmp    12e5 <create_letter_distribution_diagram+0x1c5>
nopw   0x0(%rax,%rax,1)
cmp    %rdx,%r9
je     12c0 <create_letter_distribution_diagram+0x1a0>
lea    (%rdx,%rdx,1),%rdi
mov    0xc(%rsp,%rdx,8),%esi
mov    (%rsp,%rdx,8),%eax
mov    0x8(%rsp,%rdx,8),%ebx
cmp    %esi,%r10d
jge    1310 <create_letter_distribution_diagram+0x1f0>
mov    %ebx,(%rsp,%rdi,4)
mov    %eax,0x8(%rsp,%rdi,4)
mov    %esi,0x4(%rsp,%rdi,4)
mov    %r10d,0xc(%rsp,%rdi,4)
mov    %eax,%ecx
jmp    1317 <create_letter_distribution_diagram+0x1f7>
nopl   (%rax)
mov    %ebx,%ecx
mov    %eax,%ebx
mov    %esi,%r10d
add    $0x1,%rdx
cmp    %ecx,%ebx
jle    12e0 <create_letter_distribution_diagram+0x1c0>
cmp    %r10d,0x4(%rsp,%rdi,4)
jne    12e0 <create_letter_distribution_diagram+0x1c0>
mov    %ecx,(%rsp,%rdi,4)
mov    %ebx,0x8(%rsp,%rdi,4)
mov    %r10d,0x4(%rsp,%rdi,4)
mov    %r10d,0xc(%rsp,%rdi,4)
jmp    12e0 <create_letter_distribution_diagram+0x1c0>
xor    %ebx,%ebx
lea    0xcbe(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rsp,%rbx,8),%esi
mov    0x4(%rsp,%rbx,8),%edx
add    $0x61,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x1a,%rbx
jne    1350 <create_letter_distribution_diagram+0x230>
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i8 0
@.str = [8 x i8] c"%c: %d\0A\00"
define void @create_letter_distribution_diagram() {
%1 = alloca [26 x [2 x i32]]
%2 = bitcast [26 x [2 x i32]]* %1 to i8*
%3 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 1, i64 0
%4 = bitcast [26 x [2 x i32]]* %1 to i8*
store i32 1, i32* %3
%5 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 2, i64 0
store i32 2, i32* %5
%6 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 3, i64 0
store i32 3, i32* %6
%7 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 4, i64 0
store i32 4, i32* %7
%8 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 5, i64 0
store i32 5, i32* %8
%9 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 6, i64 0
store i32 6, i32* %9
%10 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 7, i64 0
store i32 7, i32* %10
%11 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 8, i64 0
store i32 8, i32* %11
%12 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 9, i64 0
store i32 9, i32* %12
%13 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 10, i64 0
store i32 10, i32* %13
%14 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 11, i64 0
store i32 11, i32* %14
%15 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 12, i64 0
store i32 12, i32* %15
%16 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 13, i64 0
store i32 13, i32* %16
%17 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 14, i64 0
store i32 14, i32* %17
%18 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 15, i64 0
store i32 15, i32* %18
%19 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 16, i64 0
store i32 16, i32* %19
%20 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 17, i64 0
store i32 17, i32* %20
%21 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 18, i64 0
store i32 18, i32* %21
%22 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 19, i64 0
store i32 19, i32* %22
%23 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 20, i64 0
store i32 20, i32* %23
%24 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 21, i64 0
store i32 21, i32* %24
%25 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 22, i64 0
store i32 22, i32* %25
%26 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 23, i64 0
store i32 23, i32* %26
%27 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 24, i64 0
store i32 24, i32* %27
%28 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 25, i64 0
store i32 25, i32* %28
br label %29
29: ; preds = %0, %44
%30 = tail call signext i8 (...) @getchar()
%31 = sext i8 %30 to i64
%32 = add i8 %30, -65
%33 = icmp ult i8 %32, 26
br i1 %33, label %37, label %34
34: ; preds = %29
%35 = add i8 %30, -97
%36 = icmp ult i8 %35, 26
br i1 %36, label %37, label %44
37: ; preds = %34, %29
%38 = phi i64 [ 4294967231, %29 ], [ 4294967199, %34 ]
%39 = add nsw i64 %38, %31
%40 = and i64 %39, 4294967295
%41 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %40, i64 1
%42 = load i32, i32* %41
%43 = add nsw i32 %42, 1
store i32 %43, i32* %41
br label %44
44: ; preds = %37, %34
%45 = load i8, i8* @EOF
%46 = icmp eq i8 %30, %45
br i1 %46, label %47, label %29
47: ; preds = %44
%48 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 0, i64 1
br label %49
49: ; preds = %81, %47
%50 = phi i64 [ 25, %47 ], [ %83, %81 ]
%51 = phi i32 [ 0, %47 ], [ %82, %81 ]
%52 = load i32, i32* %48
br label %53
53: ; preds = %49, %79
%54 = phi i32 [ %52, %49 ], [ %71, %79 ]
%55 = phi i64 [ 0, %49 ], [ %58, %79 ]
%56 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %55
%57 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %55, i64 1
%58 = add nuw nsw i64 %55, 1
%59 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %58
%60 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %58, i64 1
%61 = load i32, i32* %60
%62 = icmp slt i32 %54, %61
%63 = getelementptr inbounds [2 x i32], [2 x i32]* %56, i64 0, i64 0
%64 = load i32, i32* %63
%65 = getelementptr inbounds [2 x i32], [2 x i32]* %59, i64 0, i64 0
%66 = load i32, i32* %65
br i1 %62, label %67, label %68
67: ; preds = %53
store i32 %66, i32* %63
store i32 %64, i32* %65
store i32 %61, i32* %57
store i32 %54, i32* %60
br label %68
68: ; preds = %53, %67
%69 = phi i32 [ %64, %67 ], [ %66, %53 ]
%70 = phi i32 [ %66, %67 ], [ %64, %53 ]
%71 = phi i32 [ %54, %67 ], [ %61, %53 ]
%72 = getelementptr inbounds [2 x i32], [2 x i32]* %56, i64 0, i64 0
%73 = getelementptr inbounds [2 x i32], [2 x i32]* %59, i64 0, i64 0
%74 = icmp sgt i32 %70, %69
br i1 %74, label %75, label %79
75: ; preds = %68
%76 = load i32, i32* %57
%77 = icmp eq i32 %76, %71
br i1 %77, label %78, label %79
78: ; preds = %75
store i32 %69, i32* %72
store i32 %70, i32* %73
store i32 %71, i32* %57
store i32 %71, i32* %60
br label %79
79: ; preds = %68, %75, %78
%80 = icmp eq i64 %58, %50
br i1 %80, label %81, label %53
81: ; preds = %79
%82 = add nuw nsw i32 %51, 1
%83 = add nsw i64 %50, -1
%84 = icmp eq i32 %82, 25
br i1 %84, label %85, label %49
85: ; preds = %81, %85
%86 = phi i64 [ %93, %85 ], [ 0, %81 ]
%87 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %86, i64 0
%88 = load i32, i32* %87
%89 = add nsw i32 %88, 97
%90 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %86, i64 1
%91 = load i32, i32* %90
%92 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %89, i32 %91)
%93 = add nuw nsw i64 %86, 1
%94 = icmp eq i64 %93, 26
br i1 %94, label %95, label %85
95: ; preds = %85
ret void
}