#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 getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c;
  int cc, lc, wc;
  int inWord = 0;
  ;
  c = EOF;
  while (c != EOF) {
    cc++;
    if (c == '\n')
      lc++;
    if (inWord && (c == '\n' || c == '\t' || c == ' ')) {
      wc++;
      inWord = 0;
    } else if (!inWord && c != '\n' && c != '\t' && c != ' ')
      inWord = 1;
    c = getchar();
    if (c == EOF && inWord)
      wc++;
  }
  inWord = 1;
  ;
  if (inWord)
    printf("%d", 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2e9c(%rip),%rcx
cmp    (%rcx),%eax
je     1215 <main+0xf5>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    1170 <main+0x50>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     11ad <main+0x8d>
cmpl   $0xa,-0x8(%rbp)
je     1198 <main+0x78>
cmpl   $0x9,-0x8(%rbp)
je     1198 <main+0x78>
cmpl   $0x20,-0x8(%rbp)
jne    11ad <main+0x8d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    11e1 <main+0xc1>
cmpl   $0x0,-0x18(%rbp)
jne    11dc <main+0xbc>
cmpl   $0xa,-0x8(%rbp)
je     11dc <main+0xbc>
cmpl   $0x9,-0x8(%rbp)
je     11dc <main+0xbc>
cmpl   $0x20,-0x8(%rbp)
je     11dc <main+0xbc>
movl   $0x1,-0x18(%rbp)
jmp    11e1 <main+0xc1>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2df3(%rip),%rcx
cmp    (%rcx),%eax
jne    1210 <main+0xf0>
cmpl   $0x0,-0x18(%rbp)
je     1210 <main+0xf0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1142 <main+0x22>
movl   $0x1,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1237 <main+0x117>
lea    0xdd3(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
%7 = load i32, i32* @EOF
store i32 %7, i32* %2
br label %8
8: ; preds = %60, %0
%9 = load i32, i32* %2
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %61
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 10
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %20
20: ; preds = %17, %12
%21 = load i32, i32* %6
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %35
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 10
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 9
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %2
%31 = icmp eq i32 %30, 32
br i1 %31, label %32, label %35
32: ; preds = %29, %26, %23
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
store i32 0, i32* %6
br label %49
35: ; preds = %29, %20
%36 = load i32, i32* %6
%37 = icmp ne i32 %36, 0
br i1 %37, label %48, label %38
38: ; preds = %35
%39 = load i32, i32* %2
%40 = icmp ne i32 %39, 10
br i1 %40, label %41, label %48
41: ; preds = %38
%42 = load i32, i32* %2
%43 = icmp ne i32 %42, 9
br i1 %43, label %44, label %48
44: ; preds = %41
%45 = load i32, i32* %2
%46 = icmp ne i32 %45, 32
br i1 %46, label %47, label %48
47: ; preds = %44
store i32 1, i32* %6
br label %48
48: ; preds = %47, %44, %41, %38, %35
br label %49
49: ; preds = %48, %32
%50 = call i32 (...) @getchar()
store i32 %50, i32* %2
%51 = load i32, i32* %2
%52 = load i32, i32* @EOF
%53 = icmp eq i32 %51, %52
br i1 %53, label %54, label %60
54: ; preds = %49
%55 = load i32, i32* %6
%56 = icmp ne i32 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %54
%58 = load i32, i32* %5
%59 = add nsw i32 %58, 1
store i32 %59, i32* %5
br label %60
60: ; preds = %57, %54, %49
br label %8
61: ; preds = %8
store i32 1, i32* %6
%62 = load i32, i32* %6
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
br label %66
66: ; preds = %64, %61
%67 = load i32, i32* %1
ret i32 %67
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}