main() {
  int arreglo[6] = {1, 23, 56, 8, 98, 45};
  int arreglo_multi[3][3] = {{1, 2, 52}, {3, 56, 42}, {75, 8, 14}};
  printf("essai_function_uno_arreglo------------------------\n");
  funcion_uno(arreglo, sizeof(arreglo), sizeof(*arreglo));
  printf("\n");
  printf("essai_function_uno_arreglo_multi------------------------\n");
  funcion_uno(arreglo_multi, sizeof(arreglo_multi), sizeof(*arreglo_multi));
  printf("\n");
  printf("essai_function_dos_arreglo------------------------\n");
  funcion_dos(arreglo, sizeof(arreglo), sizeof(*arreglo));
  printf("\n");
  printf("essai_function_dos_arreglo_multi------------------------\n");
  funcion_dos(arreglo_multi, sizeof(arreglo_multi), sizeof(*arreglo_multi));
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xeb1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeac(%rip),%rsi
mov    $0x24,%edx
call   1060 <memcpy@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x18,%esi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <funcion_uno@plt>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
mov    $0x24,%esi
mov    $0xc,%edx
mov    $0x0,%al
call   1040 <funcion_uno@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x18,%esi
mov    $0x4,%edx
mov    $0x0,%al
call   1050 <funcion_dos@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
mov    $0x24,%esi
mov    $0xc,%edx
mov    $0x0,%al
call   1050 <funcion_dos@plt>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    0xec2(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0xedc(%rip),%eax
mov    %eax,0x40(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0xebd(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%r14
mov    $0x18,%esi
mov    $0x4,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <funcion_uno@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec3(%rip),%rdi
call   1040 <puts@plt>
lea    0x20(%rsp),%rbx
mov    $0x24,%esi
mov    $0xc,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <funcion_uno@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
mov    $0x18,%esi
mov    $0x4,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <funcion_dos@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xed6(%rip),%rdi
call   1040 <puts@plt>
mov    $0x24,%esi
mov    $0xc,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <funcion_dos@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.arreglo = [6 x i32] [i32 1, i32 23, i32 56, i32 8, i32 98, i32 45]
@__const.main.arreglo_multi = [3 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 52], [3 x i32] [i32 3, i32 56, i32 42], [3 x i32] [i32 75, i32 8, i32 14]]
@.str = [52 x i8] c"essai_function_uno_arreglo------------------------\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [58 x i8] c"essai_function_uno_arreglo_multi------------------------\0A\00"
@.str.3 = [52 x i8] c"essai_function_dos_arreglo------------------------\0A\00"
@.str.4 = [58 x i8] c"essai_function_dos_arreglo_multi------------------------\0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = alloca [3 x [3 x i32]]
%3 = bitcast [6 x i32]* %1 to i8*
%4 = bitcast [3 x [3 x i32]]* %2 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%7 = call i32 (i32*, i64, i64, ...) bitcast (i32 (...)* @funcion_uno to i32 (i32*, i64, i64, ...)*)(i32* %6, i64 24, i64 4)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%11 = call i32 ([3 x i32]*, i64, i64, ...) bitcast (i32 (...)* @funcion_uno to i32 ([3 x i32]*, i64, i64, ...)*)([3 x i32]* %10, i64 36, i64 12)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%14 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%15 = call i32 (i32*, i64, i64, ...) bitcast (i32 (...)* @funcion_dos to i32 (i32*, i64, i64, ...)*)(i32* %14, i64 24, i64 4)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0))
%18 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%19 = call i32 ([3 x i32]*, i64, i64, ...) bitcast (i32 (...)* @funcion_dos to i32 ([3 x i32]*, i64, i64, ...)*)([3 x i32]* %18, i64 36, i64 12)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.arreglo = [6 x i32] [i32 1, i32 23, i32 56, i32 8, i32 98, i32 45]
@__const.main.arreglo_multi = [3 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 52], [3 x i32] [i32 3, i32 56, i32 42], [3 x i32] [i32 75, i32 8, i32 14]]
@str = [51 x i8] c"essai_function_uno_arreglo------------------------\00"
@str.5 = [57 x i8] c"essai_function_uno_arreglo_multi------------------------\00"
@str.6 = [51 x i8] c"essai_function_dos_arreglo------------------------\00"
@str.7 = [57 x i8] c"essai_function_dos_arreglo_multi------------------------\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = alloca [3 x [3 x i32]]
%3 = bitcast [6 x i32]* %1 to i8*
%4 = bitcast [3 x [3 x i32]]* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%7 = call i32 (i32*, i64, i64, ...) bitcast (i32 (...)* @funcion_uno to i32 (i32*, i64, i64, ...)*)(i32* %6, i64 24, i64 4)
%8 = call i32 @putchar(i32 10)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.5, i64 0, i64 0))
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%11 = call i32 ([3 x i32]*, i64, i64, ...) bitcast (i32 (...)* @funcion_uno to i32 ([3 x i32]*, i64, i64, ...)*)([3 x i32]* %10, i64 36, i64 12)
%12 = call i32 @putchar(i32 10)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.6, i64 0, i64 0))
%14 = call i32 (i32*, i64, i64, ...) bitcast (i32 (...)* @funcion_dos to i32 (i32*, i64, i64, ...)*)(i32* %6, i64 24, i64 4)
%15 = call i32 @putchar(i32 10)
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.7, i64 0, i64 0))
%17 = call i32 ([3 x i32]*, i64, i64, ...) bitcast (i32 (...)* @funcion_dos to i32 ([3 x i32]*, i64, i64, ...)*)([3 x i32]* %10, i64 36, i64 12)
%18 = call i32 @putchar(i32 10)
ret i32 0
}