#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*/ imprimirRegiao(int, int);
int scanf(char *, int *, ...);
int main(void) {
  int casos, x0, y0, x1, y1;
  while (scanf("%d", &casos), casos != 0) {
    scanf("%d %d", &x0, &y0);
    while (casos-- > 0) {
      scanf("%d %d\n", &x1, &y1);
      imprimirRegiao(x1 - x0, y1 - y0);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     11a6 <main+0x86>
lea    0xeae(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    11a1 <main+0x81>
lea    0xe8a(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x14(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
sub    -0x10(%rbp),%esi
call   1030 <imprimirRegiao@plt>
jmp    1161 <main+0x41>
jmp    112f <main+0xf>
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    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
je     11d6 <main+0xb6>
lea    0x10(%rsp),%r12
lea    0xeae(%rip),%r13
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%rbp
lea    0xe9a(%rip),%r14
lea    0x4(%rsp),%r15
jmp    1184 <main+0x64>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
je     11d6 <main+0xb6>
lea    0xe75(%rip),%rdi
lea    0x14(%rsp),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
nopw   0x0(%rax,%rax,1)
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
test   %eax,%eax
jle    1170 <main+0x50>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
sub    0x14(%rsp),%edi
mov    0x8(%rsp),%esi
sub    0x10(%rsp),%esi
call   1030 <imprimirRegiao@plt>
jmp    11a0 <main+0x80>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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