#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*/ displaymap(int **);
int main() {
  int a[][8] = {{0, 0, 0, 0, 0, 0, 0, 0},  {0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0},  {0, 0, 0, 1, -1, 0, 0, 0},
                {0, 0, 0, -1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0},  {0, 0, 0, 0, 0, 0, 0, 0}};
  displaymap(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
movl   $0x1,-0xa4(%rbp)
movl   $0xffffffff,-0xa0(%rbp)
ff ff ff
movl   $0xffffffff,-0x84(%rbp)
ff ff ff
movl   $0x1,-0x80(%rbp)
lea    -0x110(%rbp),%rdi
call   1040 <displaymap@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x1,0x6c(%rsp)
movl   $0xffffffff,0x70(%rsp)
ff
movl   $0xffffffff,0x8c(%rsp)
ff ff ff ff
movl   $0x1,0x90(%rsp)
mov    %rsp,%rdi
call   1030 <displaymap@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x [8 x i32]]
store i32 0, i32* %1
%3 = bitcast [8 x [8 x i32]]* %2 to i8*
%4 = bitcast i8* %3 to [8 x [8 x i32]]*
%5 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %4, i32 0, i32 3
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i32 0, i32 3
store i32 1, i32* %6
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i32 0, i32 4
store i32 -1, i32* %7
%8 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %4, i32 0, i32 4
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i32 0, i32 3
store i32 -1, i32* %9
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i32 0, i32 4
store i32 1, i32* %10
%11 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %2, i64 0, i64 0
%12 = bitcast [8 x i32]* %11 to i32**
%13 = call i32 @displaymap(i32** %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [8 x [8 x i32]]
%2 = bitcast [8 x [8 x i32]]* %1 to i8*
%3 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 3, i64 3
store i32 1, i32* %3
%4 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 3, i64 4
store i32 -1, i32* %4
%5 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 4, i64 3
store i32 -1, i32* %5
%6 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 4, i64 4
store i32 1, i32* %6
%7 = bitcast [8 x [8 x i32]]* %1 to i32**
%8 = call i32 @displaymap(i32** %7)
ret i32 0
}