#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 isAlphaChecker(char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
void wordPerLine() {
  int endOfWordFlag = 0;
  char c;
  while (c != EOF) {
    c = getchar();
    if (isAlphaChecker(c) == 1) {
      putchar(c);
      endOfWordFlag = 1;
    }
    if (isAlphaChecker(c) == 0) {
      if (endOfWordFlag == 1) {
        printf("\n");
        endOfWordFlag = 0;
      }
    }
  }
}


x86 assembly (clang, -O0):
<wordPerLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsbl -0x5(%rbp),%eax
mov    0x2e8e(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     11ca <wordPerLine+0x8a>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1060 <isAlphaChecker@plt>
cmp    $0x1,%eax
jne    1191 <wordPerLine+0x51>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
movl   $0x1,-0x4(%rbp)
movsbl -0x5(%rbp),%edi
call   1060 <isAlphaChecker@plt>
cmp    $0x0,%eax
jne    11c5 <wordPerLine+0x85>
cmpl   $0x1,-0x4(%rbp)
jne    11c0 <wordPerLine+0x80>
lea    0xe4c(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11c5 <wordPerLine+0x85>
jmp    114f <wordPerLine+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordPerLine>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2eaa(%rip),%r14
xor    %r15d,%r15d
jmp    1155 <wordPerLine+0x25>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    (%r14),%bl
je     119a <wordPerLine+0x6a>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%ebp
mov    %ebp,%edi
call   1050 <isAlphaChecker@plt>
cmp    $0x1,%eax
jne    117a <wordPerLine+0x4a>
mov    %ebp,%edi
call   1030 <putchar@plt>
mov    $0x1,%r15d
mov    %ebp,%edi
call   1050 <isAlphaChecker@plt>
test   %eax,%eax
jne    1150 <wordPerLine+0x20>
cmp    $0x1,%r15d
jne    1150 <wordPerLine+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %r15d,%r15d
jmp    1150 <wordPerLine+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i8 0
@.str = [2 x i8] c"\0A\00"
define void @wordPerLine() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %27, %0
%4 = load i8, 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 %28
9: ; preds = %3
%10 = call signext i8 (...) @getchar()
store i8 %10, i8* %2
%11 = load i8, i8* %2
%12 = call i32 @isAlphaChecker(i8 signext %11)
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i8, i8* %2
%16 = call i32 @putchar(i8 signext %15)
store i32 1, i32* %1
br label %17
17: ; preds = %14, %9
%18 = load i8, i8* %2
%19 = call i32 @isAlphaChecker(i8 signext %18)
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = load i32, i32* %1
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %26
26: ; preds = %24, %21
br label %27
27: ; preds = %26, %17
br label %3
28: ; preds = %3
ret void
}

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