#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*/ imprimir(int *, int);
int /*<<< orphan*/ invertir(int *, int);
int /*<<< orphan*/ leer(int *, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  int arreglo[100];
  int tamanio;
  srand(time(NULL));
  printf("\t\tInversión de Arreglos\n\n");
  printf("Programa que invierte el contenido de un arreglo.\n");
  leer(arreglo, &tamanio);
  printf("Antes de Invertir...\n");
  imprimir(arreglo, tamanio);
  invertir(arreglo, tamanio);
  printf("Después de invertir...\n");
  imprimir(arreglo, tamanio);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x1a4(%rbp),%rsi
call   1070 <leer@plt>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rdi
mov    -0x1a4(%rbp),%esi
call   1040 <imprimir@plt>
lea    -0x1a0(%rbp),%rdi
mov    -0x1a4(%rbp),%esi
call   1080 <invertir@plt>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rdi
mov    -0x1a4(%rbp),%esi
call   1040 <imprimir@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1a0,%rsp
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xe83(%rip),%rdi
call   1030 <puts@plt>
lea    0xe91(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <leer@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1040 <imprimir@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1080 <invertir@plt>
lea    0xe96(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1040 <imprimir@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\09\09Inversi\C3\B3n de Arreglos\0A\0A\00"
@.str.1 = [51 x i8] c"Programa que invierte el contenido de un arreglo.\0A\00"
@.str.2 = [22 x i8] c"Antes de Invertir...\0A\00"
@.str.3 = [25 x i8] c"Despu\C3\A9s de invertir...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @time(i32* null)
%9 = call i32 @srand(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
%13 = call i32 @leer(i32* %12, i32* %7)
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
%16 = load i32, i32* %7
%17 = call i32 @imprimir(i32* %15, i32 %16)
%18 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
%19 = load i32, i32* %7
%20 = call i32 @invertir(i32* %18, i32 %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%22 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
%23 = load i32, i32* %7
%24 = call i32 @imprimir(i32* %22, i32 %23)
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"\09\09Inversi\C3\B3n de Arreglos\0A\00"
@str.4 = [50 x i8] c"Programa que invierte el contenido de un arreglo.\00"
@str.5 = [21 x i8] c"Antes de Invertir...\00"
@str.6 = [24 x i8] c"Despu\C3\A9s de invertir...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i32]
%4 = alloca i32
%5 = bitcast [100 x i32]* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 @time(i32* null)
%8 = tail call i32 @srand(i32 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.4, i64 0, i64 0))
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%12 = call i32 @leer(i32* %11, i32* %4)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.5, i64 0, i64 0))
%14 = load i32, i32* %4
%15 = call i32 @imprimir(i32* %11, i32 %14)
%16 = load i32, i32* %4
%17 = call i32 @invertir(i32* %11, i32 %16)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.6, i64 0, i64 0))
%19 = load i32, i32* %4
%20 = call i32 @imprimir(i32* %11, i32 %19)
ret i32 0
}