#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*/ printf(char *, int, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int tabaux(int tab[3][3]) {
  setlocale(LC_ALL, "");
  int linha, coluna, x = 0;
  putchar('\n');
  for (linha = 0; linha < 3; linha++) {
    for (coluna = 0; coluna < 3; coluna++) {
      x++;
      printf(" %d ", x);
      if (coluna != (3 - 1))
        printf("%lc", L'\u2502');
    }
    putchar('\n');
    if (linha < 3 - 1)
      printf("%lc%lc%lc%lc%lc%lc%lc%lc%lc%lc%lc\n", L'\u2500', L'\u2500',
             L'\u2500', L'\u253c', L'\u2500', L'\u2500', L'\u2500', L'\u253c',
             L'\u2500', L'\u2500', L'\u2500');
  }
  putchar('\n');
  return 0;
}


x86 assembly (clang, -O0):
<tabaux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1050 <setlocale@plt>
movl   $0x0,-0x14(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1247 <tabaux+0x117>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    11ce <tabaux+0x9e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x2,-0x10(%rbp)
je     11bb <tabaux+0x8b>
lea    0xe56(%rip),%rdi
mov    $0x2502,%esi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c0 <tabaux+0x90>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117a <tabaux+0x4a>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x2,-0xc(%rbp)
jge    1234 <tabaux+0x104>
lea    0xe20(%rip),%rdi
mov    $0x2500,%r9d
mov    $0x253c,%r8d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
movl   $0x2500,(%rsp)
movl   $0x2500,0x8(%rsp)
movl   $0x253c,0x10(%rsp)
movl   $0x2500,0x18(%rsp)
movl   $0x2500,0x20(%rsp)
movl   $0x2500,0x28(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1239 <tabaux+0x109>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1169 <tabaux+0x39>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tabaux>:
push   %r15
push   %r14
push   %rbx
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xee6(%rip),%rsi
call   1050 <setlocale@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xea5(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe94(%rip),%r14
mov    %r14,%rdi
mov    $0x2502,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2502,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe4b(%rip),%r15
mov    %r15,%rdi
mov    $0x2500,%esi
mov    $0x2500,%edx
mov    $0x2500,%ecx
mov    $0x253c,%r8d
mov    $0x2500,%r9d
xor    %eax,%eax
push   $0x2500
push   $0x2500
push   $0x2500
push   $0x253c
push   $0x2500
push   $0x2500
call   1040 <printf@plt>
add    $0x30,%rsp
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2502,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2502,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
mov    $0x2500,%esi
mov    $0x2500,%edx
mov    $0x2500,%ecx
mov    $0x253c,%r8d
mov    $0x2500,%r9d
xor    %eax,%eax
push   $0x2500
push   $0x2500
push   $0x2500
push   $0x253c
push   $0x2500
push   $0x2500
call   1040 <printf@plt>
add    $0x30,%rsp
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2502,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2502,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c" %d \00"
@.str.2 = [4 x i8] c"%lc\00"
@.str.3 = [35 x i8] c"%lc%lc%lc%lc%lc%lc%lc%lc%lc%lc%lc\0A\00"
define i32 @tabaux([3 x i32]* %0) {
%2 = alloca [3 x i32]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store [3 x i32]* %0, [3 x i32]** %2
%6 = load i32, i32* @LC_ALL
%7 = call i32 @setlocale(i32 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
%8 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %3
br label %9
9: ; preds = %36, %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %39
12: ; preds = %9
store i32 0, i32* %4
br label %13
13: ; preds = %26, %12
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 3
br i1 %15, label %16, label %29
16: ; preds = %13
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 2
br i1 %22, label %23, label %25
23: ; preds = %16
%24 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 9474)
br label %25
25: ; preds = %23, %16
br label %26
26: ; preds = %25
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %13
29: ; preds = %13
%30 = call i32 @putchar(i8 signext 10)
%31 = load i32, i32* %3
%32 = icmp slt i32 %31, 2
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 9472, i32 9472, i32 9472, i32 9532, i32 9472, i32 9472, i32 9472, i32 9532, i32 9472, i32 9472, i32 9472)
br label %35
35: ; preds = %33, %29
br label %36
36: ; preds = %35
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
br label %9
39: ; preds = %9
%40 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c" %d \00"
@.str.2 = [4 x i8] c"%lc\00"
@.str.3 = [35 x i8] c"%lc%lc%lc%lc%lc%lc%lc%lc%lc%lc%lc\0A\00"
define i32 @tabaux([3 x i32]* nocapture readnone %0) {
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @putchar(i8 signext 10)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 9474)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 2)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 9474)
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
%10 = tail call i32 @putchar(i8 signext 10)
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 9472, i32 9472, i32 9472, i32 9532, i32 9472, i32 9472, i32 9472, i32 9532, i32 9472, i32 9472, i32 9472)
%12 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%13 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 9474)
%14 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%15 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 9474)
%16 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 6)
%17 = tail call i32 @putchar(i8 signext 10)
%18 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 9472, i32 9472, i32 9472, i32 9532, i32 9472, i32 9472, i32 9472, i32 9532, i32 9472, i32 9472, i32 9472)
%19 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 7)
%20 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 9474)
%21 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 8)
%22 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 9474)
%23 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 9)
%24 = tail call i32 @putchar(i8 signext 10)
%25 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}