#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*/ printf(char *, int, int);
int strlen(char *);
int create_letter_distribution_diagram(char sentence[1000]) {
  int length = strlen(sentence);
  int letters[30];
  int count = 0;
  int ascii_letters[30];
  for (; count < 26; count++) {
    letters[count] = 0;
  }
  for (count = 0; count < 26; count++) {
    ascii_letters[count] = count + 97;
  }
  for (length--; length >= 0; length--) {
    int ascii_uppercase = 65;
    int ascii_lowercase = 97;
    for (; ascii_uppercase < 91 && ascii_lowercase < 123;
         ascii_uppercase++, ascii_lowercase++) {
      if (sentence[length] == ascii_uppercase) {
        count = ascii_uppercase - 65;
        letters[count]++;
      }
      if (sentence[length] == ascii_lowercase) {
        count = ascii_lowercase - 97;
        letters[count]++;
      }
    }
  }
  for (count = 0; count < 26; count++) {
    int min = count;
    int helper;
    int help_sort;
    for (helper = count + 1; helper < 26; helper++)
      if (letters[min] < letters[helper])
        min = helper;
    help_sort = letters[min];
    letters[min] = letters[count];
    letters[count] = help_sort;
    help_sort = ascii_letters[min];
    ascii_letters[min] = ascii_letters[count];
    ascii_letters[count] = help_sort;
  }
  for (count = 0; count < 26; count++) {
    int helper;
    for (helper = count + 1; helper < 26; helper++)
      if (letters[count] == letters[helper] &&
          ascii_letters[count] > ascii_letters[helper]) {
        int help_sort = ascii_letters[count];
        ascii_letters[count] = ascii_letters[helper];
        ascii_letters[helper] = help_sort;
      }
  }
  for (count = 0; count < 26; count++) {
    printf("%c %d\n", ascii_letters[count], letters[count]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<create_letter_distribution_diagram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x94(%rbp)
cmpl   $0x1a,-0x94(%rbp)
jge    1178 <create_letter_distribution_diagram+0x58>
movslq -0x94(%rbp),%rax
movl   $0x0,-0x90(%rbp,%rax,4)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1145 <create_letter_distribution_diagram+0x25>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1a,-0x94(%rbp)
jge    11ba <create_letter_distribution_diagram+0x9a>
mov    -0x94(%rbp),%ecx
add    $0x61,%ecx
movslq -0x94(%rbp),%rax
mov    %ecx,-0x110(%rbp,%rax,4)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1182 <create_letter_distribution_diagram+0x62>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     12d2 <create_letter_distribution_diagram+0x1b2>
movl   $0x41,-0x114(%rbp)
movl   $0x61,-0x118(%rbp)
xor    %eax,%eax
cmpl   $0x5b,-0x114(%rbp)
mov    %al,-0x12d(%rbp)
jge    1206 <create_letter_distribution_diagram+0xe6>
cmpl   $0x7b,-0x118(%rbp)
setl   %al
mov    %al,-0x12d(%rbp)
mov    -0x12d(%rbp),%al
test   $0x1,%al
jne    1219 <create_letter_distribution_diagram+0xf9>
jmp    12bf <create_letter_distribution_diagram+0x19f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    -0x114(%rbp),%eax
jne    1258 <create_letter_distribution_diagram+0x138>
mov    -0x114(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x94(%rbp)
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    -0x118(%rbp),%eax
jne    1297 <create_letter_distribution_diagram+0x177>
mov    -0x118(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x94(%rbp)
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x90(%rbp,%rax,4)
jmp    129c <create_letter_distribution_diagram+0x17c>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
mov    -0x118(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x118(%rbp)
jmp    11e1 <create_letter_distribution_diagram+0xc1>
jmp    12c4 <create_letter_distribution_diagram+0x1a4>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    11c3 <create_letter_distribution_diagram+0xa3>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1a,-0x94(%rbp)
jge    13f4 <create_letter_distribution_diagram+0x2d4>
mov    -0x94(%rbp),%eax
mov    %eax,-0x11c(%rbp)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
cmpl   $0x1a,-0x120(%rbp)
jge    1358 <create_letter_distribution_diagram+0x238>
movslq -0x11c(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%eax
movslq -0x120(%rbp),%rcx
cmp    -0x90(%rbp,%rcx,4),%eax
jge    133f <create_letter_distribution_diagram+0x21f>
mov    -0x120(%rbp),%eax
mov    %eax,-0x11c(%rbp)
jmp    1344 <create_letter_distribution_diagram+0x224>
mov    -0x120(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
jmp    1304 <create_letter_distribution_diagram+0x1e4>
movslq -0x11c(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%eax
mov    %eax,-0x124(%rbp)
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%ecx
movslq -0x11c(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x124(%rbp),%ecx
movslq -0x94(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
movslq -0x11c(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%eax
mov    %eax,-0x124(%rbp)
movslq -0x94(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%ecx
movslq -0x11c(%rbp),%rax
mov    %ecx,-0x110(%rbp,%rax,4)
mov    -0x124(%rbp),%ecx
movslq -0x94(%rbp),%rax
mov    %ecx,-0x110(%rbp,%rax,4)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    12dc <create_letter_distribution_diagram+0x1bc>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1a,-0x94(%rbp)
jge    14e1 <create_letter_distribution_diagram+0x3c1>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
cmpl   $0x1a,-0x128(%rbp)
jge    14c8 <create_letter_distribution_diagram+0x3a8>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%eax
movslq -0x128(%rbp),%rcx
cmp    -0x90(%rbp,%rcx,4),%eax
jne    14af <create_letter_distribution_diagram+0x38f>
movslq -0x94(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%eax
movslq -0x128(%rbp),%rcx
cmp    -0x110(%rbp,%rcx,4),%eax
jle    14af <create_letter_distribution_diagram+0x38f>
movslq -0x94(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%eax
mov    %eax,-0x12c(%rbp)
movslq -0x128(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%ecx
movslq -0x94(%rbp),%rax
mov    %ecx,-0x110(%rbp,%rax,4)
mov    -0x12c(%rbp),%ecx
movslq -0x128(%rbp),%rax
mov    %ecx,-0x110(%rbp,%rax,4)
jmp    14b4 <create_letter_distribution_diagram+0x394>
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    141a <create_letter_distribution_diagram+0x2fa>
jmp    14cd <create_letter_distribution_diagram+0x3ad>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    13fe <create_letter_distribution_diagram+0x2de>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1a,-0x94(%rbp)
jge    1534 <create_letter_distribution_diagram+0x414>
movslq -0x94(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%esi
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edx
lea    0xae5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    14eb <create_letter_distribution_diagram+0x3cb>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_letter_distribution_diagram>:
push   %r14
push   %rbx
sub    $0xf8,%rsp
mov    %rdi,%r14
call   1030 <strlen@plt>
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)
movq   $0x0,0x60(%rsp)
movaps 0xe9e(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xe9f(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xea0(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xea2(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movabs $0x7a00000079,%rcx
mov    %rcx,0xe0(%rsp)
test   %eax,%eax
jle    122b <create_letter_distribution_diagram+0x10b>
mov    %eax,%eax
jmp    11d6 <create_letter_distribution_diagram+0xb6>
nop
cmp    $0x2,%rcx
jl     122b <create_letter_distribution_diagram+0x10b>
mov    %rax,%rcx
add    $0xffffffffffffffff,%rax
movsbq -0x1(%r14,%rcx,1),%rdx
mov    %edx,%edx
lea    -0x41(%rdx),%rsi
mov    $0x61,%edi
mov    $0x41,%ebx
jmp    120e <create_letter_distribution_diagram+0xee>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbx
add    $0x1,%rdi
cmp    $0x5b,%rbx
je     11d0 <create_letter_distribution_diagram+0xb0>
sub    $0x1,%rsi
jae    121c <create_letter_distribution_diagram+0xfc>
addl   $0x1,-0x104(%rsp,%rdx,4)
01
cmp    %rdx,%rdi
jne    1200 <create_letter_distribution_diagram+0xe0>
addl   $0x1,-0x184(%rsp,%rdx,4)
01
jmp    1200 <create_letter_distribution_diagram+0xe0>
mov    $0x1,%eax
xor    %ecx,%ecx
jmp    127a <create_letter_distribution_diagram+0x15a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ecx,%ebx
movslq %ebx,%rdx
mov    (%rsp,%rdx,4),%esi
mov    (%rsp,%rcx,4),%edi
mov    %edi,(%rsp,%rdx,4)
mov    %esi,(%rsp,%rcx,4)
mov    0x80(%rsp,%rdx,4),%esi
mov    0x80(%rsp,%rcx,4),%edi
mov    %edi,0x80(%rsp,%rdx,4)
mov    %esi,0x80(%rsp,%rcx,4)
add    $0x1,%rax
mov    %r8,%rcx
cmp    $0x1a,%r8
je     12ad <create_letter_distribution_diagram+0x18d>
lea    0x1(%rcx),%r8
cmp    $0x18,%rcx
ja     1240 <create_letter_distribution_diagram+0x120>
mov    %rax,%rsi
mov    %ecx,%edi
jmp    129c <create_letter_distribution_diagram+0x17c>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
mov    %ebx,%edi
cmp    $0x1a,%rsi
je     1242 <create_letter_distribution_diagram+0x122>
movslq %edi,%rbx
mov    (%rsp,%rbx,4),%edx
mov    %esi,%ebx
cmp    (%rsp,%rsi,4),%edx
jl     1290 <create_letter_distribution_diagram+0x170>
mov    %edi,%ebx
jmp    1290 <create_letter_distribution_diagram+0x170>
mov    $0x1,%eax
xor    %r8d,%r8d
jmp    12ca <create_letter_distribution_diagram+0x1aa>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    $0x1a,%r8
je     1311 <create_letter_distribution_diagram+0x1f1>
mov    %r8,%rdx
add    $0x1,%r8
cmp    $0x18,%rdx
ja     12c0 <create_letter_distribution_diagram+0x1a0>
mov    (%rsp,%rdx,4),%esi
mov    %rax,%rdi
jmp    12ea <create_letter_distribution_diagram+0x1ca>
nop
add    $0x1,%rdi
cmp    $0x1a,%rdi
je     12c0 <create_letter_distribution_diagram+0x1a0>
cmp    (%rsp,%rdi,4),%esi
jne    12e0 <create_letter_distribution_diagram+0x1c0>
mov    0x80(%rsp,%rdx,4),%ebx
mov    0x80(%rsp,%rdi,4),%ecx
cmp    %ecx,%ebx
jle    12e0 <create_letter_distribution_diagram+0x1c0>
mov    %ecx,0x80(%rsp,%rdx,4)
mov    %ebx,0x80(%rsp,%rdi,4)
jmp    12e0 <create_letter_distribution_diagram+0x1c0>
xor    %ebx,%ebx
lea    0xd46(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    0x80(%rsp,%rbx,4),%esi
mov    (%rsp,%rbx,4),%edx
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x1a,%rbx
jne    1320 <create_letter_distribution_diagram+0x200>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r14
ret

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

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