#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*/ findUniqueAndPrint(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printArray(int *);
int random();
int main(int argc, char **argv) {
  int *myArray;
  int i, halfsize;
  myArray = (int *)malloc(sizeof(int) * 26);
  halfsize = 26 / 2;
  for (i = 0; i < halfsize; i++) {
    myArray[i] = myArray[26 - 1 - i] = random();
  }
  myArray[0] = 234;
  printArray(myArray);
  findUniqueAndPrint(myArray);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x68,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0xd,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11b2 <main+0x72>
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    $0x19,%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1172 <main+0x32>
mov    -0x18(%rbp),%rax
movl   $0xea,(%rax)
mov    -0x18(%rbp),%rdi
call   1050 <printArray@plt>
mov    -0x18(%rbp),%rdi
call   1060 <findUniqueAndPrint@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x68,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x64(%rbx)
mov    %eax,(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x60(%rbx)
mov    %eax,0x4(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x5c(%rbx)
mov    %eax,0x8(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x58(%rbx)
mov    %eax,0xc(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x54(%rbx)
mov    %eax,0x10(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x50(%rbx)
mov    %eax,0x14(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x4c(%rbx)
mov    %eax,0x18(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x48(%rbx)
mov    %eax,0x1c(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x44(%rbx)
mov    %eax,0x20(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x40(%rbx)
mov    %eax,0x24(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x3c(%rbx)
mov    %eax,0x28(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x38(%rbx)
mov    %eax,0x2c(%rbx)
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,0x34(%rbx)
mov    %eax,0x30(%rbx)
movl   $0xea,(%rbx)
mov    %rbx,%rdi
call   1050 <printArray@plt>
mov    %rbx,%rdi
call   1060 <findUniqueAndPrint@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i64 @malloc(i32 104)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %6
store i32 13, i32* %8
store i32 0, i32* %7
br label %11
11: ; preds = %26, %2
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %29
15: ; preds = %11
%16 = call i32 (...) @random()
%17 = load i32*, i32** %6
%18 = load i32, i32* %7
%19 = sub nsw i32 25, %18
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
store i32 %16, i32* %21
%22 = load i32*, i32** %6
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %22, i64 %24
store i32 %16, i32* %25
br label %26
26: ; preds = %15
%27 = load i32, i32* %7
%28 = add nsw i32 %27, 1
store i32 %28, i32* %7
br label %11
29: ; preds = %11
%30 = load i32*, i32** %6
%31 = getelementptr inbounds i32, i32* %30, i64 0
store i32 234, i32* %31
%32 = load i32*, i32** %6
%33 = call i32 @printArray(i32* %32)
%34 = load i32*, i32** %6
%35 = call i32 @findUniqueAndPrint(i32* %34)
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 104)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 (...) @random()
%6 = getelementptr inbounds i32, i32* %4, i64 25
store i32 %5, i32* %6
store i32 %5, i32* %4
%7 = tail call i32 (...) @random()
%8 = getelementptr inbounds i32, i32* %4, i64 24
store i32 %7, i32* %8
%9 = getelementptr inbounds i32, i32* %4, i64 1
store i32 %7, i32* %9
%10 = tail call i32 (...) @random()
%11 = getelementptr inbounds i32, i32* %4, i64 23
store i32 %10, i32* %11
%12 = getelementptr inbounds i32, i32* %4, i64 2
store i32 %10, i32* %12
%13 = tail call i32 (...) @random()
%14 = getelementptr inbounds i32, i32* %4, i64 22
store i32 %13, i32* %14
%15 = getelementptr inbounds i32, i32* %4, i64 3
store i32 %13, i32* %15
%16 = tail call i32 (...) @random()
%17 = getelementptr inbounds i32, i32* %4, i64 21
store i32 %16, i32* %17
%18 = getelementptr inbounds i32, i32* %4, i64 4
store i32 %16, i32* %18
%19 = tail call i32 (...) @random()
%20 = getelementptr inbounds i32, i32* %4, i64 20
store i32 %19, i32* %20
%21 = getelementptr inbounds i32, i32* %4, i64 5
store i32 %19, i32* %21
%22 = tail call i32 (...) @random()
%23 = getelementptr inbounds i32, i32* %4, i64 19
store i32 %22, i32* %23
%24 = getelementptr inbounds i32, i32* %4, i64 6
store i32 %22, i32* %24
%25 = tail call i32 (...) @random()
%26 = getelementptr inbounds i32, i32* %4, i64 18
store i32 %25, i32* %26
%27 = getelementptr inbounds i32, i32* %4, i64 7
store i32 %25, i32* %27
%28 = tail call i32 (...) @random()
%29 = getelementptr inbounds i32, i32* %4, i64 17
store i32 %28, i32* %29
%30 = getelementptr inbounds i32, i32* %4, i64 8
store i32 %28, i32* %30
%31 = tail call i32 (...) @random()
%32 = getelementptr inbounds i32, i32* %4, i64 16
store i32 %31, i32* %32
%33 = getelementptr inbounds i32, i32* %4, i64 9
store i32 %31, i32* %33
%34 = tail call i32 (...) @random()
%35 = getelementptr inbounds i32, i32* %4, i64 15
store i32 %34, i32* %35
%36 = getelementptr inbounds i32, i32* %4, i64 10
store i32 %34, i32* %36
%37 = tail call i32 (...) @random()
%38 = getelementptr inbounds i32, i32* %4, i64 14
store i32 %37, i32* %38
%39 = getelementptr inbounds i32, i32* %4, i64 11
store i32 %37, i32* %39
%40 = tail call i32 (...) @random()
%41 = getelementptr inbounds i32, i32* %4, i64 13
store i32 %40, i32* %41
%42 = getelementptr inbounds i32, i32* %4, i64 12
store i32 %40, i32* %42
store i32 234, i32* %4
%43 = tail call i32 @printArray(i32* %4)
%44 = tail call i32 @findUniqueAndPrint(i32* %4)
ret i32 0
}