#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 */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_map(uint8_t map[10][10]) {
  int x, y;
  printf("  ");
  for (x = 0; x < 10; x++)
    printf("%c ", 'A' + x);
  printf("\n");
  for (y = 0; y < 10; y++) {
    printf("%c ", '0' + y);
    for (x = 0; x < 10; x++)
      printf("%c ", map[x][y] ? ((map[x][y] == 1) ? 'x' : 'o') : ' ');
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    115d <print_map+0x4d>
mov    -0xc(%rbp),%esi
add    $0x41,%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <print_map+0x21>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1234 <print_map+0x124>
mov    -0x10(%rbp),%esi
add    $0x30,%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1218 <print_map+0x108>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     11ec <print_map+0xdc>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    $0x6f,%eax
mov    $0x78,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    11f9 <print_map+0xe9>
mov    $0x20,%eax
mov    %eax,-0x14(%rbp)
jmp    11f9 <print_map+0xe9>
mov    -0x14(%rbp),%esi
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1197 <print_map+0x87>
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1172 <print_map+0x62>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_map>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec4(%rip),%r14
mov    %r14,%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x42,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x43,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x44,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x45,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x46,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x47,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x49,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x4a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xfffffffffffffff6,%rbx
mov    $0x20,%ebp
nopl   0x0(%rax,%rax,1)
lea    0x3a(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x50(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x78(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xa0(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc8(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xf0(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x118(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x140(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x168(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x190(%r15,%rbx,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
test   %eax,%eax
lea    0x6f(%rcx,%rcx,8),%esi
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
inc    %rbx
jne    11f0 <print_map+0xd0>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c" \00"
@.str.1 = [4 x i8] c"%c \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print_map([10 x i32]* %0) {
%2 = alloca [10 x i32]*
%3 = alloca i32
%4 = alloca i32
store [10 x i32]* %0, [10 x i32]** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %6
6: ; preds = %13, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 65, %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %9
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %6
16: ; preds = %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %4
br label %18
18: ; preds = %59, %16
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %62
21: ; preds = %18
%22 = load i32, i32* %4
%23 = add nsw i32 48, %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
store i32 0, i32* %3
br label %25
25: ; preds = %54, %21
%26 = load i32, i32* %3
%27 = icmp slt i32 %26, 10
br i1 %27, label %28, label %57
28: ; preds = %25
%29 = load [10 x i32]*, [10 x i32]** %2
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %29, i64 %31
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %32, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %50
38: ; preds = %28
%39 = load [10 x i32]*, [10 x i32]** %2
%40 = load i32, i32* %3
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [10 x i32], [10 x i32]* %39, i64 %41
%43 = load i32, i32* %4
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %42, i64 0, i64 %44
%46 = load i32, i32* %45
%47 = icmp eq i32 %46, 1
%48 = zext i1 %47 to i64
%49 = select i1 %47, i32 120, i32 111
br label %51
50: ; preds = %28
br label %51
51: ; preds = %50, %38
%52 = phi i32 [ %49, %38 ], [ 32, %50 ]
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %51
%55 = load i32, i32* %3
%56 = add nsw i32 %55, 1
store i32 %56, i32* %3
br label %25
57: ; preds = %25
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %59
59: ; preds = %57
%60 = load i32, i32* %4
%61 = add nsw i32 %60, 1
store i32 %61, i32* %4
br label %18
62: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
@.str.1 = [4 x i8] c"%c \00"
define void @print_map([10 x i32]* nocapture %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 65)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 66)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 67)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 68)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 69)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 70)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 71)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 72)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 73)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 74)
%13 = tail call i32 @putchar(i32 10)
br label %14
14: ; preds = %1, %14
%15 = phi i64 [ 0, %1 ], [ %90, %14 ]
%16 = trunc i64 %15 to i32
%17 = add i32 %16, 48
%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 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 0, i64 %15
%20 = load i32, i32* %19
%21 = icmp eq i32 %20, 0
%22 = icmp eq i32 %20, 1
%23 = select i1 %22, i32 120, i32 111
%24 = select i1 %21, i32 32, i32 %23
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 1, i64 %15
%27 = load i32, i32* %26
%28 = icmp eq i32 %27, 0
%29 = icmp eq i32 %27, 1
%30 = select i1 %29, i32 120, i32 111
%31 = select i1 %28, i32 32, i32 %30
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 2, i64 %15
%34 = load i32, i32* %33
%35 = icmp eq i32 %34, 0
%36 = icmp eq i32 %34, 1
%37 = select i1 %36, i32 120, i32 111
%38 = select i1 %35, i32 32, i32 %37
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 3, i64 %15
%41 = load i32, i32* %40
%42 = icmp eq i32 %41, 0
%43 = icmp eq i32 %41, 1
%44 = select i1 %43, i32 120, i32 111
%45 = select i1 %42, i32 32, i32 %44
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 4, i64 %15
%48 = load i32, i32* %47
%49 = icmp eq i32 %48, 0
%50 = icmp eq i32 %48, 1
%51 = select i1 %50, i32 120, i32 111
%52 = select i1 %49, i32 32, i32 %51
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 5, i64 %15
%55 = load i32, i32* %54
%56 = icmp eq i32 %55, 0
%57 = icmp eq i32 %55, 1
%58 = select i1 %57, i32 120, i32 111
%59 = select i1 %56, i32 32, i32 %58
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %59)
%61 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 6, i64 %15
%62 = load i32, i32* %61
%63 = icmp eq i32 %62, 0
%64 = icmp eq i32 %62, 1
%65 = select i1 %64, i32 120, i32 111
%66 = select i1 %63, i32 32, i32 %65
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %66)
%68 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 7, i64 %15
%69 = load i32, i32* %68
%70 = icmp eq i32 %69, 0
%71 = icmp eq i32 %69, 1
%72 = select i1 %71, i32 120, i32 111
%73 = select i1 %70, i32 32, i32 %72
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %73)
%75 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 8, i64 %15
%76 = load i32, i32* %75
%77 = icmp eq i32 %76, 0
%78 = icmp eq i32 %76, 1
%79 = select i1 %78, i32 120, i32 111
%80 = select i1 %77, i32 32, i32 %79
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %80)
%82 = getelementptr inbounds [10 x i32], [10 x i32]* %0, i64 9, i64 %15
%83 = load i32, i32* %82
%84 = icmp eq i32 %83, 0
%85 = icmp eq i32 %83, 1
%86 = select i1 %85, i32 120, i32 111
%87 = select i1 %84, i32 32, i32 %86
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %87)
%89 = tail call i32 @putchar(i32 10)
%90 = add nuw nsw i64 %15, 1
%91 = icmp eq i64 %90, 10
br i1 %91, label %92, label %14
92: ; preds = %14
ret void
}