#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 <= 24; i++) {
    printf("%c: %d ", LettersCount[i][0] + 'a', LettersCount[i][1]);
    if (i == 24) {
      i++;
      if (i == 25) {
        printf("%c: %d", 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   $0x18,-0xec(%rbp)
jg     14df <create_letter_distribution_diagram+0x3af>
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>
cmpl   $0x18,-0xec(%rbp)
jne    14c6 <create_letter_distribution_diagram+0x396>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
cmpl   $0x19,-0xec(%rbp)
jne    14c1 <create_letter_distribution_diagram+0x391>
movslq -0xec(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%esi
add    $0x61,%esi
movslq -0xec(%rbp),%rax
mov    -0xdc(%rbp,%rax,8),%edx
lea    0xb4c(%rip),%rdi
call   1030 <printf@plt>
jmp    14c6 <create_letter_distribution_diagram+0x396>
jmp    14cb <create_letter_distribution_diagram+0x39b>
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   %rbp
push   %r15
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    0x2d73(%rip),%rbp
jmp    1290 <create_letter_distribution_diagram+0x170>
nopw   0x0(%rax,%rax,1)
movsbq %al,%rdx
add    %edx,%ecx
addl   $0x1,0x4(%rsp,%rcx,8)
cmp    0x0(%rbp),%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     1335 <create_letter_distribution_diagram+0x215>
mov    0x4(%rsp),%eax
xor    %edx,%edx
jmp    12e5 <create_letter_distribution_diagram+0x1c5>
cs 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),%ebx
mov    0x8(%rsp,%rdx,8),%ebp
cmp    %esi,%eax
jge    1310 <create_letter_distribution_diagram+0x1f0>
mov    %ebp,(%rsp,%rdi,4)
mov    %ebx,0x8(%rsp,%rdi,4)
mov    %esi,0x4(%rsp,%rdi,4)
mov    %eax,0xc(%rsp,%rdi,4)
mov    %ebx,%ecx
jmp    1316 <create_letter_distribution_diagram+0x1f6>
nopl   0x0(%rax,%rax,1)
mov    %ebp,%ecx
mov    %ebx,%ebp
mov    %esi,%eax
add    $0x1,%rdx
cmp    %ecx,%ebp
jle    12e0 <create_letter_distribution_diagram+0x1c0>
cmp    %eax,0x4(%rsp,%rdi,4)
jne    12e0 <create_letter_distribution_diagram+0x1c0>
mov    %ecx,(%rsp,%rdi,4)
mov    %ebp,0x8(%rsp,%rdi,4)
mov    %eax,0x4(%rsp,%rdi,4)
mov    %eax,0xc(%rsp,%rdi,4)
jmp    12e0 <create_letter_distribution_diagram+0x1c0>
mov    0xc8(%rsp),%r15d
mov    0xcc(%rsp),%r14d
xor    %ebp,%ebp
lea    0xcb2(%rip),%rbx
xchg   %ax,%ax
mov    (%rsp,%rbp,8),%esi
mov    0x4(%rsp,%rbp,8),%edx
add    $0x61,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    $0x19,%ebp
jne    1350 <create_letter_distribution_diagram+0x230>
add    $0x61,%r15d
lea    0xc92(%rip),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
add    $0xd8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@EOF = global i8 0
@.str = [8 x i8] c"%c: %d \00"
@.str.1 = [7 x i8] c"%c: %d\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 = %248, %209
%211 = load i32, i32* %6
%212 = icmp sle i32 %211, 24
br i1 %212, label %213, label %251
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)
%226 = load i32, i32* %6
%227 = icmp eq i32 %226, 24
br i1 %227, label %228, label %247
228: ; preds = %213
%229 = load i32, i32* %6
%230 = add nsw i32 %229, 1
store i32 %230, i32* %6
%231 = load i32, i32* %6
%232 = icmp eq i32 %231, 25
br i1 %232, label %233, label %246
233: ; preds = %228
%234 = load i32, i32* %6
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %3, i64 0, i64 %235
%237 = getelementptr inbounds [2 x i32], [2 x i32]* %236, i64 0, i64 0
%238 = load i32, i32* %237
%239 = add nsw i32 %238, 97
%240 = load i32, i32* %6
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %3, i64 0, i64 %241
%243 = getelementptr inbounds [2 x i32], [2 x i32]* %242, i64 0, i64 1
%244 = load i32, i32* %243
%245 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %239, i32 %244)
br label %246
246: ; preds = %233, %228
br label %247
247: ; preds = %246, %213
br label %248
248: ; preds = %247
%249 = load i32, i32* %6
%250 = add nsw i32 %249, 1
store i32 %250, i32* %6
br label %210
251: ; preds = %210
ret void
}

