#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_plane(int airplane[16][6]) {
  int row = 0, col = 0;
  for (; row < 16; ++row) {
    for (col = 0; col < 6; ++col) {
      if (col == 3) {
        printf("| ");
      }
      printf("%c ", airplane[row][col] ? airplane[row][col] + '0' : '_');
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_plane>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    11e3 <print_plane+0xd3>
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    11c7 <print_plane+0xb7>
cmpl   $0x3,-0x10(%rbp)
jne    115d <print_plane+0x4d>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     119b <print_plane+0x8b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    $0x30,%eax
mov    %eax,-0x14(%rbp)
jmp    11a8 <print_plane+0x98>
mov    $0x5f,%eax
mov    %eax,-0x14(%rbp)
jmp    11a8 <print_plane+0x98>
mov    -0x14(%rbp),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113b <print_plane+0x2b>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <print_plane+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_plane>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdi,%r12
mov    $0x14,%ebx
mov    $0x5f,%ebp
lea    0xec7(%rip),%r14
lea    0xebd(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x14(%r12,%rbx,1),%eax
lea    0x30(%rax),%esi
test   %eax,%eax
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x10(%r12,%rbx,1),%eax
lea    0x30(%rax),%esi
test   %eax,%eax
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0xc(%r12,%rbx,1),%eax
lea    0x30(%rax),%esi
test   %eax,%eax
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x8(%r12,%rbx,1),%eax
lea    0x30(%rax),%esi
test   %eax,%eax
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x4(%r12,%rbx,1),%eax
lea    0x30(%rax),%esi
test   %eax,%eax
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r12,%rbx,1),%eax
lea    0x30(%rax),%esi
test   %eax,%eax
cmove  %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x18,%rbx
cmp    $0x194,%rbx
jne    1150 <print_plane+0x30>
pop    %rbx
pop    %r12
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_plane([6 x i32]* %0) {
%2 = alloca [6 x i32]*
%3 = alloca i32
%4 = alloca i32
store [6 x i32]* %0, [6 x i32]** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %46, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %49
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %41, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 6
br i1 %11, label %12, label %44
12: ; preds = %9
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 3
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = load [6 x i32]*, [6 x i32]** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [6 x i32], [6 x i32]* %18, i64 %20
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [6 x i32], [6 x i32]* %21, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %37
27: ; preds = %17
%28 = load [6 x i32]*, [6 x i32]** %2
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [6 x i32], [6 x i32]* %28, i64 %30
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [6 x i32], [6 x i32]* %31, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = add nsw i32 %35, 48
br label %38
37: ; preds = %17
br label %38
38: ; preds = %37, %27
%39 = phi i32 [ %36, %27 ], [ 95, %37 ]
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
br label %41
41: ; preds = %38
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %9
44: ; preds = %9
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %46
46: ; preds = %44
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
store i32 %48, i32* %3
br label %5
49: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"| \00"
@.str.1 = [4 x i8] c"%c \00"
define void @print_plane([6 x i32]* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %42, %2 ]
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 0
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
%7 = add nsw i32 %5, 48
%8 = select i1 %6, i32 95, i32 %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 1
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
%13 = add nsw i32 %11, 48
%14 = select i1 %12, i32 95, i32 %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 2
%17 = load i32, i32* %16
%18 = icmp eq i32 %17, 0
%19 = add nsw i32 %17, 48
%20 = select i1 %18, i32 95, i32 %19
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%23 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 3
%24 = load i32, i32* %23
%25 = icmp eq i32 %24, 0
%26 = add nsw i32 %24, 48
%27 = select i1 %25, i32 95, i32 %26
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 4
%30 = load i32, i32* %29
%31 = icmp eq i32 %30, 0
%32 = add nsw i32 %30, 48
%33 = select i1 %31, i32 95, i32 %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 5
%36 = load i32, i32* %35
%37 = icmp eq i32 %36, 0
%38 = add nsw i32 %36, 48
%39 = select i1 %37, i32 95, i32 %38
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = tail call i32 @putchar(i32 10)
%42 = add nuw nsw i64 %3, 1
%43 = icmp eq i64 %42, 16
br i1 %43, label %44, label %2
44: ; preds = %2
ret void
}