#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i;
  int digits[10] = {0};
  int number;
  scanf("%d", &number);
  if (number < 0) {
    number *= -1;
  }
  while (number > 0) {
    int helper = number % 10;
    digits[helper]++;
    number /= 10;
  }
  int repeat = 0;
  for (i = 0; i < 10; i++) {
    if (digits[i] > 1) {
      printf("Cifrata %d se povtarq\n", i);
      repeat = 1;
    }
  }
  if (!repeat) {
    printf("nqma povtarqshti se cifri\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xeaa(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x34(%rbp)
jge    1170 <main+0x40>
imul   $0xffffffff,-0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    1175 <main+0x45>
cmpl   $0x0,-0x34(%rbp)
jle    11af <main+0x7f>
mov    -0x34(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
jmp    1175 <main+0x45>
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1201 <main+0xd1>
movslq -0x8(%rbp),%rax
cmpl   $0x1,-0x30(%rbp,%rax,4)
jle    11ee <main+0xbe>
mov    -0x8(%rbp),%esi
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x3c(%rbp)
jmp    11f3 <main+0xc3>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11bd <main+0x8d>
cmpl   $0x0,-0x3c(%rbp)
jne    1219 <main+0xe9>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x30(%rsp)
lea    0xeae(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
js     1174 <main+0x44>
jne    1176 <main+0x46>
xor    %ebx,%ebx
cmpl   $0x2,0x14(%rsp)
jl     11b8 <main+0x88>
jmp    1248 <main+0x118>
neg    %eax
mov    $0xcccccccd,%ecx
nopl   0x0(%rax,%rax,1)
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
addl   $0x1,0x10(%rsp,%rdi,4)
cmp    $0xa,%edx
jae    1180 <main+0x50>
mov    %eax,0xc(%rsp)
xor    %ebx,%ebx
cmpl   $0x1,0x10(%rsp)
jg     1228 <main+0xf8>
cmpl   $0x2,0x14(%rsp)
jge    1248 <main+0x118>
cmpl   $0x2,0x18(%rsp)
jge    126b <main+0x13b>
cmpl   $0x2,0x1c(%rsp)
jge    128e <main+0x15e>
cmpl   $0x2,0x20(%rsp)
jge    12b1 <main+0x181>
cmpl   $0x2,0x24(%rsp)
jge    12d4 <main+0x1a4>
cmpl   $0x2,0x28(%rsp)
jge    12f7 <main+0x1c7>
cmpl   $0x2,0x2c(%rsp)
jge    131a <main+0x1ea>
cmpl   $0x2,0x30(%rsp)
jge    133d <main+0x20d>
cmpl   $0x2,0x34(%rsp)
jl     1360 <main+0x230>
lea    0xdec(%rip),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1370 <main+0x240>
lea    0xdd4(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x14(%rsp)
jl     11b8 <main+0x88>
lea    0xdb4(%rip),%rdi
mov    $0x1,%ebx
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x2,0x18(%rsp)
jl     11c3 <main+0x93>
lea    0xd91(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x1c(%rsp)
jl     11ce <main+0x9e>
lea    0xd6e(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x20(%rsp)
jl     11d9 <main+0xa9>
lea    0xd4b(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x24(%rsp)
jl     11e4 <main+0xb4>
lea    0xd28(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x28(%rsp)
jl     11ef <main+0xbf>
lea    0xd05(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x2c(%rsp)
jl     11fa <main+0xca>
lea    0xce2(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x30(%rsp)
jl     1205 <main+0xd5>
lea    0xcbf(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x34(%rsp)
jge    1210 <main+0xe0>
test   %ebx,%ebx
jne    1370 <main+0x240>
lea    0xcaf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [23 x i8] c"Cifrata %d se povtarq\0A\00"
@.str.2 = [27 x i8] c"nqma povtarqshti se cifri\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [10 x i32]* %3 to i8*
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = load i32, i32* %4
%13 = mul nsw i32 %12, -1
store i32 %13, i32* %4
br label %14
14: ; preds = %11, %0
br label %15
15: ; preds = %18, %14
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = load i32, i32* %4
%20 = srem i32 %19, 10
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = add nsw i32 %24, 1
store i32 %25, i32* %23
%26 = load i32, i32* %4
%27 = sdiv i32 %26, 10
store i32 %27, i32* %4
br label %15
28: ; preds = %15
store i32 0, i32* %6
store i32 0, i32* %2
br label %29
29: ; preds = %42, %28
%30 = load i32, i32* %2
%31 = icmp slt i32 %30, 10
br i1 %31, label %32, label %45
32: ; preds = %29
%33 = load i32, i32* %2
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = icmp sgt i32 %36, 1
br i1 %37, label %38, label %41
38: ; preds = %32
%39 = load i32, i32* %2
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %39)
store i32 1, i32* %6
br label %41
41: ; preds = %38, %32
br label %42
42: ; preds = %41
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %29
45: ; preds = %29
%46 = load i32, i32* %6
%47 = icmp ne i32 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %50
50: ; preds = %48, %45
%51 = load i32, i32* %1
ret i32 %51
}

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