#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 */
scalar_t__ malloc(int);
int /*<<< orphan*/ print(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int transform(char *);
int main() {
  int n, i, j, flag = 0, phone;
  char s[256];
  int *list = (int *)malloc(10000000 * sizeof(int));
  for (i = 0; i < 10000000; i++)
    list[i] = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", s);
    phone = transform(s);
    list[phone]++;
  }
  for (i = 0; i < 10000000; i++) {
    if (list[i] > 1) {
      flag = 1;
      print(i, list[i]);
    }
  }
  if (!flag)
    printf("No duplicates.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x2625a00,%edi
call   1060 <malloc@plt>
mov    %rax,-0x128(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x989680,-0xc(%rbp)
jge    11ae <main+0x5e>
mov    -0x128(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1181 <main+0x31>
lea    0xe4b(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1219 <main+0xc9>
lea    -0x120(%rbp),%rsi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x120(%rbp),%rdi
call   1030 <transform@plt>
mov    %eax,-0x18(%rbp)
mov    -0x128(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c7 <main+0x77>
movl   $0x0,-0xc(%rbp)
cmpl   $0x989680,-0xc(%rbp)
jge    1272 <main+0x122>
mov    -0x128(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jle    125f <main+0x10f>
movl   $0x1,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x128(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1050 <print@plt>
jmp    1264 <main+0x114>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1220 <main+0xd0>
cmpl   $0x0,-0x14(%rbp)
jne    1288 <main+0x138>
lea    0xd83(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x118,%rsp
mov    $0x2625a00,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    $0x2625a00,%edx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
lea    0xe70(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11e5 <main+0x85>
lea    0xe59(%rip),%r15
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    %rbx,%rdi
call   1030 <transform@plt>
cltq
addl   $0x1,(%r14,%rax,4)
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     11c0 <main+0x60>
mov    $0x1,%al
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%esi
cmp    $0x1,%esi
jg     1208 <main+0xa8>
add    $0x1,%rbx
cmp    $0x989680,%rbx
jne    11f0 <main+0x90>
jmp    1223 <main+0xc3>
mov    %ebx,%edi
call   1060 <print@plt>
lea    0x1(%rbx),%rcx
xor    %eax,%eax
cmp    $0x98967f,%rbx
mov    %rcx,%rbx
jne    11f0 <main+0x90>
jmp    1233 <main+0xd3>
test   $0x1,%al
je     1233 <main+0xd3>
lea    0xdd8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [16 x i8] c"No duplicates.\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 [256 x i8]
%8 = alloca i32*
store i32 0, i32* %1
store i32 0, i32* %5
%9 = call i64 @malloc(i32 40000000)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %8
store i32 0, i32* %3
br label %11
11: ; preds = %19, %0
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 10000000
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load i32*, i32** %8
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 0, i32* %18
br label %19
19: ; preds = %14
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %11
22: ; preds = %11
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %24
24: ; preds = %39, %22
%25 = load i32, i32* %3
%26 = load i32, i32* %2
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %42
28: ; preds = %24
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %29)
%31 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%32 = call i32 @transform(i8* %31)
store i32 %32, i32* %6
%33 = load i32*, i32** %8
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* %33, i64 %35
%37 = load i32, i32* %36
%38 = add nsw i32 %37, 1
store i32 %38, i32* %36
br label %39
39: ; preds = %28
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %24
42: ; preds = %24
store i32 0, i32* %3
br label %43
43: ; preds = %62, %42
%44 = load i32, i32* %3
%45 = icmp slt i32 %44, 10000000
br i1 %45, label %46, label %65
46: ; preds = %43
%47 = load i32*, i32** %8
%48 = load i32, i32* %3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i32, i32* %47, i64 %49
%51 = load i32, i32* %50
%52 = icmp sgt i32 %51, 1
br i1 %52, label %53, label %61
53: ; preds = %46
store i32 1, i32* %5
%54 = load i32, i32* %3
%55 = load i32*, i32** %8
%56 = load i32, i32* %3
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %55, i64 %57
%59 = load i32, i32* %58
%60 = call i32 @print(i32 %54, i32 %59)
br label %61
61: ; preds = %53, %46
br label %62
62: ; preds = %61
%63 = load i32, i32* %3
%64 = add nsw i32 %63, 1
store i32 %64, i32* %3
br label %43
65: ; preds = %43
%66 = load i32, i32* %5
%67 = icmp ne i32 %66, 0
br i1 %67, label %70, label %68
68: ; preds = %65
%69 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %70
70: ; preds = %68, %65
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@str = [15 x i8] c"No duplicates.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = tail call i64 @malloc(i32 40000000)
%6 = inttoptr i64 %5 to i32*
%7 = inttoptr i64 %5 to i8*
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %15, %0
br label %12
12: ; preds = %11, %34
%13 = phi i64 [ %37, %34 ], [ 0, %11 ]
%14 = phi i1 [ false, %34 ], [ true, %11 ]
br label %26
15: ; preds = %0, %15
%16 = phi i32 [ %23, %15 ], [ 0, %0 ]
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%18 = call i32 @transform(i8* %4)
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %6, i64 %19
%21 = load i32, i32* %20
%22 = add nsw i32 %21, 1
store i32 %22, i32* %20
%23 = add nuw nsw i32 %16, 1
%24 = load i32, i32* %1
%25 = icmp slt i32 %23, %24
br i1 %25, label %15, label %11
26: ; preds = %12, %31
%27 = phi i64 [ %32, %31 ], [ %13, %12 ]
%28 = getelementptr inbounds i32, i32* %6, i64 %27
%29 = load i32, i32* %28
%30 = icmp sgt i32 %29, 1
br i1 %30, label %34, label %31
31: ; preds = %26
%32 = add nuw nsw i64 %27, 1
%33 = icmp eq i64 %32, 10000000
br i1 %33, label %39, label %26
34: ; preds = %26
%35 = trunc i64 %27 to i32
%36 = call i32 @print(i32 %35, i32 %29)
%37 = add nuw nsw i64 %27, 1
%38 = icmp eq i64 %37, 10000000
br i1 %38, label %42, label %12
39: ; preds = %31
br i1 %14, label %40, label %42
40: ; preds = %39
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %42
42: ; preds = %34, %40, %39
ret i32 0
}