#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*/ LC_ALL;
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int, int, int, int *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
main() {
  setlocale(LC_ALL, "Portuguese");
  int linha = 2;
  int coluna = 3;
  int colunaa = 2;
  int matriz[linha][coluna][colunaa];
  int x, y, z;
  for (x = 0; x < linha; x++) {
    for (y = 0; y < coluna; y++) {
      for (z = 0; z < colunaa; z++) {
        scanf(" [%d][%d][%d] ", x, y, z, &matriz[x][y][z]);
      }
    }
  }
  for (x = 0; x < linha; x++) {
    for (y = 0; y < coluna; y++) {
      for (z = 0; z < colunaa; z++)
        printf("%d", matriz[x][y][z]);
    }
  }
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
call   1040 <setlocale@plt>
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%edx
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
mov    -0x10(%rbp),%eax
mov    %rax,-0x50(%rbp)
mov    %rsp,%rsi
mov    %rsi,-0x18(%rbp)
mov    %rdx,%rsi
imul   %rcx,%rsi
imul   %rax,%rsi
lea    0xf(,%rsi,4),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rsi
sub    %rdi,%rsi
mov    %rsi,-0x48(%rbp)
mov    %rsi,%rsp
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1280 <main+0x140>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    126d <main+0x12d>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    125a <main+0x11a>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x3c(%rbp),%ecx
movslq -0x34(%rbp),%rax
imul   %rdi,%r9
imul   %r9,%rax
shl    $0x2,%rax
add    %rax,%r8
movslq -0x38(%rbp),%rax
imul   %rdi,%rax
shl    $0x2,%rax
add    %rax,%r8
movslq -0x3c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r8
lea    0xdc4(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11f2 <main+0xb2>
jmp    125f <main+0x11f>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11df <main+0x9f>
jmp    1272 <main+0x132>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11cc <main+0x8c>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    132e <main+0x1ee>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    131b <main+0x1db>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1308 <main+0x1c8>
mov    -0x50(%rbp),%rdx
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%rsi
movslq -0x34(%rbp),%rcx
imul   %rdx,%rsi
imul   %rsi,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x38(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd25(%rip),%rdi
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12ad <main+0x16d>
jmp    130d <main+0x1cd>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    129a <main+0x15a>
jmp    1320 <main+0x1e0>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1287 <main+0x147>
mov    $0x0,%al
call   1060 <getch@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xeaa(%rip),%rbx
mov    %rsp,%r8
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <scanf@plt>
lea    0x4(%rsp),%r8
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1050 <scanf@plt>
lea    0x8(%rsp),%r8
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1050 <scanf@plt>
lea    0xc(%rsp),%r8
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1050 <scanf@plt>
lea    0x10(%rsp),%r8
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1050 <scanf@plt>
lea    0x14(%rsp),%r8
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1050 <scanf@plt>
lea    0x18(%rsp),%r8
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <scanf@plt>
lea    0x1c(%rsp),%r8
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1050 <scanf@plt>
lea    0x20(%rsp),%r8
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1050 <scanf@plt>
lea    0x24(%rsp),%r8
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1050 <scanf@plt>
lea    0x28(%rsp),%r8
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1050 <scanf@plt>
lea    0x2c(%rsp),%r8
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1050 <scanf@plt>
mov    (%rsp),%esi
lea    0xd91(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [15 x i8] c" [%d][%d][%d] \00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = load i32, i32* @LC_ALL
%13 = call i32 @setlocale(i32 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %2
store i32 3, i32* %3
store i32 2, i32* %4
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %3
%17 = zext i32 %16 to i64
%18 = load i32, i32* %4
%19 = zext i32 %18 to i64
%20 = call i8* @llvm.stacksave()
store i8* %20, i8** %5
%21 = mul nuw i64 %15, %17
%22 = mul nuw i64 %21, %19
%23 = alloca i32, i64 %22
store i64 %15, i64* %6
store i64 %17, i64* %7
store i64 %19, i64* %8
store i32 0, i32* %9
br label %24
24: ; preds = %63, %0
%25 = load i32, i32* %9
%26 = load i32, i32* %2
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %66
28: ; preds = %24
store i32 0, i32* %10
br label %29
29: ; preds = %59, %28
%30 = load i32, i32* %10
%31 = load i32, i32* %3
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %62
33: ; preds = %29
store i32 0, i32* %11
br label %34
34: ; preds = %55, %33
%35 = load i32, i32* %11
%36 = load i32, i32* %4
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %58
38: ; preds = %34
%39 = load i32, i32* %9
%40 = load i32, i32* %10
%41 = load i32, i32* %11
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = mul nuw i64 %17, %19
%45 = mul nsw i64 %43, %44
%46 = getelementptr inbounds i32, i32* %23, i64 %45
%47 = load i32, i32* %10
%48 = sext i32 %47 to i64
%49 = mul nsw i64 %48, %19
%50 = getelementptr inbounds i32, i32* %46, i64 %49
%51 = load i32, i32* %11
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i32, i32* %50, i64 %52
%54 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %39, i32 %40, i32 %41, i32* %53)
br label %55
55: ; preds = %38
%56 = load i32, i32* %11
%57 = add nsw i32 %56, 1
store i32 %57, i32* %11
br label %34
58: ; preds = %34
br label %59
59: ; preds = %58
%60 = load i32, i32* %10
%61 = add nsw i32 %60, 1
store i32 %61, i32* %10
br label %29
62: ; preds = %29
br label %63
63: ; preds = %62
%64 = load i32, i32* %9
%65 = add nsw i32 %64, 1
store i32 %65, i32* %9
br label %24
66: ; preds = %24
store i32 0, i32* %9
br label %67
67: ; preds = %104, %66
%68 = load i32, i32* %9
%69 = load i32, i32* %2
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %107
71: ; preds = %67
store i32 0, i32* %10
br label %72
72: ; preds = %100, %71
%73 = load i32, i32* %10
%74 = load i32, i32* %3
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %103
76: ; preds = %72
store i32 0, i32* %11
br label %77
77: ; preds = %96, %76
%78 = load i32, i32* %11
%79 = load i32, i32* %4
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %99
81: ; preds = %77
%82 = load i32, i32* %9
%83 = sext i32 %82 to i64
%84 = mul nuw i64 %17, %19
%85 = mul nsw i64 %83, %84
%86 = getelementptr inbounds i32, i32* %23, i64 %85
%87 = load i32, i32* %10
%88 = sext i32 %87 to i64
%89 = mul nsw i64 %88, %19
%90 = getelementptr inbounds i32, i32* %86, i64 %89
%91 = load i32, i32* %11
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i32, i32* %90, i64 %92
%94 = load i32, i32* %93
%95 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %81
%97 = load i32, i32* %11
%98 = add nsw i32 %97, 1
store i32 %98, i32* %11
br label %77
99: ; preds = %77
br label %100
100: ; preds = %99
%101 = load i32, i32* %10
%102 = add nsw i32 %101, 1
store i32 %102, i32* %10
br label %72
103: ; preds = %72
br label %104
104: ; preds = %103
%105 = load i32, i32* %9
%106 = add nsw i32 %105, 1
store i32 %106, i32* %9
br label %67
107: ; preds = %67
%108 = call i32 (...) @getch()
%109 = load i8*, i8** %5
%110 = load i32, i32* %1
ret i32 %110
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [15 x i8] c" [%d][%d][%d] \00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = alloca [12 x i32]
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i32 0, i32* %4)
%6 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 1
%7 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i32 1, i32* %6)
%8 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 2
%9 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 1, i32 0, i32* %8)
%10 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 3
%11 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 1, i32 1, i32* %10)
%12 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 4
%13 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 2, i32 0, i32* %12)
%14 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 5
%15 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 2, i32 1, i32* %14)
%16 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 6
%17 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 0, i32 0, i32* %16)
%18 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 7
%19 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 0, i32 1, i32* %18)
%20 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 8
%21 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 1, i32 0, i32* %20)
%22 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 9
%23 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 1, i32 1, i32* %22)
%24 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 10
%25 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 2, i32 0, i32* %24)
%26 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 11
%27 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 2, i32 1, i32* %26)
%28 = load i32, i32* %4
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %6
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %8
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %10
%35 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %12
%37 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %14
%39 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %38)
%40 = load i32, i32* %16
%41 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %18
%43 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %20
%45 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %22
%47 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %24
%49 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %26
%51 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %50)
%52 = call i32 (...) @getch()
ret i32 0
}