#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);
main() {
  int c;
  while ((c = getchar()) != EOF) {
    while (c == ' ' || c == '\n' || c == '\t')
      c = getchar();
    break;
  }
  while (c != EOF) {
    while (c == ' ' || c == '\n' || c == '\t') {
      putchar('\n');
      c = getchar();
      while (c == ' ' || c == '\n' || c == '\t')
        c = getchar();
    }
    putchar(c);
    c = getchar();
  }
}


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    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1199 <main+0x79>
jmp    114d <main+0x2d>
mov    $0x1,%al
cmpl   $0x20,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1175 <main+0x55>
mov    $0x1,%al
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1175 <main+0x55>
cmpl   $0x9,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1185 <main+0x65>
jmp    1194 <main+0x74>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    114d <main+0x2d>
jmp    1199 <main+0x79>
jmp    119e <main+0x7e>
mov    -0x8(%rbp),%eax
mov    0x2e40(%rip),%rcx
cmp    (%rcx),%eax
je     1264 <main+0x144>
jmp    11b5 <main+0x95>
mov    $0x1,%al
cmpl   $0x20,-0x8(%rbp)
mov    %al,-0xa(%rbp)
je     11dd <main+0xbd>
mov    $0x1,%al
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0xa(%rbp)
je     11dd <main+0xbd>
cmpl   $0x9,-0x8(%rbp)
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    11ed <main+0xcd>
jmp    124d <main+0x12d>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x8(%rbp)
mov    %al,-0xb(%rbp)
je     1229 <main+0x109>
mov    $0x1,%al
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0xb(%rbp)
je     1229 <main+0x109>
cmpl   $0x9,-0x8(%rbp)
sete   %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
test   $0x1,%al
jne    1239 <main+0x119>
jmp    1248 <main+0x128>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    1201 <main+0xe1>
jmp    11b5 <main+0x95>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    119e <main+0x7e>
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),%r14
cmp    (%r14),%eax
jne    1141 <main+0x21>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
movabs $0x100000600,%rbx
cmp    $0x20,%eax
ja     117e <main+0x5e>
mov    %eax,%ecx
bt     %rcx,%rbx
jae    117e <main+0x5e>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x20,%eax
jbe    1150 <main+0x30>
jmp    117e <main+0x5e>
cs nopw 0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
je     1137 <main+0x17>
cmp    $0x20,%eax
ja     1170 <main+0x50>
mov    %eax,%ecx
bt     %rcx,%rbx
jae    1170 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ecx
cmp    $0x20,%eax
ja     1183 <main+0x63>
bt     %rcx,%rbx
jb     11a0 <main+0x80>
jmp    1183 <main+0x63>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %22
7: ; preds = %3
br label %8
8: ; preds = %19, %7
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 32
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 10
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 9
br label %17
17: ; preds = %14, %11, %8
%18 = phi i1 [ true, %11 ], [ true, %8 ], [ %16, %14 ]
br i1 %18, label %19, label %21
19: ; preds = %17
%20 = call i32 (...) @getchar()
store i32 %20, i32* %2
br label %8
21: ; preds = %17
br label %22
22: ; preds = %21, %3
br label %23
23: ; preds = %56, %22
%24 = load i32, i32* %2
%25 = load i32, i32* @EOF
%26 = icmp ne i32 %24, %25
br i1 %26, label %27, label %60
27: ; preds = %23
br label %28
28: ; preds = %55, %27
%29 = load i32, i32* %2
%30 = icmp eq i32 %29, 32
br i1 %30, label %37, label %31
31: ; preds = %28
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 10
br i1 %33, label %37, label %34
34: ; preds = %31
%35 = load i32, i32* %2
%36 = icmp eq i32 %35, 9
br label %37
37: ; preds = %34, %31, %28
%38 = phi i1 [ true, %31 ], [ true, %28 ], [ %36, %34 ]
br i1 %38, label %39, label %56
39: ; preds = %37
%40 = call i32 @putchar(i32 10)
%41 = call i32 (...) @getchar()
store i32 %41, i32* %2
br label %42
42: ; preds = %53, %39
%43 = load i32, i32* %2
%44 = icmp eq i32 %43, 32
br i1 %44, label %51, label %45
45: ; preds = %42
%46 = load i32, i32* %2
%47 = icmp eq i32 %46, 10
br i1 %47, label %51, label %48
48: ; preds = %45
%49 = load i32, i32* %2
%50 = icmp eq i32 %49, 9
br label %51
51: ; preds = %48, %45, %42
%52 = phi i1 [ true, %45 ], [ true, %42 ], [ %50, %48 ]
br i1 %52, label %53, label %55
53: ; preds = %51
%54 = call i32 (...) @getchar()
store i32 %54, i32* %2
br label %42
55: ; preds = %51
br label %28
56: ; preds = %37
%57 = load i32, i32* %2
%58 = call i32 @putchar(i32 %57)
%59 = call i32 (...) @getchar()
store i32 %59, i32* %2
br label %23
60: ; preds = %23
%61 = load i32, i32* %1
ret i32 %61
}

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