int main() {
  int arreglo[10] = {-5, -4, -3, -2, -1, 1, 2, 3, 4, 5};
  int arreglomult[2][5] = {{1, 2, 3, 4, 5}, {-1, -2, -3, -4, -5}};
  int largo;
  int ancho;
  int i;
  largo = sizeof(arreglo) / sizeof(arreglo[0]);
  ancho = 0;
  printf("Arreglo \n");
  imprimeArreglo(&arreglo, largo, ancho);
  printf("Direcciones \n");
  imprimeDireccion(&arreglo, largo, ancho);
  largo = sizeof(arreglomult) / sizeof(arreglomult[0]);
  ancho = sizeof(arreglomult[0]) / sizeof(arreglomult[0][0]);
  printf("Arreglo mult \n");
  imprimeArreglo(&arreglomult, largo, ancho);
  printf("Direcciones mult \n");
  imprimeDireccion(&arreglomult, largo, ancho);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x30(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xec8(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
movl   $0xa,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x64(%rbp),%esi
mov    -0x68(%rbp),%edx
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1030 <imprimeArreglo@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x64(%rbp),%esi
mov    -0x68(%rbp),%edx
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1060 <imprimeDireccion@plt>
movl   $0x2,-0x64(%rbp)
movl   $0x5,-0x68(%rbp)
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x64(%rbp),%esi
mov    -0x68(%rbp),%edx
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1030 <imprimeArreglo@plt>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x64(%rbp),%esi
mov    -0x68(%rbp),%edx
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1060 <imprimeDireccion@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xef0(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <imprimeArreglo@plt>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <imprimeDireccion@plt>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <imprimeArreglo@plt>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1050 <imprimeDireccion@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arreglo = [10 x i32] [i32 -5, i32 -4, i32 -3, i32 -2, i32 -1, i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.main.arreglomult = [2 x [5 x i32]] [[5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5], [5 x i32] [i32 -1, i32 -2, i32 -3, i32 -4, i32 -5]]
@.str = [10 x i8] c"Arreglo \0A\00"
@.str.1 = [14 x i8] c"Direcciones \0A\00"
@.str.2 = [15 x i8] c"Arreglo mult \0A\00"
@.str.3 = [19 x i8] c"Direcciones mult \0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [2 x [5 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast [10 x i32]* %1 to i8*
%7 = bitcast [2 x [5 x i32]]* %2 to i8*
store i32 10, i32* %3
store i32 0, i32* %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 ([10 x i32]*, i32, i32, ...) bitcast (i32 (...)* @imprimeArreglo to i32 ([10 x i32]*, i32, i32, ...)*)([10 x i32]* %1, i32 %9, i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 ([10 x i32]*, i32, i32, ...) bitcast (i32 (...)* @imprimeDireccion to i32 ([10 x i32]*, i32, i32, ...)*)([10 x i32]* %1, i32 %13, i32 %14)
store i32 2, i32* %3
store i32 5, i32* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = call i32 ([2 x [5 x i32]]*, i32, i32, ...) bitcast (i32 (...)* @imprimeArreglo to i32 ([2 x [5 x i32]]*, i32, i32, ...)*)([2 x [5 x i32]]* %2, i32 %17, i32 %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 ([2 x [5 x i32]]*, i32, i32, ...) bitcast (i32 (...)* @imprimeDireccion to i32 ([2 x [5 x i32]]*, i32, i32, ...)*)([2 x [5 x i32]]* %2, i32 %21, i32 %22)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arreglo = [10 x i32] [i32 -5, i32 -4, i32 -3, i32 -2, i32 -1, i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.main.arreglomult = [2 x [5 x i32]] [[5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5], [5 x i32] [i32 -1, i32 -2, i32 -3, i32 -4, i32 -5]]
@str = [9 x i8] c"Arreglo \00"
@str.4 = [13 x i8] c"Direcciones \00"
@str.5 = [14 x i8] c"Arreglo mult \00"
@str.6 = [18 x i8] c"Direcciones mult \00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [2 x [5 x i32]]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [2 x [5 x i32]]* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%6 = call i32 ([10 x i32]*, i32, i32, ...) bitcast (i32 (...)* @imprimeArreglo to i32 ([10 x i32]*, i32, i32, ...)*)([10 x i32]* %1, i32 10, i32 0)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.4, i64 0, i64 0))
%8 = call i32 ([10 x i32]*, i32, i32, ...) bitcast (i32 (...)* @imprimeDireccion to i32 ([10 x i32]*, i32, i32, ...)*)([10 x i32]* %1, i32 10, i32 0)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.5, i64 0, i64 0))
%10 = call i32 ([2 x [5 x i32]]*, i32, i32, ...) bitcast (i32 (...)* @imprimeArreglo to i32 ([2 x [5 x i32]]*, i32, i32, ...)*)([2 x [5 x i32]]* %2, i32 2, i32 5)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.6, i64 0, i64 0))
%12 = call i32 ([2 x [5 x i32]]*, i32, i32, ...) bitcast (i32 (...)* @imprimeDireccion to i32 ([2 x [5 x i32]]*, i32, i32, ...)*)([2 x [5 x i32]]* %2, i32 2, i32 5)
ret i32 0
}