#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 = 0, i = 0;
  int number0 = 0, number1 = 0, number2 = 0, number3 = 0, number4 = 0,
      number5 = 0, number6 = 0, number7 = 0, number8 = 0, number9 = 0;
  scanf("%d", &n);
  while (n != 0) {
    i = n % 10;
    n = n / 10;
    if (i == 0) {
      number0++;
    }
    if (i == 1) {
      number1++;
    }
    if (i == 2) {
      number2++;
    }
    if (i == 3) {
      number3++;
    }
    if (i == 4) {
      number4++;
    }
    if (i == 5) {
      number5++;
    }
    if (i == 6) {
      number6++;
    }
    if (i == 7) {
      number7++;
    }
    if (i == 8) {
      number8++;
    }
    if (i == 9) {
      number9++;
    }
  }
  printf("cifrata 0 se sreshta %d puti\n", number0);
  printf("cifrata 1 se sreshta %d puti\n", number1);
  printf("cifrata 2 se sreshta %d puti\n", number2);
  printf("cifrata 3 se sreshta %d puti\n", number3);
  printf("cifrata 4 se sreshta %d puti\n", number4);
  printf("cifrata 5 se sreshta %d puti\n", number5);
  printf("cifrata 6 se sreshta %d puti\n", number6);
  printf("cifrata 7 se sreshta %d puti\n", number7);
  printf("cifrata 8 se sreshta %d puti\n", number8);
  printf("cifrata 9 se sreshta %d puti\n", number9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%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    0xe76(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     127c <main+0x15c>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11cc <main+0xac>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    11df <main+0xbf>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    11f2 <main+0xd2>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x3,-0xc(%rbp)
jne    1205 <main+0xe5>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x4,-0xc(%rbp)
jne    1218 <main+0xf8>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x5,-0xc(%rbp)
jne    122b <main+0x10b>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x6,-0xc(%rbp)
jne    123e <main+0x11e>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x7,-0xc(%rbp)
jne    1251 <main+0x131>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x8,-0xc(%rbp)
jne    1264 <main+0x144>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x9,-0xc(%rbp)
jne    1277 <main+0x157>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1193 <main+0x73>
mov    -0x10(%rbp),%esi
lea    0xd7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xd8c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xd9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xdaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xdb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xdc8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xdd7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xde6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xe04(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
movl   $0x0,0xc(%rsp)
lea    0xeeb(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
pxor   %xmm5,%xmm5
test   %eax,%eax
je     11d6 <main+0xb6>
xor    %ebx,%ebx
movdqa 0xea7(%rip),%xmm0
movdqa 0xeaf(%rip),%xmm1
xor    %ebp,%ebp
pxor   %xmm4,%xmm4
nopw   0x0(%rax,%rax,1)
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
lea    (%rax,%rax,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
movd   %esi,%xmm2
pshufd $0x0,%xmm2,%xmm2
movdqa %xmm2,%xmm3
pcmpeqd %xmm0,%xmm3
psubd  %xmm3,%xmm5
pcmpeqd %xmm1,%xmm2
psubd  %xmm2,%xmm4
xor    %edx,%edx
cmp    $0x8,%esi
sete   %dl
add    %edx,%ebp
xor    %edx,%edx
cmp    $0x9,%esi
sete   %dl
add    %edx,%ebx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1170 <main+0x50>
mov    %eax,0xc(%rsp)
movdqa %xmm4,0x10(%rsp)
jmp    11e4 <main+0xc4>
xor    %ebp,%ebp
xor    %ebx,%ebx
pxor   %xmm0,%xmm0
movdqa %xmm0,0x10(%rsp)
movdqa %xmm5,0x20(%rsp)
movd   %xmm5,%esi
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
pshufd $0x55,0x20(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xee,0x20(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xff,0x20(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
pshufd $0x55,0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xee,0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
pshufd $0xff,0x10(%rsp),%xmm0
movd   %xmm0,%esi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
lea    0xe72(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe82(%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 = [30 x i8] c"cifrata 0 se sreshta %d puti\0A\00"
@.str.2 = [30 x i8] c"cifrata 1 se sreshta %d puti\0A\00"
@.str.3 = [30 x i8] c"cifrata 2 se sreshta %d puti\0A\00"
@.str.4 = [30 x i8] c"cifrata 3 se sreshta %d puti\0A\00"
@.str.5 = [30 x i8] c"cifrata 4 se sreshta %d puti\0A\00"
@.str.6 = [30 x i8] c"cifrata 5 se sreshta %d puti\0A\00"
@.str.7 = [30 x i8] c"cifrata 6 se sreshta %d puti\0A\00"
@.str.8 = [30 x i8] c"cifrata 7 se sreshta %d puti\0A\00"
@.str.9 = [30 x i8] c"cifrata 8 se sreshta %d puti\0A\00"
@.str.10 = [30 x i8] c"cifrata 9 se sreshta %d puti\0A\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* %2
store i32 0, i32* %3
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 = %82, %0
%16 = load i32, i32* %2
%17 = icmp ne 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* %2
%22 = sdiv i32 %21, 10
store i32 %22, i32* %2
%23 = load i32, i32* %3
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %18
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %28
28: ; preds = %25, %18
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 1
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %34
34: ; preds = %31, %28
%35 = load i32, i32* %3
%36 = icmp eq i32 %35, 2
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %40
40: ; preds = %37, %34
%41 = load i32, i32* %3
%42 = icmp eq i32 %41, 3
br i1 %42, label %43, label %46
43: ; preds = %40
%44 = load i32, i32* %7
%45 = add nsw i32 %44, 1
store i32 %45, i32* %7
br label %46
46: ; preds = %43, %40
%47 = load i32, i32* %3
%48 = icmp eq i32 %47, 4
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
br label %52
52: ; preds = %49, %46
%53 = load i32, i32* %3
%54 = icmp eq i32 %53, 5
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = load i32, i32* %9
%57 = add nsw i32 %56, 1
store i32 %57, i32* %9
br label %58
58: ; preds = %55, %52
%59 = load i32, i32* %3
%60 = icmp eq i32 %59, 6
br i1 %60, label %61, label %64
61: ; preds = %58
%62 = load i32, i32* %10
%63 = add nsw i32 %62, 1
store i32 %63, i32* %10
br label %64
64: ; preds = %61, %58
%65 = load i32, i32* %3
%66 = icmp eq i32 %65, 7
br i1 %66, label %67, label %70
67: ; preds = %64
%68 = load i32, i32* %11
%69 = add nsw i32 %68, 1
store i32 %69, i32* %11
br label %70
70: ; preds = %67, %64
%71 = load i32, i32* %3
%72 = icmp eq i32 %71, 8
br i1 %72, label %73, label %76
73: ; preds = %70
%74 = load i32, i32* %12
%75 = add nsw i32 %74, 1
store i32 %75, i32* %12
br label %76
76: ; preds = %73, %70
%77 = load i32, i32* %3
%78 = icmp eq i32 %77, 9
br i1 %78, label %79, label %82
79: ; preds = %76
%80 = load i32, i32* %13
%81 = add nsw i32 %80, 1
store i32 %81, i32* %13
br label %82
82: ; preds = %79, %76
br label %15
83: ; preds = %15
%84 = load i32, i32* %4
%85 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %84)
%86 = load i32, i32* %5
%87 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %86)
%88 = load i32, i32* %6
%89 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %88)
%90 = load i32, i32* %7
%91 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %90)
%92 = load i32, i32* %8
%93 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %92)
%94 = load i32, i32* %9
%95 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %94)
%96 = load i32, i32* %10
%97 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %96)
%98 = load i32, i32* %11
%99 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i32 %98)
%100 = load i32, i32* %12
%101 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %100)
%102 = load i32, i32* %13
%103 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i32 %102)
ret i32 0
}

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