#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 *, char *);
int strlen(char *);
int main() {
  char a[20];
  int l, i, j, m = 0;
  scanf("%s", a);
  l = strlen(a);
  for (i = 0; i < l; i++) {
    for (j = i + 1; j < l; j++) {
      if (a[i] == a[j]) {
        m++;
        printf("%c repeated\n", a[j]);
        break;
      }
    }
  }
  if (m == 0) {
    printf("All Unique\n");
  } else {
    printf("%d character match found\n", m);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x30(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11ef <main+0xbf>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11dc <main+0xac>
movslq -0x28(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
movslq -0x2c(%rbp),%rcx
movsbl -0x20(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    11c9 <main+0x99>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
movslq -0x2c(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%esi
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11dc <main+0xac>
jmp    11ce <main+0x9e>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117e <main+0x4e>
jmp    11e1 <main+0xb1>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1169 <main+0x39>
cmpl   $0x0,-0x30(%rbp)
jne    120c <main+0xdc>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    121d <main+0xed>
mov    -0x30(%rbp),%esi
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    11ea <main+0xaa>
mov    %eax,%r12d
lea    0x1(%rsp),%rbp
lea    -0x1(%r12),%rbx
lea    0xe83(%rip),%r14
xor    %r13d,%r13d
xor    %r15d,%r15d
jmp    11ab <main+0x6b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15d
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
add    $0xffffffffffffffff,%rbx
cmp    %r12,%r13
je     11d2 <main+0x92>
mov    %r13,%rax
add    $0x1,%r13
cmp    %r12,%r13
jae    119e <main+0x5e>
movsbl (%rsp,%rax,1),%esi
xor    %eax,%eax
nopl   (%rax)
cmp    0x0(%rbp,%rax,1),%sil
je     1190 <main+0x50>
add    $0x1,%rax
cmp    %rax,%rbx
jne    11c0 <main+0x80>
jmp    119e <main+0x5e>
test   %r15d,%r15d
je     11ea <main+0xaa>
lea    0xe32(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11f6 <main+0xb6>
lea    0xe39(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [13 x i8] c"%c repeated\0A\00"
@.str.3 = [26 x i8] c"%d character match found\0A\00"
@str = [11 x i8] c"All Unique\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @strlen(i8* %2)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %36
6: ; preds = %0
%7 = zext i32 %4 to i64
%8 = zext i32 %4 to i64
br label %9
9: ; preds = %6, %30
%10 = phi i64 [ 0, %6 ], [ %13, %30 ]
%11 = phi i64 [ 1, %6 ], [ %32, %30 ]
%12 = phi i32 [ 0, %6 ], [ %31, %30 ]
%13 = add nuw nsw i64 %10, 1
%14 = icmp ult i64 %13, %7
br i1 %14, label %15, label %30
15: ; preds = %9
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %10
%17 = load i8, i8* %16
br label %20
18: ; preds = %20
%19 = icmp eq i64 %25, %8
br i1 %19, label %30, label %20
20: ; preds = %15, %18
%21 = phi i64 [ %11, %15 ], [ %25, %18 ]
%22 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = icmp eq i8 %17, %23
%25 = add nuw nsw i64 %21, 1
br i1 %24, label %26, label %18
26: ; preds = %20
%27 = sext i8 %17 to i32
%28 = add nsw i32 %12, 1
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %27)
br label %30
30: ; preds = %18, %9, %26
%31 = phi i32 [ %28, %26 ], [ %12, %9 ], [ %12, %18 ]
%32 = add nuw nsw i64 %11, 1
%33 = icmp eq i64 %13, %8
br i1 %33, label %34, label %9
34: ; preds = %30
%35 = icmp eq i32 %31, 0
br i1 %35, label %36, label %38
36: ; preds = %0, %34
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %40
38: ; preds = %34
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %31)
br label %40
40: ; preds = %38, %36
ret i32 0
}