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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%eax
je     1193 <main+0x73>
cmpl   $0x20,-0x8(%rbp)
je     116a <main+0x4a>
cmpl   $0x9,-0x8(%rbp)
jne    117d <main+0x5d>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118e <main+0x6e>
mov    -0x8(%rbp),%esi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
mov    (%r14),%edi
call   1040 <getc@plt>
mov    0x2ea6(%rip),%rbx
jmp    114d <main+0x2d>
nopl   0x0(%rax)
call   1030 <putchar@plt>
mov    (%r14),%edi
call   1040 <getc@plt>
cmp    (%rbx),%eax
je     1164 <main+0x44>
mov    $0xa,%edi
cmp    $0x9,%eax
je     1140 <main+0x20>
cmp    $0x20,%eax
je     1140 <main+0x20>
mov    %eax,%edi
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@EOF = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %19, %0
%4 = load i32, i32* @stdin
%5 = call i32 @getc(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %20
8: ; preds = %3
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 32
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 9
br i1 %13, label %14, label %16
14: ; preds = %11, %8
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %19
16: ; preds = %11
%17 = load i32, i32* %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %16, %14
br label %3
20: ; preds = %3
%21 = load i32, i32* %1
ret i32 %21
}

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