#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 main() {
  int c, i, flag, nother;
  int ndigit[10];
  flag = nother = 0;
  for (int i = 0; i < 10; ++i) {
    ndigit[i] = 0;
  }
  while ((c = getchar()) != EOF) {
    if (flag >= 9) {
      ndigit[9] += 1;
      flag = 0;
    }
    if (c != ' ' && c != '\t' && c != '\n') {
      flag += 1;
    } else {
      ndigit[flag] += 1;
      flag = 0;
    }
  }
  for (int i = 0; i < 10; ++i) {
    printf("the number of length i %d  is : %d\n", i, ndigit[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xa,-0x44(%rbp)
jge    1168 <main+0x48>
movslq -0x44(%rbp),%rax
movl   $0x0,-0x40(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1144 <main+0x24>
jmp    116d <main+0x4d>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e6a(%rip),%rcx
cmp    (%rcx),%eax
je     11e7 <main+0xc7>
cmpl   $0x9,-0x10(%rbp)
jl     11a0 <main+0x80>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     11cc <main+0xac>
cmpl   $0x9,-0x8(%rbp)
je     11cc <main+0xac>
cmpl   $0xa,-0x8(%rbp)
je     11cc <main+0xac>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11e2 <main+0xc2>
movslq -0x10(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
movl   $0x0,-0x10(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0x48(%rbp)
cmpl   $0xa,-0x48(%rbp)
jge    121d <main+0xfd>
mov    -0x48(%rbp),%esi
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edx
lea    0xdf6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11ee <main+0xce>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x30(%rsp)
xor    %r14d,%r14d
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2e93(%rip),%rbx
mov    $0x0,%ecx
mov    $0x0,%esi
mov    $0x0,%edi
mov    $0x0,%ebp
mov    $0x0,%r8d
mov    $0x0,%r15d
mov    $0x0,%r12d
mov    $0x0,%r13d
mov    $0x0,%edx
cmp    (%rbx),%eax
je     1200 <main+0xe0>
movabs $0x100000600,%r14
xor    %ebp,%ebp
jmp    11ae <main+0x8e>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     11d3 <main+0xb3>
cmp    $0x9,%ebp
jl     11ba <main+0x9a>
addl   $0x1,0x34(%rsp)
xor    %ebp,%ebp
cmp    $0x20,%eax
ja     11a0 <main+0x80>
mov    %eax,%eax
bt     %rax,%r14
jae    11a0 <main+0x80>
movslq %ebp,%rax
addl   $0x1,0x10(%rsp,%rax,4)
xor    %ebp,%ebp
jmp    11a3 <main+0x83>
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%r13d
mov    0x18(%rsp),%r12d
mov    0x1c(%rsp),%r15d
mov    0x20(%rsp),%r8d
mov    0x24(%rsp),%ebp
mov    0x28(%rsp),%edi
mov    0x2c(%rsp),%esi
mov    0x30(%rsp),%ecx
mov    0x34(%rsp),%r14d
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %ecx,0x8(%rsp)
mov    %r14d,0xc(%rsp)
lea    0xde9(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebp,%ebx
mov    %r8d,%ebp
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %r13d,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    %r12d,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    %r15d,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x6,%esi
mov    (%rsp),%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x7,%esi
mov    0x4(%rsp),%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
mov    0x8(%rsp),%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x9,%esi
mov    0xc(%rsp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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