#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 EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char **argv) {
  int c;
  while ((c = getchar()) != EOF) {
    switch (c) {
    case ' ':
    case '\n':
    case '\t':
      putchar('\n');
      break;
    default:
      putchar(c);
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1193 <main+0x73>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1177 <main+0x57>
jmp    1166 <main+0x46>
mov    -0x18(%rbp),%eax
sub    $0x20,%eax
jne    1186 <main+0x66>
jmp    1177 <main+0x57>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    118e <main+0x6e>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%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),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
movabs $0x100000600,%r14
jmp    1162 <main+0x42>
nopl   0x0(%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1136 <main+0x16>
cmp    $0x20,%eax
ja     1150 <main+0x30>
mov    $0xa,%edi
mov    %eax,%ecx
bt     %rcx,%r14
jb     1152 <main+0x32>
jmp    1150 <main+0x30>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %18, %2
%8 = call i32 (...) @getchar()
store i32 %8, i32* %6
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i32, i32* %6
switch i32 %12, label %15 [
i32 32, label %13
i32 10, label %13
i32 9, label %13
]
13: ; preds = %11, %11, %11
%14 = call i32 @putchar(i32 10)
br label %18
15: ; preds = %11
%16 = load i32, i32* %6
%17 = call i32 @putchar(i32 %16)
br label %18
18: ; preds = %15, %13
br label %7
19: ; preds = %7
ret i32 0
}

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