#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 */
typedef int /*<<< orphan*/ arreglo2;
typedef int /*<<< orphan*/ arreglo;

/* Variables and functions */
int /*<<< orphan*/ imp_apun(int *, int, int);
int /*<<< orphan*/ imp_val(int *, int, int);
int main() {
  int arreglo[][3] = {{11, 12, 13}, {1, 2, 3}};
  int arreglo2[3] = {11, 12, 13};
  imp_val(&arreglo[0][0], sizeof(arreglo[0]) / sizeof(int),
          sizeof(arreglo) / sizeof(arreglo[0]));
  imp_apun(&arreglo[0][0], sizeof(arreglo[0]) / sizeof(int),
           sizeof(arreglo) / sizeof(arreglo[0]));
  imp_val(&arreglo2[0], sizeof(arreglo2[0]) / sizeof(int),
          sizeof(arreglo2) / sizeof(arreglo2[0]));
  imp_apun(&arreglo2[0], sizeof(arreglo2[0]) / sizeof(int),
           sizeof(arreglo2) / sizeof(arreglo2[0]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <imp_val@plt>
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1040 <imp_apun@plt>
lea    -0x2c(%rbp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <imp_val@plt>
lea    -0x2c(%rbp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1040 <imp_apun@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    0xedd(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xeca(%rip),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <imp_val@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1040 <imp_apun@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <imp_val@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1040 <imp_apun@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arreglo = [2 x [3 x i32]] [[3 x i32] [i32 11, i32 12, i32 13], [3 x i32] [i32 1, i32 2, i32 3]]
@__const.main.arreglo2 = [3 x i32] [i32 11, i32 12, i32 13]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [3 x i32]]
%3 = alloca [3 x i32]
store i32 0, i32* %1
%4 = bitcast [2 x [3 x i32]]* %2 to i8*
%5 = bitcast [3 x i32]* %3 to i8*
%6 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%8 = call i32 @imp_val(i32* %7, i32 3, i32 2)
%9 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%11 = call i32 @imp_apun(i32* %10, i32 3, i32 2)
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%13 = call i32 @imp_val(i32* %12, i32 1, i32 3)
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%15 = call i32 @imp_apun(i32* %14, i32 1, i32 3)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arreglo = [2 x [3 x i32]] [[3 x i32] [i32 11, i32 12, i32 13], [3 x i32] [i32 1, i32 2, i32 3]]
@__const.main.arreglo2 = [3 x i32] [i32 11, i32 12, i32 13]
define i32 @main() {
%1 = alloca [2 x [3 x i32]]
%2 = alloca [3 x i32]
%3 = bitcast [2 x [3 x i32]]* %1 to i8*
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%6 = call i32 @imp_val(i32* %5, i32 3, i32 2)
%7 = call i32 @imp_apun(i32* %5, i32 3, i32 2)
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%9 = call i32 @imp_val(i32* %8, i32 1, i32 3)
%10 = call i32 @imp_apun(i32* %8, i32 1, i32 3)
ret i32 0
}