#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;
scalar_t__ feof(int /*<<< orphan*/);
int fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strlen(char *);
int /*<<< orphan*/ strstr(char *, char *);
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/);
int main() {
  int c, i, empty_stream, alpha_stream;
  char word[20] = "";
  char *word_separators = " \t\n,.;:?!@#$%^*()-_=+`~[]{}\\|\'\"<>/";
  alpha_stream = i = 0;
  empty_stream = 1;
  printf("\n+++++++++++++++++++++++++++++++++++++++++++++\n\n");
  while ((c = fgetc(stdin)) != EOF) {
    if (!strstr(word_separators, (char *)&c)) {
      empty_stream = 0;
      alpha_stream = 1;
      word[i++] = c;
      if (feof(stdin))
        ungetc('\n', stdin);
    } else {
      word[i] = '\0';
      if (strlen(word) > 0) {
        printf("\n%-20s", word);
        while (i-- > 0) {
          fputc('-', stdout);
        }
        word[++i] = '\0';
      }
      if (c != ' ' && c != '\t' && c != '\n')
        empty_stream = 0;
      if (c == '\n' && !empty_stream) {
        empty_stream = 1;
        if (!alpha_stream)
          printf("\n--No alpha-numeric characters in stream--\n");
        else {
          alpha_stream = 0;
          printf("\n");
        }
        printf("\n+++++++++++++++++++++++++++++++++++++++++++++\n\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1050 <memset@plt>
lea    0xe5a(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
call   1060 <fgetc@plt>
mov    %eax,-0x8(%rbp)
mov    0x2dfb(%rip),%rcx
cmp    (%rcx),%eax
je     134b <main+0x1cb>
mov    -0x38(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%eax
jne    1257 <main+0xd7>
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0xc(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
cltq
mov    %cl,-0x30(%rbp,%rax,1)
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
call   1080 <feof@plt>
cmp    $0x0,%rax
je     1252 <main+0xd2>
mov    0x2da2(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1090 <ungetc@plt>
jmp    1346 <main+0x1c6>
movslq -0xc(%rbp),%rax
movb   $0x0,-0x30(%rbp,%rax,1)
lea    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    12c1 <main+0x141>
lea    -0x30(%rbp),%rsi
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    12b1 <main+0x131>
mov    0x2d30(%rip),%rax
mov    (%rax),%esi
mov    $0x2d,%edi
call   1070 <fputc@plt>
jmp    1285 <main+0x105>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cltq
movb   $0x0,-0x30(%rbp,%rax,1)
cmpl   $0x20,-0x8(%rbp)
je     12e6 <main+0x166>
cmpl   $0x9,-0x8(%rbp)
je     12e6 <main+0x166>
cmpl   $0xa,-0x8(%rbp)
je     12e6 <main+0x166>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    1341 <main+0x1c1>
cmpl   $0x0,-0x10(%rbp)
jne    1341 <main+0x1c1>
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    131e <main+0x19e>
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1333 <main+0x1b3>
movl   $0x0,-0x14(%rbp)
lea    0xd26(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1346 <main+0x1c6>
jmp    11cd <main+0x4d>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x20(%rsp)
lea    0xea0(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e27(%rip),%r13
mov    0x0(%r13),%edi
call   1070 <fgetc@plt>
mov    %eax,0xc(%rsp)
mov    0x2e0b(%rip),%rcx
cmp    (%rcx),%eax
jne    11ea <main+0x5a>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebp
lea    0x10(%rsp),%rbx
mov    0x2dd5(%rip),%r12
xor    %r14d,%r14d
xor    %r15d,%r15d
jmp    1231 <main+0xa1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%ebx
mov    0x0(%r13),%edi
call   1070 <fgetc@plt>
mov    %eax,0xc(%rsp)
mov    %ebx,%ebp
mov    0x2db8(%rip),%rcx
cmp    (%rcx),%eax
lea    0x10(%rsp),%rbx
je     11d9 <main+0x49>
lea    0xdc8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <strstr@plt>
test   %eax,%eax
je     12f0 <main+0x160>
movslq %r14d,%rax
movb   $0x0,0x10(%rsp,%rax,1)
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %rax,%rax
jle    12a3 <main+0x113>
lea    0xdbd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
test   %r14d,%r14d
jle    129b <main+0x10b>
add    $0x1,%r14d
nopl   0x0(%rax)
mov    (%r12),%esi
mov    $0x2d,%edi
call   1080 <fputc@plt>
add    $0xffffffff,%r14d
cmp    $0x1,%r14d
ja     1280 <main+0xf0>
xor    %r14d,%r14d
movslq %r14d,%rax
movb   $0x0,0x10(%rsp,%rax,1)
mov    0xc(%rsp),%eax
xor    %ebx,%ebx
cmp    $0x20,%rax
ja     1212 <main+0x82>
movabs $0x100000600,%rcx
bt     %rax,%rcx
jae    1212 <main+0x82>
cmp    $0xa,%eax
jne    1210 <main+0x80>
test   %ebp,%ebp
jne    1210 <main+0x80>
test   %r15d,%r15d
je     132c <main+0x19c>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1338 <main+0x1a8>
nopl   0x0(%rax)
mov    0xc(%rsp),%al
movslq %r14d,%rcx
add    $0x1,%r14d
mov    %al,0x10(%rsp,%rcx,1)
mov    0x0(%r13),%edi
call   1090 <feof@plt>
mov    $0x1,%r15d
xor    %ebx,%ebx
test   %rax,%rax
je     1212 <main+0x82>
mov    0x0(%r13),%esi
mov    $0xa,%edi
call   10a0 <ungetc@plt>
jmp    1212 <main+0x82>
lea    0xcf7(%rip),%rdi
call   1040 <puts@plt>
lea    0xd16(%rip),%rdi
call   1040 <puts@plt>
xor    %r15d,%r15d
mov    $0x1,%ebx
jmp    1212 <main+0x82>

LLVM IR (-O0):
@.str = [35 x i8] c" \09\0A,.;:?!@#$%^*()-_=+`~[]{}\\|'\22<>/\00"
@.str.1 = [49 x i8] c"\0A+++++++++++++++++++++++++++++++++++++++++++++\0A\0A\00"
@stdin = global i32 0
@EOF = global i32 0
@.str.2 = [7 x i8] c"\0A%-20s\00"
@stdout = global i32 0
@.str.3 = [44 x i8] c"\0A--No alpha-numeric characters in stream--\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [20 x i8]
%7 = alloca i8*
store i32 0, i32* %1
%8 = bitcast [20 x i8]* %6 to i8*
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8** %7
store i32 0, i32* %3
store i32 0, i32* %5
store i32 1, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %82, %0
%11 = load i32, i32* @stdin
%12 = call i32 @fgetc(i32 %11)
store i32 %12, i32* %2
%13 = load i32, i32* @EOF
%14 = icmp ne i32 %12, %13
br i1 %14, label %15, label %83
15: ; preds = %10
%16 = load i8*, i8** %7
%17 = bitcast i32* %2 to i8*
%18 = call i32 @strstr(i8* %16, i8* %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %34, label %20
20: ; preds = %15
store i32 0, i32* %4
store i32 1, i32* %5
%21 = load i32, i32* %2
%22 = trunc i32 %21 to i8
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
%25 = sext i32 %23 to i64
%26 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 %25
store i8 %22, i8* %26
%27 = load i32, i32* @stdin
%28 = call i64 @feof(i32 %27)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %20
%31 = load i32, i32* @stdin
%32 = call i32 @ungetc(i8 signext 10, i32 %31)
br label %33
33: ; preds = %30, %20
br label %82
34: ; preds = %15
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 %36
store i8 0, i8* %37
%38 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%39 = call i64 @strlen(i8* %38)
%40 = icmp sgt i64 %39, 0
br i1 %40, label %41, label %56
41: ; preds = %34
%42 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %42)
br label %44
44: ; preds = %48, %41
%45 = load i32, i32* %3
%46 = add nsw i32 %45, -1
store i32 %46, i32* %3
%47 = icmp sgt i32 %45, 0
br i1 %47, label %48, label %51
48: ; preds = %44
%49 = load i32, i32* @stdout
%50 = call i32 @fputc(i8 signext 45, i32 %49)
br label %44
51: ; preds = %44
%52 = load i32, i32* %3
%53 = add nsw i32 %52, 1
store i32 %53, i32* %3
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 %54
store i8 0, i8* %55
br label %56
56: ; preds = %51, %34
%57 = load i32, i32* %2
%58 = icmp ne i32 %57, 32
br i1 %58, label %59, label %66
59: ; preds = %56
%60 = load i32, i32* %2
%61 = icmp ne i32 %60, 9
br i1 %61, label %62, label %66
62: ; preds = %59
%63 = load i32, i32* %2
%64 = icmp ne i32 %63, 10
br i1 %64, label %65, label %66
65: ; preds = %62
store i32 0, i32* %4
br label %66
66: ; preds = %65, %62, %59, %56
%67 = load i32, i32* %2
%68 = icmp eq i32 %67, 10
br i1 %68, label %69, label %81
69: ; preds = %66
%70 = load i32, i32* %4
%71 = icmp ne i32 %70, 0
br i1 %71, label %81, label %72
72: ; preds = %69
store i32 1, i32* %4
%73 = load i32, i32* %5
%74 = icmp ne i32 %73, 0
br i1 %74, label %77, label %75
75: ; preds = %72
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
br label %79
77: ; preds = %72
store i32 0, i32* %5
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %79
79: ; preds = %77, %75
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
br label %81
81: ; preds = %79, %69, %66
br label %82
82: ; preds = %81, %33
br label %10
83: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c" \09\0A,.;:?!@#$%^*()-_=+`~[]{}\\|'\22<>/\00"
@stdin = global i32 0
@EOF = global i32 0
@.str.2 = [7 x i8] c"\0A%-20s\00"
@stdout = global i32 0
@str.5 = [43 x i8] c"\0A--No alpha-numeric characters in stream--\00"
@str.6 = [48 x i8] c"\0A+++++++++++++++++++++++++++++++++++++++++++++\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.6, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgetc(i32 %6)
store i32 %7, i32* %1
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %69, label %10
10: ; preds = %0, %61
%11 = phi i32 [ %64, %61 ], [ 0, %0 ]
%12 = phi i32 [ %63, %61 ], [ 0, %0 ]
%13 = phi i32 [ %62, %61 ], [ 1, %0 ]
%14 = call i32 @strstr(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %28
16: ; preds = %10
%17 = load i32, i32* %1
%18 = trunc i32 %17 to i8
%19 = add nsw i32 %11, 1
%20 = sext i32 %11 to i64
%21 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 %20
store i8 %18, i8* %21
%22 = load i32, i32* @stdin
%23 = call i64 @feof(i32 %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %61, label %25
25: ; preds = %16
%26 = load i32, i32* @stdin
%27 = call i32 @ungetc(i8 signext 10, i32 %26)
br label %61
28: ; preds = %10
%29 = sext i32 %11 to i64
%30 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 %29
store i8 0, i8* %30
%31 = call i64 @strlen(i8* %4)
%32 = icmp sgt i64 %31, 0
br i1 %32, label %33, label %46
33: ; preds = %28
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%35 = icmp sgt i32 %11, 0
br i1 %35, label %36, label %42
36: ; preds = %33, %36
%37 = phi i32 [ %38, %36 ], [ %11, %33 ]
%38 = add nsw i32 %37, -1
%39 = load i32, i32* @stdout
%40 = call i32 @fputc(i8 signext 45, i32 %39)
%41 = icmp ugt i32 %37, 1
br i1 %41, label %36, label %42
42: ; preds = %36, %33
%43 = phi i32 [ %11, %33 ], [ 0, %36 ]
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 %44
store i8 0, i8* %45
br label %46
46: ; preds = %42, %28
%47 = phi i32 [ %43, %42 ], [ %11, %28 ]
%48 = load i32, i32* %1
switch i32 %48, label %61 [
i32 32, label %49
i32 10, label %49
i32 9, label %49
]
49: ; preds = %46, %46, %46
%50 = icmp ne i32 %48, 10
%51 = icmp ne i32 %13, 0
%52 = select i1 %50, i1 true, i1 %51
br i1 %52, label %61, label %53
53: ; preds = %49
%54 = icmp eq i32 %12, 0
br i1 %54, label %55, label %57
55: ; preds = %53
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.5, i64 0, i64 0))
br label %59
57: ; preds = %53
%58 = call i32 @putchar(i32 10)
br label %59
59: ; preds = %57, %55
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.6, i64 0, i64 0))
br label %61
61: ; preds = %46, %49, %59, %16, %25
%62 = phi i32 [ %13, %49 ], [ 1, %59 ], [ 0, %25 ], [ 0, %16 ], [ 0, %46 ]
%63 = phi i32 [ %12, %49 ], [ 0, %59 ], [ 1, %25 ], [ 1, %16 ], [ %12, %46 ]
%64 = phi i32 [ %47, %49 ], [ %47, %59 ], [ %19, %25 ], [ %19, %16 ], [ %47, %46 ]
%65 = load i32, i32* @stdin
%66 = call i32 @fgetc(i32 %65)
store i32 %66, i32* %1
%67 = load i32, i32* @EOF
%68 = icmp eq i32 %66, %67
br i1 %68, label %69, label %10
69: ; preds = %61, %0
ret i32 0
}