#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*/ llena_vector(int *, int);
int /*<<< orphan*/ ordena_vector(int *, int);
int /*<<< orphan*/ pinta_vector(int *, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  int m[25];
  llena_vector(m, 25);
  printf("\n\nVector original (Antes de ordenar): \n\n");
  pinta_vector(m, 25);
  ordena_vector(m, 25);
  printf("\n\nVector final (Despues de ordenar): \n\n");
  pinta_vector(m, 25);
  printf("\n\n\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x19,%esi
call   1060 <llena_vector@plt>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x19,%esi
call   1040 <pinta_vector@plt>
lea    -0x70(%rbp),%rdi
mov    $0x19,%esi
call   1050 <ordena_vector@plt>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x19,%esi
call   1040 <pinta_vector@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x19,%esi
call   1060 <llena_vector@plt>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
call   1040 <pinta_vector@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
call   1050 <ordena_vector@plt>
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
call   1040 <pinta_vector@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"\0A\0AVector original (Antes de ordenar): \0A\0A\00"
@.str.1 = [40 x i8] c"\0A\0AVector final (Despues de ordenar): \0A\0A\00"
@.str.2 = [4 x i8] c"\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [25 x i32], [25 x i32]* %2, i64 0, i64 0
%4 = call i32 @llena_vector(i32* %3, i32 25)
%5 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [25 x i32], [25 x i32]* %2, i64 0, i64 0
%7 = call i32 @pinta_vector(i32* %6, i32 25)
%8 = getelementptr inbounds [25 x i32], [25 x i32]* %2, i64 0, i64 0
%9 = call i32 @ordena_vector(i32* %8, i32 25)
%10 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [25 x i32], [25 x i32]* %2, i64 0, i64 0
%12 = call i32 @pinta_vector(i32* %11, i32 25)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [40 x i8] c"\0A\0AVector original (Antes de ordenar): \0A\00"
@str.3 = [39 x i8] c"\0A\0AVector final (Despues de ordenar): \0A\00"
@str.4 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca [25 x i32]
%2 = bitcast [25 x i32]* %1 to i8*
%3 = getelementptr inbounds [25 x i32], [25 x i32]* %1, i64 0, i64 0
%4 = call i32 @llena_vector(i32* %3, i32 25)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%6 = call i32 @pinta_vector(i32* %3, i32 25)
%7 = call i32 @ordena_vector(i32* %3, i32 25)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.3, i64 0, i64 0))
%9 = call i32 @pinta_vector(i32* %3, i32 25)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}