#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 /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdin;
int strlen(char *);
void create_letter_distribution_diagram(void) {
  char select, input[10000], letters[27], temp_char;
  int occures[27], n = 1, c, i, temp;
  while (n != 27) {
    letters[n] = 96 + n;
    n++;
  }
  fgets(input, 10000, stdin);
  c = 1;
  i = 0;
  n = strlen(input);
  select = input[0];
  if (select != ' ') {
    if (select > 64 && select < 91) {
      i = select - 64;
      occures[i]++;
    }
    if (select > 96 && select < 123) {
      i = select - 96;
      occures[i]++;
    }
  }
  while (c != n) {
    select = input[c];
    if (select != ' ') {
      if (select > 64 && select < 91) {
        i = select - 64;
        occures[i]++;
      }
      if (select > 96 && select < 123) {
        i = select - 96;
        occures[i]++;
      }
    }
    c++;
  }
  for (c = 1; c < (27 - 1); c++) {
    for (i = 1; i < 27 - c - 1; i++) {
      if (occures[i] < occures[i + 1]) {
        temp = occures[i];
        occures[i] = occures[i + 1];
        occures[i + 1] = temp;
        temp_char = letters[i];
        letters[i] = letters[i + 1];
        letters[i + 1] = temp_char;
      }
      if (occures[i] == occures[i + 1]) {
        if (letters[i] > letters[i + 1]) {
          temp = occures[i];
          occures[i] = occures[i + 1];
          occures[i + 1] = temp;
          temp_char = letters[i];
          letters[i] = letters[i + 1];
          letters[i + 1] = temp_char;
        }
      }
    }
  }
  n = 27;
  for (c = 1; c < n; c++) {
    printf("\n%c: ", letters[c]);
    printf("%d", occures[c]);
  }
}


