#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, int);
int main() {
  int c;
  int nb, nt, nl;
  nb = 0;
  nt = 0;
  nl = 0;
  while ((c = getchar()) != EOF) {
    if (c == ' ')
      ++nb;
    else if (c == '\n')
      ++nl;
    else if (c == '\t')
      ;
    ++nt;
  }
  printf("%d %d %d\n", nb, nt, nl);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e93(%rip),%rcx
cmp    (%rcx),%eax
je     11b4 <main+0x94>
cmpl   $0x20,-0x8(%rbp)
jne    1175 <main+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a6 <main+0x86>
cmpl   $0xa,-0x8(%rbp)
jne    118d <main+0x6d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a1 <main+0x81>
cmpl   $0x9,-0x8(%rbp)
jne    119c <main+0x7c>
jmp    119c <main+0x7c>
jmp    11a1 <main+0x81>
jmp    11a6 <main+0x86>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <main+0x24>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb0(%rip),%r15
mov    $0x0,%ebx
mov    $0x0,%ebp
cmp    (%r15),%eax
jne    1167 <main+0x47>
lea    0xeb2(%rip),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
xor    %ebx,%ebx
xor    %r14d,%r14d
jmp    1182 <main+0x62>
add    $0x1,%ebp
add    $0x1,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r15),%eax
je     1147 <main+0x27>
cmp    $0xa,%eax
je     1170 <main+0x50>
cmp    $0x20,%eax
jne    1173 <main+0x53>
add    $0x1,%r14d
jmp    1173 <main+0x53>

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

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