#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 */
char EOF;
char getchar();
int /*<<< orphan*/ putchar(char);
int main(void) {
  char ch;
  while ((ch = getchar()) != EOF) {
    if (ch != ' ' && ch != '\n' && ch != '\t') {
      putchar(ch);
    } else {
      putchar('\n');
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2ea5(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1192 <main+0x72>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1183 <main+0x63>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1183 <main+0x63>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1183 <main+0x63>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    118d <main+0x6d>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%rbx
cmp    (%rbx),%al
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
movabs $0x100000600,%r14
jmp    1163 <main+0x43>
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%al
je     1136 <main+0x16>
cmp    $0x20,%al
ja     1150 <main+0x30>
movzbl %al,%ecx
bt     %rcx,%r14
jae    1150 <main+0x30>
mov    $0xa,%al
jmp    1150 <main+0x30>

LLVM IR (-O0):
@EOF = global i8 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %26, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = sext i8 %4 to i32
%6 = load i8, i8* @EOF
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %5, %7
br i1 %8, label %9, label %27
9: ; preds = %3
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 32
br i1 %12, label %13, label %24
13: ; preds = %9
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 10
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 9
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load i8, i8* %2
%23 = call i32 @putchar(i8 signext %22)
br label %26
24: ; preds = %17, %13, %9
%25 = call i32 @putchar(i8 signext 10)
br label %26
26: ; preds = %24, %21
br label %3
27: ; preds = %3
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@EOF = global i8 0
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i8, i8* @EOF
%3 = icmp eq i8 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %7
%5 = phi i8 [ %10, %7 ], [ %1, %0 ]
switch i8 %5, label %7 [
i8 32, label %6
i8 10, label %6
i8 9, label %6
]
6: ; preds = %4, %4, %4
br label %7
7: ; preds = %4, %6
%8 = phi i8 [ 10, %6 ], [ %5, %4 ]
%9 = tail call i32 @putchar(i8 signext %8)
%10 = tail call signext i8 (...) @getchar()
%11 = load i8, i8* @EOF
%12 = icmp eq i8 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %7, %0
ret i32 0
}