#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*/ get_number(short *, int, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/);
void show(short *board) {
  int i;
  for (i = 3; i >= 0; i--)
    printf("%hi %hi %hi %hi\n", get_number(board, 0, i),
           get_number(board, 1, i), get_number(board, 2, i),
           get_number(board, 3, i));
}


x86 assembly (clang, -O0):
<show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     11ad <show+0x8d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <get_number@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1040 <get_number@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x2,%esi
call   1040 <get_number@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x3,%esi
call   1040 <get_number@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    %eax,%r8d
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <show+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <get_number@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1040 <get_number@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <get_number@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1040 <get_number@plt>
lea    0xe84(%rip),%r14
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1040 <get_number@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1040 <get_number@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1040 <get_number@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1040 <get_number@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <get_number@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <get_number@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1040 <get_number@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
call   1040 <get_number@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <get_number@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <get_number@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1040 <get_number@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %edx,%edx
call   1040 <get_number@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%hi %hi %hi %hi\0A\00"
define void @show(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
store i16* %0, i16** %2
store i32 3, i32* %3
br label %4
4: ; preds = %21, %1
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %24
7: ; preds = %4
%8 = load i16*, i16** %2
%9 = load i32, i32* %3
%10 = call i32 @get_number(i16* %8, i32 0, i32 %9)
%11 = load i16*, i16** %2
%12 = load i32, i32* %3
%13 = call i32 @get_number(i16* %11, i32 1, i32 %12)
%14 = load i16*, i16** %2
%15 = load i32, i32* %3
%16 = call i32 @get_number(i16* %14, i32 2, i32 %15)
%17 = load i16*, i16** %2
%18 = load i32, i32* %3
%19 = call i32 @get_number(i16* %17, i32 3, i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %13, i32 %16, i32 %19)
br label %21
21: ; preds = %7
%22 = load i32, i32* %3
%23 = add nsw i32 %22, -1
store i32 %23, i32* %3
br label %4
24: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%hi %hi %hi %hi\0A\00"
define void @show(i16* %0) {
%2 = tail call i32 @get_number(i16* %0, i32 0, i32 3)
%3 = tail call i32 @get_number(i16* %0, i32 1, i32 3)
%4 = tail call i32 @get_number(i16* %0, i32 2, i32 3)
%5 = tail call i32 @get_number(i16* %0, i32 3, i32 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4, i32 %5)
%7 = tail call i32 @get_number(i16* %0, i32 0, i32 2)
%8 = tail call i32 @get_number(i16* %0, i32 1, i32 2)
%9 = tail call i32 @get_number(i16* %0, i32 2, i32 2)
%10 = tail call i32 @get_number(i16* %0, i32 3, i32 2)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9, i32 %10)
%12 = tail call i32 @get_number(i16* %0, i32 0, i32 1)
%13 = tail call i32 @get_number(i16* %0, i32 1, i32 1)
%14 = tail call i32 @get_number(i16* %0, i32 2, i32 1)
%15 = tail call i32 @get_number(i16* %0, i32 3, i32 1)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14, i32 %15)
%17 = tail call i32 @get_number(i16* %0, i32 0, i32 0)
%18 = tail call i32 @get_number(i16* %0, i32 1, i32 0)
%19 = tail call i32 @get_number(i16* %0, i32 2, i32 0)
%20 = tail call i32 @get_number(i16* %0, i32 3, i32 0)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18, i32 %19, i32 %20)
ret void
}