#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*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int /*<<< orphan*/ stderr;
int main() {
  int surfaceN;
  scanf("%d", &surfaceN);
  for (int i = 0; i < surfaceN; i++) {
    int landX;
    int landY;
    scanf("%d%d", &landX, &landY);
  }
  while (1) {
    int X;
    int Y;
    int hSpeed;
    int vSpeed;
    int fuel;
    int rotate;
    int power;
    scanf("%d%d%d%d%d%d%d", &X, &Y, &hSpeed, &vSpeed, &fuel, &rotate, &power);
    fprintf(stderr, "vspeed = %d\n", vSpeed);
    if (vSpeed < -20)
      printf("0 4\n");
    else
      printf("0 0\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1188 <main+0x58>
lea    0xe9f(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <main+0x28>
jmp    118d <main+0x5d>
lea    0xe6c(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x24(%rbp),%r8
lea    -0x28(%rbp),%r9
lea    -0x2c(%rbp),%r10
lea    -0x30(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1050 <scanf@plt>
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xe3c(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0xffffffec,-0x24(%rbp)
jge    11f3 <main+0xc3>
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
jmp    11ff <main+0xcf>
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
jmp    118d <main+0x5d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xecb(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1190 <main+0x60>
lea    0xeaf(%rip),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     1170 <main+0x40>
nopl   0x0(%rax)
lea    0x18(%rsp),%rbp
lea    0x1c(%rsp),%rbx
lea    0xe5f(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x24(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0x20(%rsp),%r9
xor    %eax,%eax
push   %rbp
push   %rbx
call   1050 <scanf@plt>
add    $0x10,%rsp
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rsp),%edx
lea    0xe34(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0xffffffec,0x8(%rsp)
lea    0xe34(%rip),%rax
lea    0xe29(%rip),%rdi
cmovl  %rax,%rdi
call   1030 <puts@plt>
jmp    1190 <main+0x60>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [15 x i8] c"%d%d%d%d%d%d%d\00"
@stderr = global i32 0
@.str.3 = [13 x i8] c"vspeed = %d\0A\00"
@str = [4 x i8] c"0 0\00"
@str.6 = [4 x i8] c"0 4\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = bitcast i32* %1 to i8*
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %0
%16 = bitcast i32* %2 to i8*
%17 = bitcast i32* %3 to i8*
br label %26
18: ; preds = %26, %0
%19 = bitcast i32* %4 to i8*
%20 = bitcast i32* %5 to i8*
%21 = bitcast i32* %6 to i8*
%22 = bitcast i32* %7 to i8*
%23 = bitcast i32* %8 to i8*
%24 = bitcast i32* %9 to i8*
%25 = bitcast i32* %10 to i8*
br label %32
26: ; preds = %15, %26
%27 = phi i32 [ 0, %15 ], [ %29, %26 ]
%28 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%29 = add nuw nsw i32 %27, 1
%30 = load i32, i32* %1
%31 = icmp slt i32 %29, %30
br i1 %31, label %26, label %18
32: ; preds = %18, %32
%33 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10)
%34 = load i32, i32* @stderr
%35 = load i32, i32* %7
%36 = call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %7
%38 = icmp slt i32 %37, -20
%39 = select i1 %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0)
%40 = call i32 @puts(i8* dereferenceable(1) %39)
br label %32
}