LLVM IR (-O2):
@EOF = global i8 0
@.str = [8 x i8] c"%c: %d \00"
@.str.1 = [7 x i8] c"%c: %d\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 = %85, %47
%50 = phi i64 [ 25, %47 ], [ %87, %85 ]
%51 = phi i32 [ 0, %47 ], [ %86, %85 ]
%52 = load i32, i32* %48
br label %57
53: ; preds = %85
%54 = load i32, i32* %28
%55 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 25, i64 1
%56 = load i32, i32* %55
br label %89
57: ; preds = %49, %83
%58 = phi i32 [ %52, %49 ], [ %75, %83 ]
%59 = phi i64 [ 0, %49 ], [ %62, %83 ]
%60 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %59
%61 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %59, i64 1
%62 = add nuw nsw i64 %59, 1
%63 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %62
%64 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %62, i64 1
%65 = load i32, i32* %64
%66 = icmp slt i32 %58, %65
%67 = getelementptr inbounds [2 x i32], [2 x i32]* %60, i64 0, i64 0
%68 = load i32, i32* %67
%69 = getelementptr inbounds [2 x i32], [2 x i32]* %63, i64 0, i64 0
%70 = load i32, i32* %69
br i1 %66, label %71, label %72
71: ; preds = %57
store i32 %70, i32* %67
store i32 %68, i32* %69
store i32 %65, i32* %61
store i32 %58, i32* %64
br label %72
72: ; preds = %57, %71
%73 = phi i32 [ %68, %71 ], [ %70, %57 ]
%74 = phi i32 [ %70, %71 ], [ %68, %57 ]
%75 = phi i32 [ %58, %71 ], [ %65, %57 ]
%76 = getelementptr inbounds [2 x i32], [2 x i32]* %60, i64 0, i64 0
%77 = getelementptr inbounds [2 x i32], [2 x i32]* %63, i64 0, i64 0
%78 = icmp sgt i32 %74, %73
br i1 %78, label %79, label %83
79: ; preds = %72
%80 = load i32, i32* %61
%81 = icmp eq i32 %80, %75
br i1 %81, label %82, label %83
82: ; preds = %79
store i32 %73, i32* %76
store i32 %74, i32* %77
store i32 %75, i32* %61
store i32 %75, i32* %64
br label %83
83: ; preds = %72, %79, %82
%84 = icmp eq i64 %62, %50
br i1 %84, label %85, label %57
85: ; preds = %83
%86 = add nuw nsw i32 %51, 1
%87 = add nsw i64 %50, -1
%88 = icmp eq i32 %86, 25
br i1 %88, label %53, label %49
89: ; preds = %89, %53
%90 = phi i32 [ 0, %53 ], [ %99, %89 ]
%91 = zext i32 %90 to i64
%92 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %91, i64 0
%93 = load i32, i32* %92
%94 = add nsw i32 %93, 97
%95 = getelementptr inbounds [26 x [2 x i32]], [26 x [2 x i32]]* %1, i64 0, i64 %91, i64 1
%96 = load i32, i32* %95
%97 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %94, i32 %96)
%98 = icmp eq i32 %90, 24
%99 = add nuw nsw i32 %90, 1
br i1 %98, label %100, label %89
100: ; preds = %89
%101 = add nsw i32 %54, 97
%102 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %101, i32 %56)
ret void
}