#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*/ imprime(int *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sorteia(int *, int);
int /*<<< orphan*/ verificaImpar(int *, int *, int, int);
int /*<<< orphan*/ verificaIntervalo(int *, int *, int, int);
int /*<<< orphan*/ verificaPar(int *, int *, int, int);
int /*<<< orphan*/ verificaPrimo(int *, int *, int, int);
int main() {
  int vet[10];
  int vetPar[10];
  int vetImpar[10];
  int vetPrimo[10];
  int vetIntervalo[10];
  sorteia(vet, 10);
  verificaPar(vet, vetPar, 10, 10);
  verificaImpar(vet, vetImpar, 10, 10);
  verificaPrimo(vet, vetPrimo, 10, 10);
  verificaIntervalo(vet, vetIntervalo, 10, 10);
  printf("------NUMEROS------\n");
  imprime(vet, 10);
  printf("-------PARES-------\n");
  imprime(vetPar, 10);
  printf("------IMPARES------\n");
  imprime(vetImpar, 10);
  printf("------PRIMOS-------\n");
  imprime(vetPrimo, 10);
  printf("-----INTERVALO-----\n");
  imprime(vetIntervalo, 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <sorteia@plt>
lea    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0xa,%ecx
mov    %ecx,%edx
call   1080 <verificaPar@plt>
lea    -0x30(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    $0xa,%ecx
mov    %ecx,%edx
call   1090 <verificaImpar@plt>
lea    -0x30(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
mov    $0xa,%ecx
mov    %ecx,%edx
call   1070 <verificaPrimo@plt>
lea    -0x30(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
mov    $0xa,%ecx
mov    %ecx,%edx
call   1060 <verificaIntervalo@plt>
lea    0xe17(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xe12(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xe0d(%rip),%rdi
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xe05(%rip),%rdi
call   1040 <printf@plt>
lea    -0xc0(%rbp),%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xdfd(%rip),%rdi
call   1040 <printf@plt>
lea    -0xf0(%rbp),%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf0,%rsp
lea    0xc0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <sorteia@plt>
lea    0x90(%rsp),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1080 <verificaPar@plt>
lea    0x60(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1090 <verificaImpar@plt>
lea    0x30(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1070 <verificaPrimo@plt>
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1060 <verificaIntervalo@plt>
lea    0xdfb(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xdf6(%rip),%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xdf1(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xdec(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
lea    0xde7(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
mov    $0xa,%esi
call   1050 <imprime@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"------NUMEROS------\0A\00"
@.str.1 = [21 x i8] c"-------PARES-------\0A\00"
@.str.2 = [21 x i8] c"------IMPARES------\0A\00"
@.str.3 = [21 x i8] c"------PRIMOS-------\0A\00"
@.str.4 = [21 x i8] c"-----INTERVALO-----\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca [10 x i32]
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%7 = call i32 @sorteia(i32* %6, i32 10)
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%10 = call i32 @verificaPar(i32* %8, i32* %9, i32 10, i32 10)
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%13 = call i32 @verificaImpar(i32* %11, i32* %12, i32 10, i32 10)
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%16 = call i32 @verificaPrimo(i32* %14, i32* %15, i32 10, i32 10)
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%19 = call i32 @verificaIntervalo(i32* %17, i32* %18, i32 10, i32 10)
%20 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%22 = call i32 @imprime(i32* %21, i32 10)
%23 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%25 = call i32 @imprime(i32* %24, i32 10)
%26 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%28 = call i32 @imprime(i32* %27, i32 10)
%29 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%31 = call i32 @imprime(i32* %30, i32 10)
%32 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%34 = call i32 @imprime(i32* %33, i32 10)
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"------NUMEROS------\00"
@str.5 = [20 x i8] c"-------PARES-------\00"
@str.6 = [20 x i8] c"------IMPARES------\00"
@str.7 = [20 x i8] c"------PRIMOS-------\00"
@str.8 = [20 x i8] c"-----INTERVALO-----\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca [10 x i32]
%6 = bitcast [10 x i32]* %1 to i8*
%7 = bitcast [10 x i32]* %2 to i8*
%8 = bitcast [10 x i32]* %3 to i8*
%9 = bitcast [10 x i32]* %4 to i8*
%10 = bitcast [10 x i32]* %5 to i8*
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%12 = call i32 @sorteia(i32* %11, i32 10)
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%14 = call i32 @verificaPar(i32* %11, i32* %13, i32 10, i32 10)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%16 = call i32 @verificaImpar(i32* %11, i32* %15, i32 10, i32 10)
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%18 = call i32 @verificaPrimo(i32* %11, i32* %17, i32 10, i32 10)
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%20 = call i32 @verificaIntervalo(i32* %11, i32* %19, i32 10, i32 10)
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%22 = call i32 @imprime(i32* %11, i32 10)
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%24 = call i32 @imprime(i32* %13, i32 10)
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0))
%26 = call i32 @imprime(i32* %15, i32 10)
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.7, i64 0, i64 0))
%28 = call i32 @imprime(i32* %17, i32 10)
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.8, i64 0, i64 0))
%30 = call i32 @imprime(i32* %19, i32 10)
ret i32 0
}