#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 *, ...);
void create_letter_distribution_diagram() {
  int i, d, swap, letter, count[26], sort[26][300];
  char alphabet[26];
  letter = 'a';
  for (i = 0; i < 26; i++, letter++)
    alphabet[i] = letter;
  for (i = 0; i < 26; i++)
    count[i] = 0;
  for (i = 0; (letter = getchar()) != EOF; i++) {
    for (i = 0; i < 26; i++) {
      if (letter == alphabet[i] || letter == (alphabet[i] + ('A' - 'a')))
        count[i]++;
    }
  }
  for (i = 0; i < 26; i++) {
    sort[i][1] = count[i];
    sort[i][0] = i;
  }
  for (i = 0; i < 26; i++) {
    for (d = 0; d < 25 - i; d++) {
      if (sort[d][1] < sort[d + 1][1]) {
        swap = sort[d][1];
        sort[d][1] = sort[d + 1][1];
        sort[d + 1][1] = swap;
        swap = sort[d][0];
        sort[d][0] = sort[d + 1][0];
        sort[d + 1][0] = swap;
        if (sort[d][1] == sort[d + 1][1]) {
          if (sort[d][0] > sort[d + 1][0]) {
            swap = sort[d][0];
            sort[d][0] = sort[d + 1][0];
            sort[d + 1][0] = swap;
          }
        }
      }
    }
  }
  printf("\n");
  for (i = 0; i < 26; i++) {
    printf("%c: %3d\n", sort[i][0] + 'a', sort[i][1]);
  }
}


