#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 /*<<< orphan*/ scanf(char *, char *);
size_t strlen(char *);
int main() {
  char buffer[101];
  scanf("%s", buffer);
  size_t len = strlen(buffer);
  for (size_t i = 0; i < len; i++) {
    if (buffer[i] < 91 && buffer[i] > 64) {
      printf("%c", buffer[i]);
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x78(%rbp)
movq   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%rax
cmp    -0x78(%rbp),%rax
jae    11c6 <main+0x96>
mov    -0x80(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x5b,%eax
jge    11b0 <main+0x80>
mov    -0x80(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x40,%eax
jle    11b0 <main+0x80>
mov    -0x80(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11b5 <main+0x85>
mov    -0x80(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x80(%rbp)
jmp    1167 <main+0x37>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xec2(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
je     117b <main+0x4b>
mov    %rax,%r14
xor    %ebx,%ebx
jmp    1169 <main+0x39>
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%r14
je     117b <main+0x4b>
movzbl (%rsp,%rbx,1),%edi
lea    -0x41(%rdi),%eax
cmp    $0x19,%al
ja     1160 <main+0x30>
call   1030 <putchar@plt>
jmp    1160 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [101 x i8]
%2 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i64 @strlen(i8* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %17, %0
%7 = call i32 @putchar(i32 10)
ret i32 0
8: ; preds = %0, %17
%9 = phi i64 [ %18, %17 ], [ 0, %0 ]
%10 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = add i8 %11, -65
%13 = icmp ult i8 %12, 26
br i1 %13, label %14, label %17
14: ; preds = %8
%15 = zext i8 %11 to i32
%16 = call i32 @putchar(i32 %15)
br label %17
17: ; preds = %8, %14
%18 = add nuw i64 %9, 1
%19 = icmp eq i64 %18, %4
br i1 %19, label %6, label %8
}