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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e9c(%rip),%rcx
cmp    (%rcx),%eax
je     119e <main+0x7e>
cmpl   $0x20,-0x8(%rbp)
je     1168 <main+0x48>
cmpl   $0x9,-0x8(%rbp)
jne    118b <main+0x6b>
cmpl   $0x20,-0xc(%rbp)
je     1186 <main+0x66>
cmpl   $0x9,-0xc(%rbp)
je     1186 <main+0x66>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1193 <main+0x73>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113b <main+0x1b>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ebe(%rip),%rbx
mov    (%rbx),%ebp
jmp    1135 <main+0x15>
xchg   %ax,%ax
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1161 <main+0x41>
mov    %ebp,%ecx
mov    %eax,%ebp
cmp    $0x20,%eax
je     1150 <main+0x30>
mov    %ebp,%edi
cmp    $0x9,%ebp
jne    1130 <main+0x10>
cmp    $0x9,%ecx
je     1135 <main+0x15>
mov    $0xa,%edi
cmp    $0x20,%ecx
je     1135 <main+0x15>
jmp    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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