#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*/ printf(char *, ...);
main() {
  char c;
  while ((c = getchar()) != EOF) {
    if ((c == ' ') || (c == '\t')) {
      while ((c = getchar()) == ' ' || (c == '\t')) {
      }
      printf("\n%c");
    } else {
      printf("%c", c);
    }
  }
}


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    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2ea5(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     11d4 <main+0xb4>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1168 <main+0x48>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    11bd <main+0x9d>
jmp    116d <main+0x4d>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x6(%rbp)
je     1195 <main+0x75>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    11a5 <main+0x85>
jmp    11aa <main+0x8a>
jmp    116d <main+0x4d>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cf <main+0xaf>
movsbl -0x5(%rbp),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
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   1050 <getchar@plt>
mov    0x2ea6(%rip),%rbx
cmp    (%rbx),%al
jne    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xea9(%rip),%r14
jmp    1173 <main+0x43>
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%rbx),%al
je     1146 <main+0x16>
cmp    $0x20,%al
je     1180 <main+0x50>
cmp    $0x9,%al
jne    1160 <main+0x30>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0x9,%al
je     1180 <main+0x50>
cmp    $0x20,%al
je     1180 <main+0x50>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1168 <main+0x38>

LLVM IR (-O0):
@EOF = global i8 0
@.str = [4 x i8] c"\0A%c\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %35, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = sext i8 %4 to i32
%6 = load i8, i8* @EOF
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %5, %7
br i1 %8, label %9, label %36
9: ; preds = %3
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %17, label %13
13: ; preds = %9
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 9
br i1 %16, label %17, label %31
17: ; preds = %13, %9
br label %18
18: ; preds = %28, %17
%19 = call signext i8 (...) @getchar()
store i8 %19, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 32
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 9
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ true, %18 ], [ %25, %22 ]
br i1 %27, label %28, label %29
28: ; preds = %26
br label %18
29: ; preds = %26
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %35
31: ; preds = %13
%32 = load i8, i8* %2
%33 = sext i8 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %31, %29
br label %3
36: ; preds = %3
%37 = load i32, i32* %1
ret i32 %37
}

LLVM IR (-O2):
@EOF = global i8 0
@.str = [4 x i8] c"\0A%c\00"
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i8, i8* @EOF
%3 = icmp eq i8 %1, %2
br i1 %3, label %19, label %4
4: ; preds = %0, %15
%5 = phi i8 [ %16, %15 ], [ %1, %0 ]
switch i8 %5, label %12 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %4, %4
br label %7
7: ; preds = %9, %6
%8 = tail call signext i8 (...) @getchar()
switch i8 %8, label %10 [
i8 32, label %9
i8 9, label %9
]
9: ; preds = %7, %7
br label %7
10: ; preds = %7
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %15
12: ; preds = %4
%13 = sext i8 %5 to i32
%14 = tail call i32 @putchar(i32 %13)
br label %15
15: ; preds = %12, %10
%16 = tail call signext i8 (...) @getchar()
%17 = load i8, i8* @EOF
%18 = icmp eq i8 %16, %17
br i1 %18, label %19, label %4
19: ; preds = %15, %0
ret i32 0
}