#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 *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  long long t, n;
  int m;
  scanf("%lld", &t);
  while (t != 0) {
    scanf("%ld", &n);
    scanf("%d", &m);
    if (m == 0) {
      printf("Airborne wins.\n");
    } else {
      printf("Pagfloyd wins.\n");
    }
    t--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpq   $0x0,-0x10(%rbp)
je     11a8 <main+0x88>
lea    0xeb2(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea4(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    118b <main+0x6b>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <main+0x77>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpq   $0x0,0x8(%rsp)
je     11a3 <main+0x83>
lea    0xeb5(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xead(%rip),%r12
lea    0x4(%rsp),%r13
lea    0xeb3(%rip),%rbx
lea    0xe9d(%rip),%rbp
nop
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
mov    %rbp,%rdi
cmove  %rbx,%rdi
call   1030 <puts@plt>
addq   $0xffffffffffffffff,0x8(%rsp)
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [16 x i8] c"Airborne wins.\0A\00"
@.str.4 = [16 x i8] c"Pagfloyd wins.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
br label %6
6: ; preds = %18, %0
%7 = load i64, i64* %2
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %3)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %18
16: ; preds = %9
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
%19 = load i64, i64* %2
%20 = add nsw i64 %19, -1
store i64 %20, i64* %2
br label %6
21: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [3 x i8] c"%d\00"
@str = [15 x i8] c"Pagfloyd wins.\00"
@str.5 = [15 x i8] c"Airborne wins.\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%8 = load i64, i64* %1
%9 = icmp eq i64 %8, 0
br i1 %9, label %20, label %10
10: ; preds = %0, %10
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0)
%16 = call i32 @puts(i8* dereferenceable(1) %15)
%17 = load i64, i64* %1
%18 = add nsw i64 %17, -1
store i64 %18, i64* %1
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %10
20: ; preds = %10, %0
ret i32 0
}