#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);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main() {
  int i = 0;
  int cnt[256];
  char shot[1000];
  fgets(shot, 1000, stdin);
  for (i = 0; i < 256; i++) {
    cnt[i] = 0;
  }
  for (i = 0; i < strlen(shot); i++) {
    if ((shot[i] >= 'A') && (shot[i] <= 'Z')) {
      (cnt[shot[i] + ('a' - 'A')])++;
    } else {
      (cnt[(int)shot[i]])++;
    }
  }
  for (i = 0; i < 256; i++) {
    if (cnt[i] > 0)
      if (((i >= 'a') && (i <= 'z')))
        printf("%c - %d\n", i, cnt[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x800(%rbp),%rdi
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1050 <fgets@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jge    1194 <main+0x64>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x410(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <main+0x3a>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x804(%rbp)
lea    -0x800(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x804(%rbp),%eax
cmp    %ecx,%eax
jge    1243 <main+0x113>
movslq -0x8(%rbp),%rax
movsbl -0x800(%rbp,%rax,1),%eax
ff
cmp    $0x41,%eax
jl     1211 <main+0xe1>
movslq -0x8(%rbp),%rax
movsbl -0x800(%rbp,%rax,1),%eax
ff
cmp    $0x5a,%eax
jg     1211 <main+0xe1>
movslq -0x8(%rbp),%rax
movsbl -0x800(%rbp,%rax,1),%eax
ff
add    $0x20,%eax
cltq
mov    -0x410(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x410(%rbp,%rax,4)
jmp    1230 <main+0x100>
movslq -0x8(%rbp),%rax
movsbl -0x800(%rbp,%rax,1),%eax
ff
cltq
mov    -0x410(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x410(%rbp,%rax,4)
jmp    1235 <main+0x105>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119b <main+0x6b>
movl   $0x0,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jge    12af <main+0x17f>
movslq -0x8(%rbp),%rax
cmpl   $0x0,-0x410(%rbp,%rax,4)
jle    129c <main+0x16c>
cmpl   $0x61,-0x8(%rbp)
jl     1297 <main+0x167>
cmpl   $0x7a,-0x8(%rbp)
jg     1297 <main+0x167>
mov    -0x8(%rbp),%esi
movslq -0x8(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edx
lea    0xd6e(%rip),%rdi
call   1040 <printf@plt>
jmp    129c <main+0x16c>
jmp    12a1 <main+0x171>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    124a <main+0x11a>
xor    %eax,%eax
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x7f8,%rsp
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1060 <fgets@plt>
lea    0x3f0(%rsp),%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    11be <main+0x7e>
xor    %ebx,%ebx
mov    %rsp,%r14
nopl   0x0(%rax,%rax,1)
movsbl (%rsp,%rbx,1),%eax
movslq %eax,%rcx
add    $0xffffffbf,%eax
lea    0x20(%rcx),%edx
cmp    $0x1a,%al
cmovae %rcx,%rdx
addl   $0x1,0x3f0(%rsp,%rdx,4)
01
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1190 <main+0x50>
xor    %ebx,%ebx
lea    0xe39(%rip),%r14
jmp    11dd <main+0x9d>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    $0x100,%rbx
je     11fc <main+0xbc>
mov    0x3f0(%rsp,%rbx,4),%edx
test   %edx,%edx
jle    11d0 <main+0x90>
lea    -0x61(%rbx),%eax
cmp    $0x19,%eax
ja     11d0 <main+0x90>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    11d0 <main+0x90>
xor    %eax,%eax
add    $0x7f8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [9 x i8] c"%c - %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [256 x i32]
%4 = alloca [1000 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 1000, i32 %6)
store i32 0, i32* %2
br label %8
8: ; preds = %15, %0
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 256
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %13
store i32 0, i32* %14
br label %15
15: ; preds = %11
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %8
18: ; preds = %8
store i32 0, i32* %2
br label %19
19: ; preds = %60, %18
%20 = load i32, i32* %2
%21 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%22 = call i32 @strlen(i8* %21)
%23 = icmp slt i32 %20, %22
br i1 %23, label %24, label %63
24: ; preds = %19
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp sge i32 %29, 65
br i1 %30, label %31, label %49
31: ; preds = %24
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp sle i32 %36, 90
br i1 %37, label %38, label %49
38: ; preds = %31
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = add nsw i32 %43, 32
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = add nsw i32 %47, 1
store i32 %48, i32* %46
br label %59
49: ; preds = %31, %24
%50 = load i32, i32* %2
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = add nsw i32 %57, 1
store i32 %58, i32* %56
br label %59
59: ; preds = %49, %38
br label %60
60: ; preds = %59
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
store i32 %62, i32* %2
br label %19
63: ; preds = %19
store i32 0, i32* %2
br label %64
64: ; preds = %88, %63
%65 = load i32, i32* %2
%66 = icmp slt i32 %65, 256
br i1 %66, label %67, label %91
67: ; preds = %64
%68 = load i32, i32* %2
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = icmp sgt i32 %71, 0
br i1 %72, label %73, label %87
73: ; preds = %67
%74 = load i32, i32* %2
%75 = icmp sge i32 %74, 97
br i1 %75, label %76, label %86
76: ; preds = %73
%77 = load i32, i32* %2
%78 = icmp sle i32 %77, 122
br i1 %78, label %79, label %86
79: ; preds = %76
%80 = load i32, i32* %2
%81 = load i32, i32* %2
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %80, i32 %84)
br label %86
86: ; preds = %79, %76, %73
br label %87
87: ; preds = %86, %67
br label %88
88: ; preds = %87
%89 = load i32, i32* %2
%90 = add nsw i32 %89, 1
store i32 %90, i32* %2
br label %64
91: ; preds = %64
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [9 x i8] c"%c - %d\0A\00"
define i32 @main() {
%1 = alloca [256 x i32]
%2 = bitcast [256 x i32]* %1 to i8*
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 1000, i32 %5)
%7 = call i32 @strlen(i8* %4)
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %26
9: ; preds = %0, %9
%10 = phi i64 [ %22, %9 ], [ 0, %0 ]
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i64
%14 = add i8 %12, -65
%15 = icmp ult i8 %14, 26
%16 = add nsw i64 %13, 32
%17 = and i64 %16, 4294967295
%18 = select i1 %15, i64 %17, i64 %13
%19 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = add nsw i32 %20, 1
store i32 %21, i32* %19
%22 = add nuw nsw i64 %10, 1
%23 = call i32 @strlen(i8* %4)
%24 = sext i32 %23 to i64
%25 = icmp slt i64 %22, %24
br i1 %25, label %9, label %26
26: ; preds = %9, %0
br label %27
27: ; preds = %26, %39
%28 = phi i64 [ %40, %39 ], [ 0, %26 ]
%29 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = icmp sgt i32 %30, 0
%32 = trunc i64 %28 to i32
%33 = add i32 %32, -97
%34 = icmp ult i32 %33, 26
%35 = select i1 %31, i1 %34, i1 false
br i1 %35, label %36, label %39
36: ; preds = %27
%37 = trunc i64 %28 to i32
%38 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %37, i32 %30)
br label %39
39: ; preds = %27, %36
%40 = add nuw nsw i64 %28, 1
%41 = icmp eq i64 %40, 256
br i1 %41, label %42, label %27
42: ; preds = %39
ret i32 0
}