x86 assembly (clang, -O0):
<create_letter_distribution_diagram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a80,%rsp
movl   $0x61,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x1a,-0x4(%rbp)
jge    116a <create_letter_distribution_diagram+0x4a>
mov    -0x10(%rbp),%eax
mov    %al,%cl
movslq -0x4(%rbp),%rax
mov    %cl,-0x7a80(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1139 <create_letter_distribution_diagram+0x19>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1a,-0x4(%rbp)
jge    1195 <create_letter_distribution_diagram+0x75>
movslq -0x4(%rbp),%rax
movl   $0x0,-0x80(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <create_letter_distribution_diagram+0x51>
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x10(%rbp)
mov    0x2e3b(%rip),%rcx
cmp    (%rcx),%eax
je     122c <create_letter_distribution_diagram+0x10c>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1a,-0x4(%rbp)
jge    1219 <create_letter_distribution_diagram+0xf9>
mov    -0x10(%rbp),%eax
movslq -0x4(%rbp),%rcx
movsbl -0x7a80(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
je     11f7 <create_letter_distribution_diagram+0xd7>
mov    -0x10(%rbp),%eax
movslq -0x4(%rbp),%rcx
movsbl -0x7a80(%rbp,%rcx,1),%ecx
ff
add    $0xffffffe0,%ecx
cmp    %ecx,%eax
jne    1206 <create_letter_distribution_diagram+0xe6>
movslq -0x4(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
jmp    120b <create_letter_distribution_diagram+0xeb>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11bc <create_letter_distribution_diagram+0x9c>
jmp    121e <create_letter_distribution_diagram+0xfe>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    119c <create_letter_distribution_diagram+0x7c>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1a,-0x4(%rbp)
jge    1285 <create_letter_distribution_diagram+0x165>
movslq -0x4(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%ecx
movslq -0x4(%rbp),%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
movslq -0x4(%rbp),%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1233 <create_letter_distribution_diagram+0x113>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1a,-0x4(%rbp)
jge    14d7 <create_letter_distribution_diagram+0x3b7>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x19,%ecx
sub    -0x4(%rbp),%ecx
cmp    %ecx,%eax
jge    14c4 <create_letter_distribution_diagram+0x3a4>
movslq -0x8(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rdx
lea    -0x7a60(%rbp),%rcx
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rcx
cmp    0x4(%rcx),%eax
jge    14b1 <create_letter_distribution_diagram+0x391>
movslq -0x8(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    0x4(%rax),%ecx
movslq -0x8(%rbp),%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
movslq -0x8(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%ecx
movslq -0x8(%rbp),%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
movslq -0x8(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rdx
lea    -0x7a60(%rbp),%rcx
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rcx
cmp    0x4(%rcx),%eax
jne    14ac <create_letter_distribution_diagram+0x38c>
movslq -0x8(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rdx
lea    -0x7a60(%rbp),%rcx
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rcx
cmp    (%rcx),%eax
jle    14a7 <create_letter_distribution_diagram+0x387>
movslq -0x8(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%ecx
movslq -0x8(%rbp),%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
jmp    14ac <create_letter_distribution_diagram+0x38c>
jmp    14b1 <create_letter_distribution_diagram+0x391>
jmp    14b6 <create_letter_distribution_diagram+0x396>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    129d <create_letter_distribution_diagram+0x17d>
jmp    14c9 <create_letter_distribution_diagram+0x3a9>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    128c <create_letter_distribution_diagram+0x16c>
lea    0xb29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1a,-0x4(%rbp)
jge    1544 <create_letter_distribution_diagram+0x424>
movslq -0x4(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
add    $0x61,%esi
movslq -0x4(%rbp),%rcx
lea    -0x7a60(%rbp),%rax
imul   $0x4b0,%rcx,%rcx
add    %rcx,%rax
mov    0x4(%rax),%edx
lea    0xad1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    14ec <create_letter_distribution_diagram+0x3cc>
add    $0x7a80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_letter_distribution_diagram>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x7a70,%rsp
movdqa 0xeb9(%rip),%xmm0
movdqa %xmm0,(%rsp)
movabs $0x7877767574737271,%rax
76 77 78
mov    %rax,0x10(%rsp)
movw   $0x7a79,0x18(%rsp)
pxor   %xmm0,%xmm0
movdqa %xmm0,0x20(%rsp)
movdqa %xmm0,0x30(%rsp)
movdqa %xmm0,0x40(%rsp)
movdqa %xmm0,0x50(%rsp)
movdqa %xmm0,0x60(%rsp)
movdqa %xmm0,0x70(%rsp)
movq   $0x0,0x80(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e44(%rip),%r14
cmp    (%r14),%eax
jne    12bb <create_letter_distribution_diagram+0x18b>
lea    0x544(%rsp),%rax
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp,%rcx,4),%edx
mov    %edx,-0x4b0(%rax)
mov    %ecx,-0x4b4(%rax)
mov    0x24(%rsp,%rcx,4),%edx
mov    %edx,(%rax)
lea    0x1(%rcx),%edx
mov    %edx,-0x4(%rax)
add    $0x960,%rax
add    $0x2,%rcx
cmp    $0x1a,%rcx
jne    11c0 <create_letter_distribution_diagram+0x90>
lea    0x544(%rsp),%r8
xor    %ecx,%ecx
jmp    120a <create_letter_distribution_diagram+0xda>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rcx
cmp    $0x1a,%rcx
je     1264 <create_letter_distribution_diagram+0x134>
cmp    $0x18,%rcx
ja     1200 <create_letter_distribution_diagram+0xd0>
mov    $0x19,%edx
sub    %rcx,%rdx
mov    0x94(%rsp),%ebx
mov    %r8,%rdi
xor    %ebp,%ebp
jmp    1256 <create_letter_distribution_diagram+0x126>
cs nopw 0x0(%rax,%rax,1)
mov    %esi,-0x4b0(%rdi)
mov    %ebx,(%rdi)
mov    -0x4b4(%rdi),%esi
mov    -0x4(%rdi),%eax
mov    %eax,-0x4b4(%rdi)
mov    %esi,-0x4(%rdi)
add    $0x4b0,%rdi
cmp    %rdx,%rbp
jae    1200 <create_letter_distribution_diagram+0xd0>
add    $0x1,%rbp
mov    (%rdi),%esi
cmp    %esi,%ebx
jl     1230 <create_letter_distribution_diagram+0x100>
mov    %esi,%ebx
jmp    124a <create_letter_distribution_diagram+0x11a>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%ebp
lea    0xda6(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    0x8c(%rsp,%rbp,1),%esi
mov    0x90(%rsp,%rbp,1),%edx
add    $0x61,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x4b0,%rbp
cmp    $0x79e4,%rbp
jne    1280 <create_letter_distribution_diagram+0x150>
add    $0x7a70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
movsbl 0x18(%rsp),%ebx
lea    -0x20(%rbx),%r15d
movsbl 0x19(%rsp),%ebp
lea    -0x20(%rbp),%r12d
movdqa 0xd3b(%rip),%xmm3
jmp    1300 <create_letter_distribution_diagram+0x1d0>
nopw   0x0(%rax,%rax,1)
addl   $0x1,0x84(%rsp)
01
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%r14),%eax
movdqa 0xd16(%rip),%xmm3
je     11ad <create_letter_distribution_diagram+0x7d>
movd   %eax,%xmm0
pshufd $0x0,%xmm0,%xmm0
xor    %ecx,%ecx
jmp    131a <create_letter_distribution_diagram+0x1ea>
nopl   (%rax)
add    $0x4,%rcx
cmp    $0x18,%rcx
je     1380 <create_letter_distribution_diagram+0x250>
movd   (%rsp,%rcx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm1
movdqa %xmm0,%xmm2
pcmpeqd %xmm1,%xmm2
paddd  %xmm3,%xmm1
pcmpeqd %xmm0,%xmm1
por    %xmm2,%xmm1
movd   %xmm1,%edx
test   $0x1,%dl
je     134e <create_letter_distribution_diagram+0x21e>
addl   $0x1,0x20(%rsp,%rcx,4)
pextrw $0x2,%xmm1,%edx
test   $0x1,%dl
je     135d <create_letter_distribution_diagram+0x22d>
addl   $0x1,0x24(%rsp,%rcx,4)
pextrw $0x4,%xmm1,%edx
test   $0x1,%dl
je     136c <create_letter_distribution_diagram+0x23c>
addl   $0x1,0x28(%rsp,%rcx,4)
pextrw $0x6,%xmm1,%edx
test   $0x1,%dl
je     1310 <create_letter_distribution_diagram+0x1e0>
addl   $0x1,0x2c(%rsp,%rcx,4)
jmp    1310 <create_letter_distribution_diagram+0x1e0>
nopl   (%rax)
cmp    %ebx,%eax
je     1389 <create_letter_distribution_diagram+0x259>
cmp    %r15d,%eax
jne    1391 <create_letter_distribution_diagram+0x261>
addl   $0x1,0x80(%rsp)
01
cmp    %ebp,%eax
je     12e0 <create_letter_distribution_diagram+0x1b0>
cmp    %r12d,%eax
jne    12e8 <create_letter_distribution_diagram+0x1b8>
jmp    12e0 <create_letter_distribution_diagram+0x1b0>

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

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