#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 calSquare(double, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n;
  double x;
  double y;
  scanf("%d", &n);
  int i = 0;
  while (i < n) {
    scanf("%lf", &x);
    scanf("%lf", &y);
    int year = 1;
    while (1) {
      if (calSquare(x, y) < (50 * year)) {
        printf("Property %d: This property will begin eroding in year %d.\n",
               i + 1, year);
        break;
      }
      year++;
    }
    i++;
  }
  printf("END OF OUTPUT.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e2 <main+0xb2>
lea    0xe98(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe86(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1050 <calSquare@plt>
imul   $0x32,-0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    11c6 <main+0x96>
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
mov    -0x20(%rbp),%edx
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d4 <main+0xa4>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    118f <main+0x5f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1158 <main+0x28>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%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    0xeab(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11e4 <main+0xa4>
lea    0xe94(%rip),%r13
lea    0x8(%rsp),%r15
lea    0xe8c(%rip),%r12
xor    %ebp,%ebp
nopl   (%rax)
xor    %r14d,%r14d
mov    %r13,%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1060 <calSquare@plt>
add    $0x1,%ebx
add    $0x32,%r14d
cmp    %r14d,%eax
jge    11b0 <main+0x70>
add    $0x1,%ebp
mov    %r12,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0x4(%rsp),%ebp
jl     1180 <main+0x40>
lea    0xe57(%rip),%rdi
call   1030 <puts@plt>
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 = [4 x i8] c"%lf\00"
@.str.2 = [59 x i8] c"Property %d: This property will begin eroding in year %d.\0A\00"
@.str.3 = [16 x i8] c"END OF OUTPUT.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %5
br label %8
8: ; preds = %30, %0
%9 = load i32, i32* %5
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %33
12: ; preds = %8
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
store i32 1, i32* %6
br label %15
15: ; preds = %12, %27
%16 = load double, double* %3
%17 = load double, double* %4
%18 = call i32 @calSquare(double %16, double %17)
%19 = load i32, i32* %6
%20 = mul nsw i32 50, %19
%21 = icmp slt i32 %18, %20
br i1 %21, label %22, label %27
22: ; preds = %15
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
%25 = load i32, i32* %6
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %25)
br label %30
27: ; preds = %15
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %15
30: ; preds = %22
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %8
33: ; preds = %8
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [59 x i8] c"Property %d: This property will begin eroding in year %d.\0A\00"
@str = [15 x i8] c"END OF OUTPUT.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %27
10: ; preds = %0, %22
%11 = phi i32 [ %23, %22 ], [ 0, %0 ]
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
br label %14
14: ; preds = %14, %10
%15 = phi i32 [ 1, %10 ], [ %21, %14 ]
%16 = load double, double* %2
%17 = load double, double* %3
%18 = call i32 @calSquare(double %16, double %17)
%19 = mul nsw i32 %15, 50
%20 = icmp slt i32 %18, %19
%21 = add nuw nsw i32 %15, 1
br i1 %20, label %22, label %14
22: ; preds = %14
%23 = add nuw nsw i32 %11, 1
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %15)
%25 = load i32, i32* %1
%26 = icmp slt i32 %23, %25
br i1 %26, label %10, label %27
27: ; preds = %22, %0
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}