#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(void) {
  int c, nl, nw, nc, state;
  state = 0;
  nl = nw = nc = 0;
  while ((c = getchar()) != EOF) {
    if (state == 1) {
      if (c == ' ' || c == '\n' || c == '\t') {
        state = 0;
        putchar('\n');
      } else
        putchar(c);
    } else {
      if (c == ' ' || c == '\n' || c == '\t')
        continue;
      else {
        state = 1;
        putchar(c);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%eax
je     11eb <main+0xcb>
cmpl   $0x1,-0x18(%rbp)
jne    11af <main+0x8f>
cmpl   $0x20,-0x8(%rbp)
je     118c <main+0x6c>
cmpl   $0xa,-0x8(%rbp)
je     118c <main+0x6c>
cmpl   $0x9,-0x8(%rbp)
jne    11a2 <main+0x82>
movl   $0x0,-0x18(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11aa <main+0x8a>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    11e6 <main+0xc6>
cmpl   $0x20,-0x8(%rbp)
je     11cd <main+0xad>
cmpl   $0xa,-0x8(%rbp)
je     11cd <main+0xad>
cmpl   $0x9,-0x8(%rbp)
jne    11d2 <main+0xb2>
jmp    114b <main+0x2b>
movl   $0x1,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    11e6 <main+0xc6>
jmp    114b <main+0x2b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb3(%rip),%r15
cmp    (%r15),%eax
jne    1147 <main+0x27>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
movabs $0x100000600,%r14
xor    %ebp,%ebp
jmp    1175 <main+0x55>
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
mov    %ebx,%ebp
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r15),%eax
je     113a <main+0x1a>
cmp    $0x1,%ebp
jne    1190 <main+0x70>
cmp    $0x20,%eax
ja     1155 <main+0x35>
mov    %eax,%ecx
bt     %rcx,%r14
jae    1155 <main+0x35>
xor    %ebx,%ebx
mov    $0xa,%eax
jmp    1160 <main+0x40>
mov    $0x1,%ebx
cmp    $0x20,%eax
ja     1160 <main+0x40>
xor    %ebp,%ebp
mov    %eax,%ecx
bt     %rcx,%r14
jb     1169 <main+0x49>
jmp    1160 <main+0x40>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
store i32 0, i32* %5
store i32 0, i32* %4
store i32 0, i32* %3
br label %7
7: ; preds = %43, %38, %0
%8 = call i32 (...) @getchar()
store i32 %8, i32* %2
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %44
11: ; preds = %7
%12 = load i32, i32* %6
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %29
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 32
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 10
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 9
br i1 %22, label %23, label %25
23: ; preds = %20, %17, %14
store i32 0, i32* %6
%24 = call i32 @putchar(i32 10)
br label %28
25: ; preds = %20
%26 = load i32, i32* %2
%27 = call i32 @putchar(i32 %26)
br label %28
28: ; preds = %25, %23
br label %43
29: ; preds = %11
%30 = load i32, i32* %2
%31 = icmp eq i32 %30, 32
br i1 %31, label %38, label %32
32: ; preds = %29
%33 = load i32, i32* %2
%34 = icmp eq i32 %33, 10
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = load i32, i32* %2
%37 = icmp eq i32 %36, 9
br i1 %37, label %38, label %39
38: ; preds = %35, %32, %29
br label %7
39: ; preds = %35
store i32 1, i32* %6
%40 = load i32, i32* %2
%41 = call i32 @putchar(i32 %40)
br label %42
42: ; preds = %39
br label %43
43: ; preds = %42, %28
br label %7
44: ; preds = %7
ret i32 0
}

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 %20, label %4
4: ; preds = %0, %15
%5 = phi i32 [ %17, %15 ], [ %1, %0 ]
%6 = phi i32 [ %16, %15 ], [ 0, %0 ]
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %4
switch i32 %5, label %9 [
i32 32, label %11
i32 10, label %11
i32 9, label %11
]
9: ; preds = %8
br label %11
10: ; preds = %4
switch i32 %5, label %11 [
i32 32, label %15
i32 10, label %15
i32 9, label %15
]
11: ; preds = %10, %8, %8, %8, %9
%12 = phi i32 [ %5, %9 ], [ 10, %8 ], [ 10, %8 ], [ 10, %8 ], [ %5, %10 ]
%13 = phi i32 [ 1, %9 ], [ 0, %8 ], [ 0, %8 ], [ 0, %8 ], [ 1, %10 ]
%14 = tail call i32 @putchar(i32 %12)
br label %15
15: ; preds = %11, %10, %10, %10
%16 = phi i32 [ 0, %10 ], [ 0, %10 ], [ 0, %10 ], [ %13, %11 ]
%17 = tail call i32 (...) @getchar()
%18 = load i32, i32* @EOF
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %4
20: ; preds = %15, %0
ret i32 0
}