#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 printMap(char map[7][7]) {
  int i, j;
  for (j = 0; j < 7; j++) {
    for (i = 0; i < 7; i++)
      printf("%c", map[i][j]);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printMap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jge    118d <printMap+0x7d>
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1171 <printMap+0x61>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x7,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <printMap+0x24>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1123 <printMap+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMap>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xfffffffffffffff9,%rbx
xchg   %ax,%ax
movsbl 0x7(%r14,%rbx,1),%edi
call   1030 <putchar@plt>
movsbl 0xe(%r14,%rbx,1),%edi
call   1030 <putchar@plt>
movsbl 0x15(%r14,%rbx,1),%edi
call   1030 <putchar@plt>
movsbl 0x1c(%r14,%rbx,1),%edi
call   1030 <putchar@plt>
movsbl 0x23(%r14,%rbx,1),%edi
call   1030 <putchar@plt>
movsbl 0x2a(%r14,%rbx,1),%edi
call   1030 <putchar@plt>
movsbl 0x31(%r14,%rbx,1),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
inc    %rbx
jne    1120 <printMap+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @printMap([7 x i8]* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %33, %2 ]
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 0, i64 %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = tail call i32 @putchar(i32 %6)
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 1, i64 %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = tail call i32 @putchar(i32 %10)
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 2, i64 %3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = tail call i32 @putchar(i32 %14)
%16 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 3, i64 %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = tail call i32 @putchar(i32 %18)
%20 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 4, i64 %3
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = tail call i32 @putchar(i32 %22)
%24 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 5, i64 %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = tail call i32 @putchar(i32 %26)
%28 = getelementptr inbounds [7 x i8], [7 x i8]* %0, i64 6, i64 %3
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = tail call i32 @putchar(i32 %30)
%32 = tail call i32 @putchar(i32 10)
%33 = add nuw nsw i64 %3, 1
%34 = icmp eq i64 %33, 7
br i1 %34, label %35, label %2
35: ; preds = %2
ret void
}