#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 */
typedef int c;

/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c, count = 0;
  while ((c = getchar()) != EOF)
    if (1065233 >> (('A' <= (c) && (c) <= 'Z') ? ((c) - 'A') : ((c) - 'a')) & 1)
      count++;
  printf("%d\n", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     11a2 <main+0x82>
mov    $0x41,%eax
cmp    -0x8(%rbp),%eax
jg     1175 <main+0x55>
cmpl   $0x5a,-0x8(%rbp)
jg     1175 <main+0x55>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x10(%rbp)
jmp    117e <main+0x5e>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x104111,%eax
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     119d <main+0x7d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     116b <main+0x4b>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    -0x41(%rax),%edx
xor    %ecx,%ecx
cmp    $0x1a,%edx
setb   %cl
shl    $0x5,%ecx
add    %eax,%ecx
add    $0x9f,%cl
mov    $0x104111,%eax
shr    %cl,%eax
and    $0x1,%eax
add    %eax,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xe8e(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %28, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %29
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp sle i32 65, %9
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 90
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %2
%16 = sub nsw i32 %15, 65
br label %20
17: ; preds = %11, %8
%18 = load i32, i32* %2
%19 = sub nsw i32 %18, 97
br label %20
20: ; preds = %17, %14
%21 = phi i32 [ %16, %14 ], [ %19, %17 ]
%22 = ashr i32 1065233, %21
%23 = and i32 %22, 1
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %20
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %28
28: ; preds = %25, %20
br label %4
29: ; preds = %4
%30 = load i32, i32* %3
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %17, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %14, %4 ], [ %1, %0 ]
%6 = phi i32 [ %13, %4 ], [ 0, %0 ]
%7 = add i32 %5, -65
%8 = icmp ult i32 %7, 26
%9 = select i1 %8, i32 -65, i32 -97
%10 = add nsw i32 %9, %5
%11 = lshr i32 1065233, %10
%12 = and i32 %11, 1
%13 = add nuw nsw i32 %12, %6
%14 = tail call i32 (...) @getchar()
%15 = load i32, i32* @EOF
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %4
17: ; preds = %4, %0
%18 = phi i32 [ 0, %0 ], [ %13, %4 ]
%19 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
ret i32 0
}