#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 print_screen(char screen[15][15]) {
  int i, j;
  for (i = 0; i < 15; i++) {
    for (j = 0; j < 15; j++) {
      if (screen[i][j] == 'x')
        printf("x");
      else
        printf(" ");
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xf,-0xc(%rbp)
jge    11a8 <print_screen+0x98>
movl   $0x0,-0x10(%rbp)
cmpl   $0xf,-0x10(%rbp)
jge    118e <print_screen+0x7e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0xf,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x78,%eax
jne    116f <print_screen+0x5f>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <print_screen+0x6b>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    1180 <print_screen+0x70>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <print_screen+0x24>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_screen+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_screen>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0xe,%ebx
mov    $0x78,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpb   $0x78,-0xe(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0xd(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0xc(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0xb(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0xa(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x9(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x8(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x7(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x6(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x5(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x4(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x3(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x2(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,-0x1(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x78,(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xf,%rbx
cmp    $0xef,%rbx
jne    1130 <print_screen+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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