#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(char);
main() {
  int c;
  int prev_c = 0;
  while ((c = getchar()) != EOF) {
    if ((prev_c == ' ' || prev_c == '\n' || prev_c == '\t') &&
        (c == ' ' || c == '\n' || c == '\t')) {
    } else if (c == ' ' || c == '\n' || c == '\t') {
      putchar('\n');
    } else {
      putchar(c);
    }
    prev_c = c;
  }
  putchar('\n');
}


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     11d8 <main+0xb8>
cmpl   $0x20,-0xc(%rbp)
je     116d <main+0x4d>
cmpl   $0xa,-0xc(%rbp)
je     116d <main+0x4d>
cmpl   $0x9,-0xc(%rbp)
jne    1190 <main+0x70>
cmpl   $0x20,-0x8(%rbp)
je     118b <main+0x6b>
cmpl   $0xa,-0x8(%rbp)
je     118b <main+0x6b>
cmpl   $0x9,-0x8(%rbp)
jne    1190 <main+0x70>
jmp    11cd <main+0xad>
cmpl   $0x20,-0x8(%rbp)
je     11ae <main+0x8e>
cmpl   $0xa,-0x8(%rbp)
je     11ae <main+0x8e>
cmpl   $0x9,-0x8(%rbp)
jne    11bd <main+0x9d>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11c8 <main+0xa8>
mov    -0x8(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    11cd <main+0xad>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    1148 <main+0x28>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
movabs $0x100000600,%rbx
xor    %ecx,%ecx
jmp    1178 <main+0x58>
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%ecx
movsbl %cl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %ebp,%ecx
cmp    (%r14),%eax
je     1137 <main+0x17>
mov    %eax,%ebp
mov    %eax,%eax
cmp    $0x20,%ecx
ja     11a0 <main+0x80>
mov    %ecx,%ecx
bt     %rcx,%rbx
jae    11a0 <main+0x80>
cmp    $0x20,%ebp
ja     1160 <main+0x40>
bt     %rax,%rbx
jb     116a <main+0x4a>
jmp    1160 <main+0x40>
cs nopw 0x0(%rax,%rax,1)
cmp    $0x20,%ebp
ja     1160 <main+0x40>
mov    $0xa,%cl
bt     %rax,%rbx
jb     1162 <main+0x42>
jmp    1160 <main+0x40>

LLVM IR (-O0):
@EOF = global i32 0
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 = %43, %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 %45
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 32
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 10
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 9
br i1 %16, label %17, label %27
17: ; preds = %14, %11, %8
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 32
br i1 %19, label %26, label %20
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 10
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 9
br i1 %25, label %26, label %27
26: ; preds = %23, %20, %17
br label %43
27: ; preds = %23, %14
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 32
br i1 %29, label %36, label %30
30: ; preds = %27
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 10
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = load i32, i32* %2
%35 = icmp eq i32 %34, 9
br i1 %35, label %36, label %38
36: ; preds = %33, %30, %27
%37 = call i32 @putchar(i8 signext 10)
br label %42
38: ; preds = %33
%39 = load i32, i32* %2
%40 = trunc i32 %39 to i8
%41 = call i32 @putchar(i8 signext %40)
br label %42
42: ; preds = %38, %36
br label %43
43: ; preds = %42, %26
%44 = load i32, i32* %2
store i32 %44, i32* %3
br label %4
45: ; preds = %4
%46 = call i32 @putchar(i8 signext 10)
%47 = load i32, i32* %1
ret i32 %47
}

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