#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 */
typedef int /*<<< orphan*/ case1;
typedef int /*<<< orphan*/ case0;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/ *);
int singleNumber(int *, int);
int main(int argc, char *argv[]) {
  int case0[] = {1, 2, 3, 4, 1, 2, 3};
  int case1[] = {1, 2, 3, 4, 5, 1, 2, 3, 4};
  printf("0\t%d\n", singleNumber(case0, sizeof(case0) / sizeof(int)), NULL);
  printf("1\t%d\n", singleNumber(case1, sizeof(case1) / sizeof(int)), NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeab(%rip),%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xea5(%rip),%rsi
mov    $0x24,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x7,%esi
call   1030 <singleNumber@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    $0x9,%esi
call   1030 <singleNumber@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movups 0xee1(%rip),%xmm0
movups %xmm0,0x3c(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xefe(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rdi
mov    $0x7,%esi
call   1030 <singleNumber@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <printf@plt>
mov    %rsp,%rdi
mov    $0x9,%esi
call   1030 <singleNumber@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.case0 = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 1, i32 2, i32 3]
@__const.main.case1 = [9 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 1, i32 2, i32 3, i32 4]
@.str = [6 x i8] c"0\09%d\0A\00"
@.str.1 = [6 x i8] c"1\09%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [7 x i32]
%7 = alloca [9 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [7 x i32]* %6 to i8*
%9 = bitcast [9 x i32]* %7 to i8*
%10 = getelementptr inbounds [7 x i32], [7 x i32]* %6, i64 0, i64 0
%11 = call i32 @singleNumber(i32* %10, i32 7)
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %11, i32* null)
%13 = getelementptr inbounds [9 x i32], [9 x i32]* %7, i64 0, i64 0
%14 = call i32 @singleNumber(i32* %13, i32 9)
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32* null)
ret i32 0
}

LLVM IR (-O2):
@__const.main.case0 = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 1, i32 2, i32 3]
@__const.main.case1 = [9 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 1, i32 2, i32 3, i32 4]
@.str = [6 x i8] c"0\09%d\0A\00"
@.str.1 = [6 x i8] c"1\09%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [7 x i32]
%4 = alloca [9 x i32]
%5 = bitcast [7 x i32]* %3 to i8*
%6 = bitcast [9 x i32]* %4 to i8*
%7 = getelementptr inbounds [7 x i32], [7 x i32]* %3, i64 0, i64 0
%8 = call i32 @singleNumber(i32* %7, i32 7)
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %8, i32* null)
%10 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 0
%11 = call i32 @singleNumber(i32* %10, i32 9)
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32* null)
ret i32 0
}