#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 *, char, int);
int strlen(char *);
int create_letter_distribution_diagram(char *string) {
  int counter, num[26], length, position, max, help;
  char letters[26], helpchar;
  for (counter = 0; counter < 26; counter++)
    num[counter] = 0;
  for (counter = 0; counter < 26; counter++)
    letters[counter] = counter + 'a';
  length = strlen(string);
  for (counter = 0; counter < length; counter++) {
    if (string[counter] >= 'a' && string[counter] <= 'z')
      num[string[counter] - 'a']++;
    if (string[counter] >= 'A' && string[counter] <= 'Z')
      num[string[counter] - 'A']++;
  }
  for (position = 0; position < 26; position++) {
    max = position;
    for (counter = position + 1; counter < 26; counter++) {
      if (num[counter] > num[max])
        max = counter;
    }
    help = num[position];
    num[position] = num[max];
    num[max] = help;
    helpchar = letters[position];
    letters[position] = letters[max];
    letters[max] = helpchar;
  }
  for (counter = 0; counter < 26; counter++) {
    for (position = 0; position < 26; position++) {
      if (position < 26) {
        if (num[position] == num[position + 1]) {
          if (letters[position] > letters[position + 1]) {
            help = num[position];
            num[position] = num[position + 1];
            num[position + 1] = help;
            helpchar = letters[position];
            letters[position] = letters[position + 1];
            letters[position + 1] = helpchar;
          }
        }
      }
    }
  }
  for (position = 0; position < 26; position++)
    printf("%c-->%d\n", letters[position], num[position]);
  return 0;
}


