#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*/ printf(char *, int);
int main(void) {
  int matriz1[2][3];
  matriz1[0][0] = 1;
  matriz1[0][1] = 2;
  matriz1[0][2] = 3;
  matriz1[1][0] = -1;
  matriz1[1][1] = -2;
  matriz1[1][2] = -5;
  printf("matriz[0][0]: %d\n", matriz1[0][0]);
  int matriz2[2][3][5][2];
  matriz2[1][2][3][1] = 500;
  printf("matriz2[1][2][3][1]: %d\n", matriz2[1][2][3][1] = 500);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0xfffffffe,-0x10(%rbp)
movl   $0xfffffffb,-0xc(%rbp)
mov    -0x20(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1f4,-0x2c(%rbp)
movl   $0x1f4,-0x2c(%rbp)
lea    0xea2(%rip),%rdi
mov    $0x1f4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x1f4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"matriz[0][0]: %d\0A\00"
@.str.1 = [25 x i8] c"matriz2[1][2][3][1]: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [3 x i32]]
%3 = alloca [2 x [3 x [5 x [2 x i32]]]]
store i32 0, i32* %1
%4 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32 1, i32* %5
%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 1
store i32 2, i32* %7
%8 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 2
store i32 3, i32* %9
%10 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 1
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
store i32 -1, i32* %11
%12 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 1
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 1
store i32 -2, i32* %13
%14 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 1
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %14, i64 0, i64 2
store i32 -5, i32* %15
%16 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %16, i64 0, i64 0
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [2 x [3 x [5 x [2 x i32]]]], [2 x [3 x [5 x [2 x i32]]]]* %3, i64 0, i64 1
%21 = getelementptr inbounds [3 x [5 x [2 x i32]]], [3 x [5 x [2 x i32]]]* %20, i64 0, i64 2
%22 = getelementptr inbounds [5 x [2 x i32]], [5 x [2 x i32]]* %21, i64 0, i64 3
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %22, i64 0, i64 1
store i32 500, i32* %23
%24 = getelementptr inbounds [2 x [3 x [5 x [2 x i32]]]], [2 x [3 x [5 x [2 x i32]]]]* %3, i64 0, i64 1
%25 = getelementptr inbounds [3 x [5 x [2 x i32]]], [3 x [5 x [2 x i32]]]* %24, i64 0, i64 2
%26 = getelementptr inbounds [5 x [2 x i32]], [5 x [2 x i32]]* %25, i64 0, i64 3
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %26, i64 0, i64 1
store i32 500, i32* %27
%28 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 500)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"matriz[0][0]: %d\0A\00"
@.str.1 = [25 x i8] c"matriz2[1][2][3][1]: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 500)
ret i32 0
}