#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 *, ...);
void print_count(int *count) {
  int i;
  printf("\n");
  for (i = 0; i < 26; i++) {
    if (count[i] > 0) {
      printf("The number of %c 's = %d\n", (i + 97), count[i]);
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    117f <print_count+0x6f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    116c <print_count+0x5c>
mov    -0xc(%rbp),%esi
add    $0x61,%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1171 <print_count+0x61>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <print_count+0x21>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_count>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
jmp    114a <print_count+0x2a>
nopl   (%rax)
add    $0x1,%rbx
cmp    $0x1a,%rbx
je     1161 <print_count+0x41>
mov    (%r15,%rbx,4),%edx
test   %edx,%edx
jle    1140 <print_count+0x20>
lea    0x61(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1140 <print_count+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [26 x i8] c"The number of %c 's = %d\0A\00"
define void @print_count(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %5
5: ; preds = %25, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 26
br i1 %7, label %8, label %28
8: ; preds = %5
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %24
15: ; preds = %8
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 97
%18 = load i32*, i32** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %22)
br label %24
24: ; preds = %15, %8
br label %25
25: ; preds = %24
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %5
28: ; preds = %5
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [26 x i8] c"The number of %c 's = %d\0A\00"
define void @print_count(i32* nocapture %0) {
%2 = tail call i32 @putchar(i32 10)
br label %3
3: ; preds = %1, %12
%4 = phi i64 [ 0, %1 ], [ %13, %12 ]
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = trunc i64 %4 to i32
%10 = add i32 %9, 97
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %6)
br label %12
12: ; preds = %3, %8
%13 = add nuw nsw i64 %4, 1
%14 = icmp eq i64 %13, 26
br i1 %14, label %15, label %3
15: ; preds = %12
%16 = tail call i32 @putchar(i32 10)
ret void
}