#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 *, ...);
void showAsFatBoard(int X[]) {
  int j, k;
  for (j = 0; j < (35 + 2); j++) {
    for (k = 0; k < j; k++)
      printf(" ");
    for (k = 0; k < (35 + 2); k++)
      printf("%2d", X[j * (35 + 2) + k]);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<showAsFatBoard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x25,-0xc(%rbp)
jge    11b6 <showAsFatBoard+0xa6>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115c <showAsFatBoard+0x4c>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <showAsFatBoard+0x24>
movl   $0x0,-0x10(%rbp)
cmpl   $0x25,-0x10(%rbp)
jge    119a <showAsFatBoard+0x8a>
mov    -0x8(%rbp),%rax
imul   $0x25,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1163 <showAsFatBoard+0x53>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <showAsFatBoard+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showAsFatBoard>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
lea    0xece(%rip),%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rbx
test   %r15,%r15
je     1160 <showAsFatBoard+0x40>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbx
jne    1150 <showAsFatBoard+0x30>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x25,%rbx
jne    1170 <showAsFatBoard+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
add    $0x94,%r12
cmp    $0x25,%r15
jne    1140 <showAsFatBoard+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%2d\00"
define void @showAsFatBoard(i32* nocapture %0) {
br label %2
2: ; preds = %1, %21
%3 = phi i64 [ 0, %1 ], [ %23, %21 ]
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %7, %2
%6 = mul nuw nsw i64 %3, 37
br label %13
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 @putchar(i32 32)
%10 = add nuw nsw i32 %8, 1
%11 = zext i32 %10 to i64
%12 = icmp eq i64 %3, %11
br i1 %12, label %5, label %7
13: ; preds = %5, %13
%14 = phi i64 [ 0, %5 ], [ %19, %13 ]
%15 = add nuw nsw i64 %14, %6
%16 = getelementptr inbounds i32, i32* %0, i64 %15
%17 = load i32, i32* %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = add nuw nsw i64 %14, 1
%20 = icmp eq i64 %19, 37
br i1 %20, label %21, label %13
21: ; preds = %13
%22 = tail call i32 @putchar(i32 10)
%23 = add nuw nsw i64 %3, 1
%24 = icmp eq i64 %23, 37
br i1 %24, label %25, label %2
25: ; preds = %21
ret void
}