#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*/ assert(int);
int containsDuplicate(int *, int);
int main(int argc, char **argv) {
  int t0[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 9};
  int t1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
  assert(containsDuplicate(t0, 10));
  assert(!containsDuplicate(t1, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
call   1050 <containsDuplicate@plt>
mov    %eax,%edi
call   1030 <assert@plt>
lea    -0x70(%rbp),%rdi
mov    $0xa,%esi
call   1050 <containsDuplicate@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xf01(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rdi
mov    $0xa,%esi
call   1040 <containsDuplicate@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <containsDuplicate@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.t0 = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 9]
@__const.main.t1 = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 0]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca [10 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [10 x i32]* %6 to i8*
%9 = bitcast [10 x i32]* %7 to i8*
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%11 = call i32 @containsDuplicate(i32* %10, i32 10)
%12 = call i32 @assert(i32 %11)
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%14 = call i32 @containsDuplicate(i32* %13, i32 10)
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
ret i32 0
}

LLVM IR (-O2):
@__const.main.t0 = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 9]
@__const.main.t1 = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 0]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = bitcast [10 x i32]* %3 to i8*
%6 = bitcast [10 x i32]* %4 to i8*
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%8 = call i32 @containsDuplicate(i32* %7, i32 10)
%9 = call i32 @assert(i32 %8)
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%11 = call i32 @containsDuplicate(i32* %10, i32 10)
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret i32 0
}