#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*/ acceptArray(int *, int *);
int /*<<< orphan*/ checkSort(int *, int *, int *);
int /*<<< orphan*/ convertToPrime(int *, int *);
int /*<<< orphan*/ findDuplicates(int *, int *, int *);
int /*<<< orphan*/ printResults(int *, int *, int *, int *, int *, int *, int *,
                                int *);
int /*<<< orphan*/ separateData(int *, int *, int *, int *, int *, int *);
int /*<<< orphan*/ sortArray(int *, int *);
int main() {
  int originalSet[35];
  originalSet[0] = 0;
  int primeSet[35];
  primeSet[0] = 0;
  int nonPrimeSet[35];
  nonPrimeSet[0] = 0;
  int origSize = 0;
  int psSize = 0;
  int npsSize = 0;
  int duplicateCount = 0;
  int isNotSorted = 0;
  acceptArray(originalSet, &origSize);
  sortArray(originalSet, &origSize);
  separateData(originalSet, primeSet, nonPrimeSet, &origSize, &psSize,
               &npsSize);
  convertToPrime(originalSet, &origSize);
  findDuplicates(originalSet, &origSize, &duplicateCount);
  checkSort(originalSet, &origSize, &isNotSorted);
  sortArray(primeSet, &psSize);
  sortArray(nonPrimeSet, &npsSize);
  printResults(originalSet, primeSet, nonPrimeSet, &origSize, &psSize, &npsSize,
               &duplicateCount, &isNotSorted);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x90(%rbp)
movl   $0x0,-0x120(%rbp)
movl   $0x0,-0x1b0(%rbp)
movl   $0x0,-0x1b4(%rbp)
movl   $0x0,-0x1b8(%rbp)
movl   $0x0,-0x1bc(%rbp)
movl   $0x0,-0x1c0(%rbp)
movl   $0x0,-0x1c4(%rbp)
lea    -0x90(%rbp),%rdi
lea    -0x1b4(%rbp),%rsi
call   1050 <acceptArray@plt>
lea    -0x90(%rbp),%rdi
lea    -0x1b4(%rbp),%rsi
call   1060 <sortArray@plt>
lea    -0x90(%rbp),%rdi
lea    -0x120(%rbp),%rsi
lea    -0x1b0(%rbp),%rdx
lea    -0x1b4(%rbp),%rcx
lea    -0x1b8(%rbp),%r8
lea    -0x1bc(%rbp),%r9
call   1090 <separateData@plt>
lea    -0x90(%rbp),%rdi
lea    -0x1b4(%rbp),%rsi
call   1030 <convertToPrime@plt>
lea    -0x90(%rbp),%rdi
lea    -0x1b4(%rbp),%rsi
lea    -0x1c0(%rbp),%rdx
call   1040 <findDuplicates@plt>
lea    -0x90(%rbp),%rdi
lea    -0x1b4(%rbp),%rsi
lea    -0x1c4(%rbp),%rdx
call   1080 <checkSort@plt>
lea    -0x120(%rbp),%rdi
lea    -0x1b8(%rbp),%rsi
call   1060 <sortArray@plt>
lea    -0x1b0(%rbp),%rdi
lea    -0x1bc(%rbp),%rsi
call   1060 <sortArray@plt>
lea    -0x90(%rbp),%rdi
lea    -0x120(%rbp),%rsi
lea    -0x1b0(%rbp),%rdx
lea    -0x1b4(%rbp),%rcx
lea    -0x1b8(%rbp),%r8
lea    -0x1bc(%rbp),%r9
lea    -0x1c0(%rbp),%r10
lea    -0x1c4(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1070 <printResults@plt>
xor    %eax,%eax
add    $0x1e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1d8,%rsp
movl   $0x0,0x140(%rsp)
movl   $0x0,0xb0(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x1c(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x14(%rsp)
lea    0x140(%rsp),%rbx
lea    0x1c(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <acceptArray@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <sortArray@plt>
lea    0xb0(%rsp),%r13
lea    0x20(%rsp),%rbp
lea    0x18(%rsp),%r12
lea    0xc(%rsp),%r9
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r14,%rcx
mov    %r12,%r8
call   1090 <separateData@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <convertToPrime@plt>
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <findDuplicates@plt>
lea    0x14(%rsp),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1080 <checkSort@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1060 <sortArray@plt>
mov    %rbp,%rdi
lea    0xc(%rsp),%rsi
call   1060 <sortArray@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r14,%rcx
mov    %r12,%r8
lea    0xc(%rsp),%r9
push   %r15
lea    0x18(%rsp),%rax
push   %rax
call   1070 <printResults@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x1d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [35 x i32]
%3 = alloca [35 x i32]
%4 = alloca [35 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
store i32 0, i32* %10
%11 = getelementptr inbounds [35 x i32], [35 x i32]* %3, i64 0, i64 0
store i32 0, i32* %11
%12 = getelementptr inbounds [35 x i32], [35 x i32]* %4, i64 0, i64 0
store i32 0, i32* %12
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%13 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
%14 = call i32 @acceptArray(i32* %13, i32* %5)
%15 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
%16 = call i32 @sortArray(i32* %15, i32* %5)
%17 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
%18 = getelementptr inbounds [35 x i32], [35 x i32]* %3, i64 0, i64 0
%19 = getelementptr inbounds [35 x i32], [35 x i32]* %4, i64 0, i64 0
%20 = call i32 @separateData(i32* %17, i32* %18, i32* %19, i32* %5, i32* %6, i32* %7)
%21 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
%22 = call i32 @convertToPrime(i32* %21, i32* %5)
%23 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
%24 = call i32 @findDuplicates(i32* %23, i32* %5, i32* %8)
%25 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
%26 = call i32 @checkSort(i32* %25, i32* %5, i32* %9)
%27 = getelementptr inbounds [35 x i32], [35 x i32]* %3, i64 0, i64 0
%28 = call i32 @sortArray(i32* %27, i32* %6)
%29 = getelementptr inbounds [35 x i32], [35 x i32]* %4, i64 0, i64 0
%30 = call i32 @sortArray(i32* %29, i32* %7)
%31 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
%32 = getelementptr inbounds [35 x i32], [35 x i32]* %3, i64 0, i64 0
%33 = getelementptr inbounds [35 x i32], [35 x i32]* %4, i64 0, i64 0
%34 = call i32 @printResults(i32* %31, i32* %32, i32* %33, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [35 x i32]
%2 = alloca [35 x i32]
%3 = alloca [35 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast [35 x i32]* %1 to i8*
%10 = getelementptr inbounds [35 x i32], [35 x i32]* %1, i64 0, i64 0
store i32 0, i32* %10
%11 = bitcast [35 x i32]* %2 to i8*
%12 = getelementptr inbounds [35 x i32], [35 x i32]* %2, i64 0, i64 0
store i32 0, i32* %12
%13 = bitcast [35 x i32]* %3 to i8*
%14 = getelementptr inbounds [35 x i32], [35 x i32]* %3, i64 0, i64 0
store i32 0, i32* %14
%15 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%16 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%17 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%18 = bitcast i32* %7 to i8*
store i32 0, i32* %7
%19 = bitcast i32* %8 to i8*
store i32 0, i32* %8
%20 = call i32 @acceptArray(i32* %10, i32* %4)
%21 = call i32 @sortArray(i32* %10, i32* %4)
%22 = call i32 @separateData(i32* %10, i32* %12, i32* %14, i32* %4, i32* %5, i32* %6)
%23 = call i32 @convertToPrime(i32* %10, i32* %4)
%24 = call i32 @findDuplicates(i32* %10, i32* %4, i32* %7)
%25 = call i32 @checkSort(i32* %10, i32* %4, i32* %8)
%26 = call i32 @sortArray(i32* %12, i32* %5)
%27 = call i32 @sortArray(i32* %14, i32* %6)
%28 = call i32 @printResults(i32* %10, i32* %12, i32* %14, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
ret i32 0
}