#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 */
char EOF;
char getchar();
int /*<<< orphan*/ putchar(char);
int main(int argc, char *argv[]) {
  char c, a = EOF;
  while ((c = getchar()) != EOF) {
    if (c == ' ' || c == '\t' || c == '\n') {
      if (a == ' ' || a == '\t' || a == '\n')
        ;
      else
        putchar('\n');
    } else
      putchar(c);
    a = c;
  }
  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    0x2eab(%rip),%rax
mov    (%rax),%al
mov    %al,-0x12(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
mov    0x2e92(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     11d7 <main+0xb7>
movsbl -0x11(%rbp),%eax
cmp    $0x20,%eax
je     1188 <main+0x68>
movsbl -0x11(%rbp),%eax
cmp    $0x9,%eax
je     1188 <main+0x68>
movsbl -0x11(%rbp),%eax
cmp    $0xa,%eax
jne    11c3 <main+0xa3>
movsbl -0x12(%rbp),%eax
cmp    $0x20,%eax
je     11af <main+0x8f>
movsbl -0x12(%rbp),%eax
cmp    $0x9,%eax
je     11af <main+0x8f>
movsbl -0x12(%rbp),%eax
cmp    $0xa,%eax
jne    11b4 <main+0x94>
jmp    11be <main+0x9e>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11cc <main+0xac>
movsbl -0x11(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x11(%rbp),%al
mov    %al,-0x12(%rbp)
jmp    1142 <main+0x22>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2eba(%rip),%r14
mov    (%r14),%bpl
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%al
jne    114a <main+0x2a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
movabs $0x100000600,%r15
jmp    1176 <main+0x56>
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %ebx,%ebp
cmp    (%r14),%al
je     113d <main+0x1d>
mov    %eax,%ebx
cmp    $0x20,%al
ja     1160 <main+0x40>
movzbl %bl,%eax
bt     %rax,%r15
mov    %ebx,%eax
jae    1160 <main+0x40>
mov    $0xa,%al
cmp    $0x20,%bpl
ja     1160 <main+0x40>
movzbl %bpl,%ecx
bt     %rcx,%r15
jb     1168 <main+0x48>
jmp    1160 <main+0x40>

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

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