#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 notify_full(int airplane[16][6]) {
  int row = 0, col = 0;
  for (; row < 16; ++row) {
    for (col = 0; col < 6; ++col) {
      if (!airplane[row][col]) {
        return;
      }
    }
  }
  printf("Airplane is full!\n");
}


x86 assembly (clang, -O0):
<notify_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    118d <notify_full+0x7d>
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    117a <notify_full+0x6a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1167 <notify_full+0x57>
jmp    1199 <notify_full+0x89>
jmp    116c <notify_full+0x5c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113b <notify_full+0x2b>
jmp    117f <notify_full+0x6f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <notify_full+0x1a>
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notify_full>:
mov    $0x14,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmpl   $0x0,-0x14(%rdi,%rax,1)
je     1161 <notify_full+0x51>
cmpl   $0x0,-0x10(%rdi,%rax,1)
je     1161 <notify_full+0x51>
cmpl   $0x0,-0xc(%rdi,%rax,1)
je     1161 <notify_full+0x51>
cmpl   $0x0,-0x8(%rdi,%rax,1)
je     1161 <notify_full+0x51>
cmpl   $0x0,-0x4(%rdi,%rax,1)
je     1161 <notify_full+0x51>
cmpl   $0x0,(%rdi,%rax,1)
je     1161 <notify_full+0x51>
add    $0x18,%rax
cmp    $0x194,%rax
jne    1120 <notify_full+0x10>
lea    0xea4(%rip),%rdi
jmp    1030 <puts@plt>
ret

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

LLVM IR (-O2):
@str = [18 x i8] c"Airplane is full!\00"
define void @notify_full([6 x i32]* nocapture %0) {
br label %2
2: ; preds = %1, %27
%3 = phi i64 [ 0, %1 ], [ %28, %27 ]
%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
br i1 %6, label %32, label %7
7: ; preds = %2
%8 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 1
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %32, label %11
11: ; preds = %7
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 2
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %32, label %15
15: ; preds = %11
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 3
%17 = load i32, i32* %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %32, label %19
19: ; preds = %15
%20 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 4
%21 = load i32, i32* %20
%22 = icmp eq i32 %21, 0
br i1 %22, label %32, label %23
23: ; preds = %19
%24 = getelementptr inbounds [6 x i32], [6 x i32]* %0, i64 %3, i64 5
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 0
br i1 %26, label %32, label %27
27: ; preds = %23
%28 = add nuw nsw i64 %3, 1
%29 = icmp eq i64 %28, 16
br i1 %29, label %30, label %2
30: ; preds = %27
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %32
32: ; preds = %2, %7, %11, %15, %19, %23, %30
ret void
}