x86 assembly (clang, -O0):
<create_letter_distribution_diagram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x27c0,%rsp
movl   $0x1,-0x27b4(%rbp)
cmpl   $0x1b,-0x27b4(%rbp)
je     117f <create_letter_distribution_diagram+0x4f>
mov    -0x27b4(%rbp),%eax
add    $0x60,%eax
mov    %al,%cl
movslq -0x27b4(%rbp),%rax
mov    %cl,-0x2740(%rbp,%rax,1)
mov    -0x27b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27b4(%rbp)
jmp    1145 <create_letter_distribution_diagram+0x15>
lea    -0x2720(%rbp),%rdi
mov    0x2e5b(%rip),%rax
mov    (%rax),%edx
mov    $0x2710,%esi
call   1050 <fgets@plt>
movl   $0x1,-0x27b8(%rbp)
movl   $0x0,-0x27bc(%rbp)
lea    -0x2720(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x27b4(%rbp)
mov    -0x2720(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
je     1258 <create_letter_distribution_diagram+0x128>
movsbl -0x1(%rbp),%eax
cmp    $0x40,%eax
jle    1214 <create_letter_distribution_diagram+0xe4>
movsbl -0x1(%rbp),%eax
cmp    $0x5b,%eax
jge    1214 <create_letter_distribution_diagram+0xe4>
movsbl -0x1(%rbp),%eax
sub    $0x40,%eax
mov    %eax,-0x27bc(%rbp)
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x27b0(%rbp,%rax,4)
movsbl -0x1(%rbp),%eax
cmp    $0x60,%eax
jle    1253 <create_letter_distribution_diagram+0x123>
movsbl -0x1(%rbp),%eax
cmp    $0x7b,%eax
jge    1253 <create_letter_distribution_diagram+0x123>
movsbl -0x1(%rbp),%eax
sub    $0x60,%eax
mov    %eax,-0x27bc(%rbp)
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x27b0(%rbp,%rax,4)
jmp    1258 <create_letter_distribution_diagram+0x128>
jmp    125d <create_letter_distribution_diagram+0x12d>
mov    -0x27b8(%rbp),%eax
cmp    -0x27b4(%rbp),%eax
je     1324 <create_letter_distribution_diagram+0x1f4>
movslq -0x27b8(%rbp),%rax
mov    -0x2720(%rbp,%rax,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
je     1310 <create_letter_distribution_diagram+0x1e0>
movsbl -0x1(%rbp),%eax
cmp    $0x40,%eax
jle    12cc <create_letter_distribution_diagram+0x19c>
movsbl -0x1(%rbp),%eax
cmp    $0x5b,%eax
jge    12cc <create_letter_distribution_diagram+0x19c>
movsbl -0x1(%rbp),%eax
sub    $0x40,%eax
mov    %eax,-0x27bc(%rbp)
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x27b0(%rbp,%rax,4)
movsbl -0x1(%rbp),%eax
cmp    $0x60,%eax
jle    130b <create_letter_distribution_diagram+0x1db>
movsbl -0x1(%rbp),%eax
cmp    $0x7b,%eax
jge    130b <create_letter_distribution_diagram+0x1db>
movsbl -0x1(%rbp),%eax
sub    $0x60,%eax
mov    %eax,-0x27bc(%rbp)
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x27b0(%rbp,%rax,4)
jmp    1310 <create_letter_distribution_diagram+0x1e0>
mov    -0x27b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27b8(%rbp)
jmp    125d <create_letter_distribution_diagram+0x12d>
movl   $0x1,-0x27b8(%rbp)
cmpl   $0x1a,-0x27b8(%rbp)
jge    1541 <create_letter_distribution_diagram+0x411>
movl   $0x1,-0x27bc(%rbp)
mov    -0x27bc(%rbp),%eax
mov    $0x1b,%ecx
sub    -0x27b8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1528 <create_letter_distribution_diagram+0x3f8>
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%eax
mov    -0x27bc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0x27b0(%rbp,%rcx,4),%eax
jge    1420 <create_letter_distribution_diagram+0x2f0>
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%eax
mov    %eax,-0x27c0(%rbp)
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x27b0(%rbp,%rax,4),%ecx
movslq -0x27bc(%rbp),%rax
mov    %ecx,-0x27b0(%rbp,%rax,4)
mov    -0x27c0(%rbp),%ecx
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x27b0(%rbp,%rax,4)
movslq -0x27bc(%rbp),%rax
mov    -0x2740(%rbp,%rax,1),%al
mov    %al,-0x2741(%rbp)
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x2740(%rbp,%rax,1),%cl
movslq -0x27bc(%rbp),%rax
mov    %cl,-0x2740(%rbp,%rax,1)
mov    -0x2741(%rbp),%cl
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x2740(%rbp,%rax,1)
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%eax
mov    -0x27bc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0x27b0(%rbp,%rcx,4),%eax
jne    150f <create_letter_distribution_diagram+0x3df>
movslq -0x27bc(%rbp),%rax
movsbl -0x2740(%rbp,%rax,1),%eax
ff
mov    -0x27bc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0x2740(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jle    150a <create_letter_distribution_diagram+0x3da>
movslq -0x27bc(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%eax
mov    %eax,-0x27c0(%rbp)
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x27b0(%rbp,%rax,4),%ecx
movslq -0x27bc(%rbp),%rax
mov    %ecx,-0x27b0(%rbp,%rax,4)
mov    -0x27c0(%rbp),%ecx
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x27b0(%rbp,%rax,4)
movslq -0x27bc(%rbp),%rax
mov    -0x2740(%rbp,%rax,1),%al
mov    %al,-0x2741(%rbp)
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x2740(%rbp,%rax,1),%cl
movslq -0x27bc(%rbp),%rax
mov    %cl,-0x2740(%rbp,%rax,1)
mov    -0x2741(%rbp),%cl
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x2740(%rbp,%rax,1)
jmp    150f <create_letter_distribution_diagram+0x3df>
jmp    1514 <create_letter_distribution_diagram+0x3e4>
mov    -0x27bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27bc(%rbp)
jmp    1345 <create_letter_distribution_diagram+0x215>
jmp    152d <create_letter_distribution_diagram+0x3fd>
mov    -0x27b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27b8(%rbp)
jmp    132e <create_letter_distribution_diagram+0x1fe>
movl   $0x1b,-0x27b4(%rbp)
movl   $0x1,-0x27b8(%rbp)
mov    -0x27b8(%rbp),%eax
cmp    -0x27b4(%rbp),%eax
jge    15b0 <create_letter_distribution_diagram+0x480>
movslq -0x27b8(%rbp),%rax
movsbl -0x2740(%rbp,%rax,1),%esi
ff
lea    0xa83(%rip),%rdi
call   1040 <printf@plt>
movslq -0x27b8(%rbp),%rax
mov    -0x27b0(%rbp,%rax,4),%esi
lea    0xa6f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x27b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27b8(%rbp)
jmp    1555 <create_letter_distribution_diagram+0x425>
add    $0x27c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_letter_distribution_diagram>:
push   %r15
push   %r14
push   %rbx
sub    $0x27a0,%rsp
movaps 0xebd(%rip),%xmm0
movups %xmm0,0x1(%rsp)
movabs $0x7877767574737271,%rax
76 77 78
mov    %rax,0x11(%rsp)
movw   $0x7a79,0x19(%rsp)
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
lea    0x90(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jne    125f <create_letter_distribution_diagram+0x12f>
mov    $0x1,%r8d
jmp    11aa <create_letter_distribution_diagram+0x7a>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r8
cmp    $0x1a,%r8
je     121c <create_letter_distribution_diagram+0xec>
cmp    $0x18,%r8
ja     11a0 <create_letter_distribution_diagram+0x70>
mov    $0x1a,%ecx
sub    %r8,%rcx
mov    $0x1,%edi
mov    0x24(%rsp),%ebx
jmp    11d5 <create_letter_distribution_diagram+0xa5>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %rcx,%rdi
jae    11a0 <create_letter_distribution_diagram+0x70>
mov    %rdi,%rsi
mov    0x24(%rsp,%rdi,4),%edx
cmp    %edx,%ebx
jge    11f0 <create_letter_distribution_diagram+0xc0>
mov    %edx,0x20(%rsp,%rsi,4)
mov    %ebx,0x24(%rsp,%rsi,4)
rolw   $0x8,(%rsp,%rsi,1)
jmp    11f6 <create_letter_distribution_diagram+0xc6>
nop
mov    %edx,%eax
mov    %ebx,%edx
mov    %eax,%ebx
lea    0x1(%rsi),%rdi
cmp    %ebx,%edx
jne    11d0 <create_letter_distribution_diagram+0xa0>
movzbl (%rsp,%rsi,1),%edx
movzbl 0x1(%rsp,%rsi,1),%eax
cmp    %al,%dl
jle    11d0 <create_letter_distribution_diagram+0xa0>
mov    %ebx,0x20(%rsp,%rsi,4)
mov    %ebx,0x24(%rsp,%rsi,4)
mov    %al,(%rsp,%rsi,1)
mov    %dl,0x1(%rsp,%rsi,1)
jmp    11d0 <create_letter_distribution_diagram+0xa0>
mov    $0x1,%ebx
lea    0xde8(%rip),%r14
lea    0xde7(%rip),%r15
nop
movsbl (%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    0x20(%rsp,%rbx,4),%esi
mov    %r15,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x1b,%rbx
jne    1230 <create_letter_distribution_diagram+0x100>
add    $0x27a0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
mov    $0xffffffa0,%edx
mov    %eax,%eax
mov    $0x1,%ecx
add    $0x20,%rdx
jmp    1294 <create_letter_distribution_diagram+0x164>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %esi,%edi
addl   $0x1,0x20(%rsp,%rdi,4)
add    $0x1,%rcx
cmp    %rcx,%rax
je     118d <create_letter_distribution_diagram+0x5d>
movsbq 0x90(%rsp,%rcx,1),%rsi
cmp    $0x20,%rsi
je     1287 <create_letter_distribution_diagram+0x157>
lea    -0x41(%rsi),%ebx
mov    %rdx,%rdi
cmp    $0x1a,%bl
jb     1280 <create_letter_distribution_diagram+0x150>
lea    -0x61(%rsi),%ebx
mov    $0xffffffa0,%edi
cmp    $0x19,%bl
jbe    1280 <create_letter_distribution_diagram+0x150>
jmp    1287 <create_letter_distribution_diagram+0x157>

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

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