#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 */
scalar_t__ is_alphabet(char);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, const char *argv[]) {
  char out[80];
  char input[80];
  char end = '\0';
  int now = 0, i = 0;
  scanf("%s", input);
  while (input[now] != end) {
    if (is_alphabet(input[now])) {
      out[i] = input[now];
      i++;
    }
    now++;
  }
  out[i] = end;
  printf("%s", out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0xb1(%rbp)
movl   $0x0,-0xb8(%rbp)
movl   $0x0,-0xbc(%rbp)
lea    -0xb0(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1040 <scanf@plt>
movslq -0xb8(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%eax
ff
movsbl -0xb1(%rbp),%ecx
cmp    %ecx,%eax
je     11ef <main+0xbf>
movslq -0xb8(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%edi
ff
call   1050 <is_alphabet@plt>
cmp    $0x0,%rax
je     11db <main+0xab>
movslq -0xb8(%rbp),%rax
mov    -0xb0(%rbp,%rax,1),%cl
movslq -0xbc(%rbp),%rax
mov    %cl,-0x60(%rbp,%rax,1)
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    1177 <main+0x47>
mov    -0xb1(%rbp),%cl
movslq -0xbc(%rbp),%rax
mov    %cl,-0x60(%rbp,%rax,1)
lea    -0x60(%rbp),%rsi
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
lea    0xebf(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%al
test   %al,%al
je     118a <main+0x5a>
lea    0x1(%rsp),%rbx
xor    %r14d,%r14d
jmp    116b <main+0x3b>
nopw   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     118d <main+0x5d>
movsbl %al,%edi
call   1050 <is_alphabet@plt>
test   %rax,%rax
je     1160 <main+0x30>
movzbl -0x1(%rbx),%eax
movslq %r14d,%r14
mov    %al,0x50(%rsp,%r14,1)
add    $0x1,%r14d
jmp    1160 <main+0x30>
xor    %r14d,%r14d
movslq %r14d,%rax
movb   $0x0,0x50(%rsp,%rax,1)
lea    0xe64(%rip),%rdi
lea    0x50(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [80 x i8]
%7 = alloca [80 x i8]
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 0, i8* %8
store i32 0, i32* %9
store i32 0, i32* %10
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %39, %2
%14 = load i32, i32* %9
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = load i8, i8* %8
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %18, %20
br i1 %21, label %22, label %42
22: ; preds = %13
%23 = load i32, i32* %9
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = call i64 @is_alphabet(i8 signext %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %39
29: ; preds = %22
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = load i32, i32* %10
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 %35
store i8 %33, i8* %36
%37 = load i32, i32* %10
%38 = add nsw i32 %37, 1
store i32 %38, i32* %10
br label %39
39: ; preds = %29, %22
%40 = load i32, i32* %9
%41 = add nsw i32 %40, 1
store i32 %41, i32* %9
br label %13
42: ; preds = %13
%43 = load i8, i8* %8
%44 = load i32, i32* %10
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 %45
store i8 %43, i8* %46
%47 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%48 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %47)
ret i32 0
}

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