#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 digits[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  int num, digit, i;
  scanf("%d", &num);
  while (num != 0) {
    digit = num % 10;
    digits[digit]++;
    num /= 10;
  }
  int helpCounter = 0;
  for (i = 0; i < 10; i++) {
    if (digits[i] > 1) {
      printf(" %d repeats\n", i);
      helpCounter = 1;
    }
  }
  if (!helpCounter) {
    printf("The Digits Do Not Repeat\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)
je     1199 <main+0x69>
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    115f <main+0x2f>
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0xa,-0x3c(%rbp)
jge    11eb <main+0xbb>
movslq -0x3c(%rbp),%rax
cmpl   $0x1,-0x30(%rbp,%rax,4)
jle    11d8 <main+0xa8>
mov    -0x3c(%rbp),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x40(%rbp)
jmp    11dd <main+0xad>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11a7 <main+0x77>
cmpl   $0x0,-0x40(%rbp)
jne    1203 <main+0xd3>
lea    0xe14(%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
xor    %ebx,%ebx
test   %eax,%eax
je     11c1 <main+0x91>
cs 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
movslq %esi,%rdx
addl   $0x1,0x10(%rsp,%rdx,4)
add    $0x9,%ecx
cmp    $0x13,%ecx
jae    1170 <main+0x40>
mov    %eax,0xc(%rsp)
cmpl   $0x1,0x10(%rsp)
jle    11c1 <main+0x91>
lea    0xe50(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x14(%rsp)
jge    1238 <main+0x108>
cmpl   $0x2,0x18(%rsp)
jge    125b <main+0x12b>
cmpl   $0x2,0x1c(%rsp)
jge    127e <main+0x14e>
cmpl   $0x2,0x20(%rsp)
jge    12a1 <main+0x171>
cmpl   $0x2,0x24(%rsp)
jge    12c4 <main+0x194>
cmpl   $0x2,0x28(%rsp)
jge    12e7 <main+0x1b7>
cmpl   $0x2,0x2c(%rsp)
jge    130a <main+0x1da>
cmpl   $0x2,0x30(%rsp)
jge    132d <main+0x1fd>
cmpl   $0x2,0x34(%rsp)
jl     1350 <main+0x220>
lea    0xddc(%rip),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1360 <main+0x230>
lea    0xdc4(%rip),%rdi
mov    $0x1,%ebx
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x2,0x18(%rsp)
jl     11d3 <main+0xa3>
lea    0xda1(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x1c(%rsp)
jl     11de <main+0xae>
lea    0xd7e(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x20(%rsp)
jl     11e9 <main+0xb9>
lea    0xd5b(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x24(%rsp)
jl     11f4 <main+0xc4>
lea    0xd38(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x28(%rsp)
jl     11ff <main+0xcf>
lea    0xd15(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x2c(%rsp)
jl     120a <main+0xda>
lea    0xcf2(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x30(%rsp)
jl     1215 <main+0xe5>
lea    0xccf(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
cmpl   $0x2,0x34(%rsp)
jge    1220 <main+0xf0>
test   %ebx,%ebx
jne    1360 <main+0x230>
lea    0xcb5(%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 = [13 x i8] c" %d repeats\0A\00"
@.str.2 = [26 x i8] c"The Digits Do Not Repeat\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [10 x i32]* %2 to i8*
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %9
9: ; preds = %12, %0
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load i32, i32* %3
%14 = srem i32 %13, 10
store i32 %14, i32* %4
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
store i32 %19, i32* %17
%20 = load i32, i32* %3
%21 = sdiv i32 %20, 10
store i32 %21, i32* %3
br label %9
22: ; preds = %9
store i32 0, i32* %6
store i32 0, i32* %5
br label %23
23: ; preds = %36, %22
%24 = load i32, i32* %5
%25 = icmp slt i32 %24, 10
br i1 %25, label %26, label %39
26: ; preds = %23
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = icmp sgt i32 %30, 1
br i1 %31, label %32, label %35
32: ; preds = %26
%33 = load i32, i32* %5
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %33)
store i32 1, i32* %6
br label %35
35: ; preds = %32, %26
br label %36
36: ; preds = %35
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %23
39: ; preds = %23
%40 = load i32, i32* %6
%41 = icmp ne i32 %40, 0
br i1 %41, label %44, label %42
42: ; preds = %39
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %44
44: ; preds = %42, %39
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c" %d repeats\0A\00"
@str = [25 x i8] c"The Digits Do Not Repeat\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 eq i32 %6, 0
br i1 %7, label %24, label %12
8: ; preds = %12
store i32 %19, i32* %2
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, 1
br i1 %11, label %22, label %24
12: ; preds = %0, %12
%13 = phi i32 [ %19, %12 ], [ %6, %0 ]
%14 = srem i32 %13, 10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %15
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
store i32 %18, i32* %16
%19 = sdiv i32 %13, 10
%20 = add i32 %13, 9
%21 = icmp ult i32 %20, 19
br i1 %21, label %8, label %12
22: ; preds = %8
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 0)
br label %24
24: ; preds = %0, %8, %22
%25 = phi i32 [ 1, %22 ], [ 0, %8 ], [ 0, %0 ]
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%27 = load i32, i32* %26
%28 = icmp sgt i32 %27, 1
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %31
31: ; preds = %29, %24
%32 = phi i32 [ 1, %29 ], [ %25, %24 ]
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%34 = load i32, i32* %33
%35 = icmp sgt i32 %34, 1
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 2)
br label %38
38: ; preds = %36, %31
%39 = phi i32 [ 1, %36 ], [ %32, %31 ]
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%41 = load i32, i32* %40
%42 = icmp sgt i32 %41, 1
br i1 %42, label %43, label %45
43: ; preds = %38
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 3)
br label %45
45: ; preds = %43, %38
%46 = phi i32 [ 1, %43 ], [ %39, %38 ]
%47 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%48 = load i32, i32* %47
%49 = icmp sgt i32 %48, 1
br i1 %49, label %50, label %52
50: ; preds = %45
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 4)
br label %52
52: ; preds = %50, %45
%53 = phi i32 [ 1, %50 ], [ %46, %45 ]
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%55 = load i32, i32* %54
%56 = icmp sgt i32 %55, 1
br i1 %56, label %57, label %59
57: ; preds = %52
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 5)
br label %59
59: ; preds = %57, %52
%60 = phi i32 [ 1, %57 ], [ %53, %52 ]
%61 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
%62 = load i32, i32* %61
%63 = icmp sgt i32 %62, 1
br i1 %63, label %64, label %66
64: ; preds = %59
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 6)
br label %66
66: ; preds = %64, %59
%67 = phi i32 [ 1, %64 ], [ %60, %59 ]
%68 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%69 = load i32, i32* %68
%70 = icmp sgt i32 %69, 1
br i1 %70, label %71, label %73
71: ; preds = %66
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 7)
br label %73
73: ; preds = %71, %66
%74 = phi i32 [ 1, %71 ], [ %67, %66 ]
%75 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%76 = load i32, i32* %75
%77 = icmp sgt i32 %76, 1
br i1 %77, label %78, label %80
78: ; preds = %73
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 8)
br label %80
80: ; preds = %78, %73
%81 = phi i32 [ 1, %78 ], [ %74, %73 ]
%82 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
%83 = load i32, i32* %82
%84 = icmp sgt i32 %83, 1
br i1 %84, label %85, label %87
85: ; preds = %80
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 9)
br label %91
87: ; preds = %80
%88 = icmp eq i32 %81, 0
br i1 %88, label %89, label %91
89: ; preds = %87
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
br label %91
91: ; preds = %85, %89, %87
ret i32 0
}