#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 /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, v;
  int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, k = 0, l = 0;
  scanf("%d", &n);
  while (n > 0) {
    v = n % 10;
    if (v == 0)
      a++;
    if (v == 1)
      b++;
    if (v == 2)
      c++;
    if (v == 3)
      d++;
    if (v == 4)
      e++;
    if (v == 5)
      f++;
    if (v == 6)
      g++;
    if (v == 7)
      h++;
    if (v == 8)
      k++;
    if (v == 9)
      l++;
    n = n / 10;
  }
  printf("\n 0li = %d", a);
  printf("\n 1ci = %d", b);
  printf("\n 2ki = %d", c);
  printf("\n 3ki = %d", d);
  printf("\n 4ki = %d", e);
  printf("\n 5ci = %d", f);
  printf("\n 6ci = %d", g);
  printf("\n 7ci = %d", h);
  printf("\n 8ci = %d", k);
  printf("\n 9ki = %d", l);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
lea    0xe97(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    126e <main+0x14e>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11b0 <main+0x90>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    11c3 <main+0xa3>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    11d6 <main+0xb6>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x3,-0xc(%rbp)
jne    11e9 <main+0xc9>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x4,-0xc(%rbp)
jne    11fc <main+0xdc>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x5,-0xc(%rbp)
jne    120f <main+0xef>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x6,-0xc(%rbp)
jne    1222 <main+0x102>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x7,-0xc(%rbp)
jne    1235 <main+0x115>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x8,-0xc(%rbp)
jne    1248 <main+0x128>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x9,-0xc(%rbp)
jne    125b <main+0x13b>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1185 <main+0x65>
mov    -0x10(%rbp),%esi
lea    0xd88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xd84(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xd80(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xd7c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xd78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xd74(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xd70(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xd6c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xd68(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xd64(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
lea    0xf06(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
pxor   %xmm5,%xmm5
test   %eax,%eax
jle    11ba <main+0x9a>
xor    %ebx,%ebx
mov    $0xcccccccd,%ecx
movdqa 0xeae(%rip),%xmm0
movdqa 0xeb6(%rip),%xmm1
xor    %ebp,%ebp
pxor   %xmm4,%xmm4
mov    %eax,%edx
mov    %eax,%eax
imul   %rcx,%rax
shr    $0x23,%rax
lea    (%rax,%rax,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edx,%edi
sub    %esi,%edi
movd   %edi,%xmm2
pshufd $0x0,%xmm2,%xmm2
movdqa %xmm2,%xmm3
pcmpeqd %xmm0,%xmm3
psubd  %xmm3,%xmm5
pcmpeqd %xmm1,%xmm2
psubd  %xmm2,%xmm4
xor    %esi,%esi
cmp    $0x8,%edi
sete   %sil
add    %esi,%ebp
xor    %esi,%esi
cmp    $0x9,%edi
sete   %sil
add    %esi,%ebx
cmp    $0x9,%edx
ja     1160 <main+0x40>
mov    %eax,0xc(%rsp)
movdqa %xmm4,0x10(%rsp)
jmp    11c8 <main+0xa8>
xor    %ebp,%ebp
xor    %ebx,%ebx
pxor   %xmm0,%xmm0
movdqa %xmm0,0x10(%rsp)
movdqa %xmm5,0x20(%rsp)
movd   %xmm5,%esi
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
pshufd $0x55,0x20(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xee,0x20(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xff,0x20(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe23(%rip),%rdi
call   1030 <printf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe18(%rip),%rdi
call   1030 <printf@plt>
pshufd $0x55,0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xee,0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe00(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xff,0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xdf4(%rip),%rdi
call   1030 <printf@plt>
lea    0xdf3(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xdf0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"\0A 0li = %d\00"
@.str.2 = [11 x i8] c"\0A 1ci = %d\00"
@.str.3 = [11 x i8] c"\0A 2ki = %d\00"
@.str.4 = [11 x i8] c"\0A 3ki = %d\00"
@.str.5 = [11 x i8] c"\0A 4ki = %d\00"
@.str.6 = [11 x i8] c"\0A 5ci = %d\00"
@.str.7 = [11 x i8] c"\0A 6ci = %d\00"
@.str.8 = [11 x i8] c"\0A 7ci = %d\00"
@.str.9 = [11 x i8] c"\0A 8ci = %d\00"
@.str.10 = [11 x i8] c"\0A 9ki = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %15
15: ; preds = %80, %0
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %83
18: ; preds = %15
%19 = load i32, i32* %2
%20 = srem i32 %19, 10
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %26
26: ; preds = %23, %18
%27 = load i32, i32* %3
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %32
32: ; preds = %29, %26
%33 = load i32, i32* %3
%34 = icmp eq i32 %33, 2
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
br label %38
38: ; preds = %35, %32
%39 = load i32, i32* %3
%40 = icmp eq i32 %39, 3
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i32, i32* %7
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %44
44: ; preds = %41, %38
%45 = load i32, i32* %3
%46 = icmp eq i32 %45, 4
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i32, i32* %8
%49 = add nsw i32 %48, 1
store i32 %49, i32* %8
br label %50
50: ; preds = %47, %44
%51 = load i32, i32* %3
%52 = icmp eq i32 %51, 5
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = load i32, i32* %9
%55 = add nsw i32 %54, 1
store i32 %55, i32* %9
br label %56
56: ; preds = %53, %50
%57 = load i32, i32* %3
%58 = icmp eq i32 %57, 6
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = load i32, i32* %10
%61 = add nsw i32 %60, 1
store i32 %61, i32* %10
br label %62
62: ; preds = %59, %56
%63 = load i32, i32* %3
%64 = icmp eq i32 %63, 7
br i1 %64, label %65, label %68
65: ; preds = %62
%66 = load i32, i32* %11
%67 = add nsw i32 %66, 1
store i32 %67, i32* %11
br label %68
68: ; preds = %65, %62
%69 = load i32, i32* %3
%70 = icmp eq i32 %69, 8
br i1 %70, label %71, label %74
71: ; preds = %68
%72 = load i32, i32* %12
%73 = add nsw i32 %72, 1
store i32 %73, i32* %12
br label %74
74: ; preds = %71, %68
%75 = load i32, i32* %3
%76 = icmp eq i32 %75, 9
br i1 %76, label %77, label %80
77: ; preds = %74
%78 = load i32, i32* %13
%79 = add nsw i32 %78, 1
store i32 %79, i32* %13
br label %80
80: ; preds = %77, %74
%81 = load i32, i32* %2
%82 = sdiv i32 %81, 10
store i32 %82, i32* %2
br label %15
83: ; preds = %15
%84 = load i32, i32* %4
%85 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %84)
%86 = load i32, i32* %5
%87 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %86)
%88 = load i32, i32* %6
%89 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %88)
%90 = load i32, i32* %7
%91 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %90)
%92 = load i32, i32* %8
%93 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %92)
%94 = load i32, i32* %9
%95 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %94)
%96 = load i32, i32* %10
%97 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %96)
%98 = load i32, i32* %11
%99 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %98)
%100 = load i32, i32* %12
%101 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %100)
%102 = load i32, i32* %13
%103 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %102)
%104 = load i32, i32* %1
ret i32 %104
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"\0A 0li = %d\00"
@.str.2 = [11 x i8] c"\0A 1ci = %d\00"
@.str.3 = [11 x i8] c"\0A 2ki = %d\00"
@.str.4 = [11 x i8] c"\0A 3ki = %d\00"
@.str.5 = [11 x i8] c"\0A 4ki = %d\00"
@.str.6 = [11 x i8] c"\0A 5ci = %d\00"
@.str.7 = [11 x i8] c"\0A 6ci = %d\00"
@.str.8 = [11 x i8] c"\0A 7ci = %d\00"
@.str.9 = [11 x i8] c"\0A 8ci = %d\00"
@.str.10 = [11 x i8] c"\0A 9ki = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %26
6: ; preds = %0, %6
%7 = phi i32 [ %22, %6 ], [ 0, %0 ]
%8 = phi i32 [ %19, %6 ], [ 0, %0 ]
%9 = phi i32 [ %23, %6 ], [ %4, %0 ]
%10 = phi <8 x i32> [ %16, %6 ], [ zeroinitializer, %0 ]
%11 = urem i32 %9, 10
%12 = insertelement <8 x i32> poison, i32 %11, i64 0
%13 = shufflevector <8 x i32> %12, <8 x i32> poison, <8 x i32> zeroinitializer
%14 = icmp eq <8 x i32> %13, <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
%15 = zext <8 x i1> %14 to <8 x i32>
%16 = add nuw nsw <8 x i32> %10, %15
%17 = icmp eq i32 %11, 8
%18 = zext i1 %17 to i32
%19 = add nuw nsw i32 %8, %18
%20 = icmp eq i32 %11, 9
%21 = zext i1 %20 to i32
%22 = add nuw nsw i32 %7, %21
%23 = udiv i32 %9, 10
%24 = icmp ult i32 %9, 10
br i1 %24, label %25, label %6
25: ; preds = %6
store i32 %23, i32* %1
br label %26
26: ; preds = %25, %0
%27 = phi i32 [ %19, %25 ], [ 0, %0 ]
%28 = phi i32 [ %22, %25 ], [ 0, %0 ]
%29 = phi <8 x i32> [ %16, %25 ], [ zeroinitializer, %0 ]
%30 = extractelement <8 x i32> %29, i64 0
%31 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = extractelement <8 x i32> %29, i64 1
%33 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %32)
%34 = extractelement <8 x i32> %29, i64 2
%35 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = extractelement <8 x i32> %29, i64 3
%37 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %36)
%38 = extractelement <8 x i32> %29, i64 4
%39 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %38)
%40 = extractelement <8 x i32> %29, i64 5
%41 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %40)
%42 = extractelement <8 x i32> %29, i64 6
%43 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %42)
%44 = extractelement <8 x i32> %29, i64 7
%45 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %44)
%46 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %27)
%47 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %28)
ret i32 0
}