#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 main() {
  char *string = "aouihuiahsudasduihqmdoiqjnduiamsdoqnwuidamodkjwodkaposdj";
  int quantidade[26] = {0};
  for (; *string != '\0'; string++) {
    quantidade[*string - 'a']++;
  }
  for (int i = 0; i < 26; i++) {
    printf("%c => %d\n", i + 'a', quantidade[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1185 <main+0x65>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x61,%eax
cltq
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114d <main+0x2d>
movl   $0x0,-0x84(%rbp)
cmpl   $0x1a,-0x84(%rbp)
jge    11d0 <main+0xb0>
mov    -0x84(%rbp),%esi
add    $0x61,%esi
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%edx
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    118f <main+0x6f>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x60(%rsp)
mov    $0x61,%dl
mov    $0x2,%eax
lea    0xeb2(%rip),%rcx
xchg   %ax,%ax
movsbq %dl,%rdx
addl   $0x1,-0x184(%rsp,%rdx,4)
01
movsbq -0x1(%rax,%rcx,1),%rdx
addl   $0x1,-0x184(%rsp,%rdx,4)
01
movzbl (%rax,%rcx,1),%edx
add    $0x2,%rax
cmp    $0x3a,%rax
jne    1150 <main+0x40>
xor    %ebx,%ebx
lea    0xeb8(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rsp,%rbx,4),%edx
lea    0x61(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x1a,%rbx
jne    1190 <main+0x80>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [57 x i8] c"aouihuiahsudasduihqmdoiqjnduiamsdoqnwuidamodkjwodkaposdj\00"
@.str.1 = [10 x i8] c"%c => %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [26 x i32]
%4 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = bitcast [26 x i32]* %3 to i8*
br label %6
6: ; preds = %20, %0
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %6
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 97
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [26 x i32], [26 x i32]* %3, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
store i32 %19, i32* %17
br label %20
20: ; preds = %11
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
br label %6
23: ; preds = %6
store i32 0, i32* %4
br label %24
24: ; preds = %35, %23
%25 = load i32, i32* %4
%26 = icmp slt i32 %25, 26
br i1 %26, label %27, label %38
27: ; preds = %24
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 97
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [26 x i32], [26 x i32]* %3, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %29, i32 %33)
br label %35
35: ; preds = %27
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %24
38: ; preds = %24
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@.str = [57 x i8] c"aouihuiahsudasduihqmdoiqjnduiamsdoqnwuidamodkjwodkaposdj\00"
@.str.1 = [10 x i8] c"%c => %d\0A\00"
define i32 @main() {
%1 = alloca [26 x i32]
%2 = bitcast [26 x i32]* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = phi i8 [ 97, %0 ], [ %19, %3 ]
%5 = phi i8* [ getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), %0 ], [ %18, %3 ]
%6 = sext i8 %4 to i64
%7 = add nsw i64 %6, -97
%8 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i64
%14 = add nsw i64 %13, -97
%15 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %15
%18 = getelementptr inbounds i8, i8* %5, i64 2
%19 = load i8, i8* %18
%20 = icmp eq i8* %18, getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 56)
br i1 %20, label %22, label %3
21: ; preds = %22
ret i32 0
22: ; preds = %3, %22
%23 = phi i64 [ %29, %22 ], [ 0, %3 ]
%24 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = trunc i64 %23 to i32
%27 = add i32 %26, 97
%28 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %25)
%29 = add nuw nsw i64 %23, 1
%30 = icmp eq i64 %29, 26
br i1 %30, label %21, label %22
}