x86 assembly (clang, -O0):
<create_letter_distribution_diagram>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    115a <create_letter_distribution_diagram+0x3a>
movslq -0xc(%rbp),%rax
movl   $0x0,-0x80(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <create_letter_distribution_diagram+0x16>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    118c <create_letter_distribution_diagram+0x6c>
mov    -0xc(%rbp),%eax
add    $0x61,%eax
mov    %al,%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0xb0(%rbp,%rax,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1161 <create_letter_distribution_diagram+0x41>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x84(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    1250 <create_letter_distribution_diagram+0x130>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     11f7 <create_letter_distribution_diagram+0xd7>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jg     11f7 <create_letter_distribution_diagram+0xd7>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x61,%eax
cltq
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x41,%eax
jl     123d <create_letter_distribution_diagram+0x11d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jg     123d <create_letter_distribution_diagram+0x11d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x41,%eax
cltq
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
jmp    1242 <create_letter_distribution_diagram+0x122>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a2 <create_letter_distribution_diagram+0x82>
movl   $0x0,-0x88(%rbp)
cmpl   $0x1a,-0x88(%rbp)
jge    134e <create_letter_distribution_diagram+0x22e>
mov    -0x88(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    12be <create_letter_distribution_diagram+0x19e>
movslq -0xc(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
movslq -0x8c(%rbp),%rcx
cmp    -0x80(%rbp,%rcx,4),%eax
jle    12ab <create_letter_distribution_diagram+0x18b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8c(%rbp)
jmp    12b0 <create_letter_distribution_diagram+0x190>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    127f <create_letter_distribution_diagram+0x15f>
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
mov    %eax,-0x90(%rbp)
movslq -0x8c(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%ecx
movslq -0x88(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x90(%rbp),%ecx
movslq -0x8c(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
movslq -0x88(%rbp),%rax
mov    -0xb0(%rbp,%rax,1),%al
mov    %al,-0xb1(%rbp)
movslq -0x8c(%rbp),%rax
mov    -0xb0(%rbp,%rax,1),%cl
movslq -0x88(%rbp),%rax
mov    %cl,-0xb0(%rbp,%rax,1)
mov    -0xb1(%rbp),%cl
movslq -0x8c(%rbp),%rax
mov    %cl,-0xb0(%rbp,%rax,1)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    125a <create_letter_distribution_diagram+0x13a>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    1491 <create_letter_distribution_diagram+0x371>
movl   $0x0,-0x88(%rbp)
cmpl   $0x1a,-0x88(%rbp)
jge    147e <create_letter_distribution_diagram+0x35e>
cmpl   $0x1a,-0x88(%rbp)
jge    1465 <create_letter_distribution_diagram+0x345>
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0x80(%rbp,%rcx,4),%eax
jne    1460 <create_letter_distribution_diagram+0x340>
movslq -0x88(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%eax
ff
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0xb0(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jle    145b <create_letter_distribution_diagram+0x33b>
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
mov    %eax,-0x90(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x80(%rbp,%rax,4),%ecx
movslq -0x88(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x90(%rbp),%ecx
mov    -0x88(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x80(%rbp,%rax,4)
movslq -0x88(%rbp),%rax
mov    -0xb0(%rbp,%rax,1),%al
mov    %al,-0xb1(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0xb0(%rbp,%rax,1),%cl
movslq -0x88(%rbp),%rax
mov    %cl,-0xb0(%rbp,%rax,1)
mov    -0xb1(%rbp),%cl
mov    -0x88(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0xb0(%rbp,%rax,1)
jmp    1460 <create_letter_distribution_diagram+0x340>
jmp    1465 <create_letter_distribution_diagram+0x345>
jmp    146a <create_letter_distribution_diagram+0x34a>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1369 <create_letter_distribution_diagram+0x249>
jmp    1483 <create_letter_distribution_diagram+0x363>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1355 <create_letter_distribution_diagram+0x235>
movl   $0x0,-0x88(%rbp)
cmpl   $0x1a,-0x88(%rbp)
jge    14e4 <create_letter_distribution_diagram+0x3c4>
movslq -0x88(%rbp),%rax
mov    -0xb0(%rbp,%rax,1),%al
movslq -0x88(%rbp),%rcx
mov    -0x80(%rbp,%rcx,4),%edx
lea    0xb38(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    149b <create_letter_distribution_diagram+0x37b>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_letter_distribution_diagram>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movq   $0x0,0x80(%rsp)
movaps 0xe9f(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x7877767574737271,%rax
76 77 78
mov    %rax,0x10(%rsp)
movw   $0x7a79,0x18(%rsp)
call   1030 <strlen@plt>
test   %eax,%eax
jle    11cf <create_letter_distribution_diagram+0xaf>
mov    $0xffffff9f,%edx
mov    %eax,%eax
xor    %ecx,%ecx
lea    0x20(%rdx),%r8
jmp    11b0 <create_letter_distribution_diagram+0x90>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %esi,%edi
addl   $0x1,0x20(%rsp,%rdi,4)
add    $0x1,%rcx
cmp    %rcx,%rax
je     11cf <create_letter_distribution_diagram+0xaf>
movsbq (%rbx,%rcx,1),%rsi
lea    -0x61(%rsi),%edx
mov    $0xffffff9f,%edi
cmp    $0x1a,%dl
jb     11a0 <create_letter_distribution_diagram+0x80>
lea    -0x41(%rsi),%edx
mov    %r8,%rdi
cmp    $0x19,%dl
jbe    11a0 <create_letter_distribution_diagram+0x80>
jmp    11a7 <create_letter_distribution_diagram+0x87>
mov    $0x1,%r9d
xor    %ecx,%ecx
jmp    120e <create_letter_distribution_diagram+0xee>
nopl   0x0(%rax)
mov    %ecx,%ebx
mov    0x20(%rsp,%rcx,4),%eax
movslq %ebx,%rdx
mov    0x20(%rsp,%rdx,4),%esi
mov    %esi,0x20(%rsp,%rcx,4)
mov    %eax,0x20(%rsp,%rdx,4)
mov    (%rsp,%rcx,1),%al
mov    (%rsp,%rdx,1),%bl
mov    %bl,(%rsp,%rcx,1)
mov    %al,(%rsp,%rdx,1)
add    $0x1,%r9
mov    %r8,%rcx
cmp    $0x1a,%r8
je     123f <create_letter_distribution_diagram+0x11f>
lea    0x1(%rcx),%r8
cmp    $0x18,%rcx
ja     11e0 <create_letter_distribution_diagram+0xc0>
mov    %r9,%rsi
mov    %ecx,%edi
jmp    122c <create_letter_distribution_diagram+0x10c>
nop
add    $0x1,%rsi
mov    %ebx,%edi
cmp    $0x1a,%rsi
je     11e2 <create_letter_distribution_diagram+0xc2>
mov    0x20(%rsp,%rsi,4),%edx
movslq %edi,%rax
mov    %esi,%ebx
cmp    0x20(%rsp,%rax,4),%edx
jg     1220 <create_letter_distribution_diagram+0x100>
mov    %edi,%ebx
jmp    1220 <create_letter_distribution_diagram+0x100>
xor    %edi,%edi
jmp    1258 <create_letter_distribution_diagram+0x138>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%edi
cmp    $0x1a,%edi
je     12a2 <create_letter_distribution_diagram+0x182>
mov    $0x1,%ecx
mov    0x20(%rsp),%edx
jmp    127a <create_letter_distribution_diagram+0x15a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rcx
cmp    $0x1b,%rcx
je     1250 <create_letter_distribution_diagram+0x130>
mov    %edx,%esi
mov    0x20(%rsp,%rcx,4),%edx
cmp    %edx,%esi
jne    1270 <create_letter_distribution_diagram+0x150>
movzbl -0x1(%rsp,%rcx,1),%ebx
movzbl (%rsp,%rcx,1),%eax
cmp    %al,%bl
jle    1270 <create_letter_distribution_diagram+0x150>
mov    %esi,0x1c(%rsp,%rcx,4)
mov    %esi,0x20(%rsp,%rcx,4)
mov    %al,-0x1(%rsp,%rcx,1)
mov    %bl,(%rsp,%rcx,1)
jmp    1270 <create_letter_distribution_diagram+0x150>
xor    %ebx,%ebx
lea    0xd65(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%rsp,%rbx,1),%esi
mov    0x20(%rsp,%rbx,4),%edx
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x1a,%rbx
jne    12b0 <create_letter_distribution_diagram+0x190>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

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

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