#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) {
  int iState = 0;
  char cChar = 0;
  while ((cChar = getchar()) != EOF) {
    if ((cChar == ' ') || (cChar == '\n') || (cChar == '\t')) {
      if (iState == 1) {
        putchar('\n');
        iState = 0;
      }
    } else {
      iState = 1;
      putchar(cChar);
    }
  }
  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)
movl   $0x0,-0x14(%rbp)
movb   $0x0,-0x15(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x15(%rbp)
movsbl %al,%eax
mov    0x2e93(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     11bc <main+0x9c>
movsbl -0x15(%rbp),%eax
cmp    $0x20,%eax
je     1187 <main+0x67>
movsbl -0x15(%rbp),%eax
cmp    $0xa,%eax
je     1187 <main+0x67>
movsbl -0x15(%rbp),%eax
cmp    $0x9,%eax
jne    11a7 <main+0x87>
cmpl   $0x1,-0x14(%rbp)
jne    11a2 <main+0x82>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0x14(%rbp)
jmp    11b7 <main+0x97>
movl   $0x1,-0x14(%rbp)
movsbl -0x15(%rbp),%edi
call   1030 <putchar@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x20,%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),%rbx
cmp    (%rbx),%al
jne    113d <main+0x1d>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
movabs $0x100000600,%r14
xor    %ecx,%ecx
jmp    1165 <main+0x45>
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %ebp,%ecx
cmp    (%rbx),%al
je     1136 <main+0x16>
mov    $0x1,%ebp
cmp    $0x20,%al
ja     1150 <main+0x30>
movzbl %al,%edx
bt     %rdx,%r14
jae    1150 <main+0x30>
xor    %ebp,%ebp
mov    $0xa,%al
cmp    $0x1,%ecx
je     1150 <main+0x30>
jmp    1158 <main+0x38>

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 i32
%7 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i8 0, i8* %7
br label %8
8: ; preds = %35, %2
%9 = call signext i8 (...) @getchar()
store i8 %9, i8* %7
%10 = sext i8 %9 to i32
%11 = load i8, i8* @EOF
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %10, %12
br i1 %13, label %14, label %36
14: ; preds = %8
%15 = load i8, i8* %7
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 32
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %7
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 10
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %7
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 9
br i1 %25, label %26, label %32
26: ; preds = %22, %18, %14
%27 = load i32, i32* %6
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %6
br label %31
31: ; preds = %29, %26
br label %35
32: ; preds = %22
store i32 1, i32* %6
%33 = load i8, i8* %7
%34 = call i32 @putchar(i8 signext %33)
br label %35
35: ; preds = %32, %31
br label %8
36: ; preds = %8
ret i32 0
}

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