#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() {
  int i, year, n;
  double x, y, r2;
  double area, r2area;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%lf %lf", &x, &y);
    r2 = x * x + y * y;
    year = 1;
    area = 0.0;
    r2area = 0.0;
    while (r2 > r2area) {
      year++;
      area += (double)50.0;
      r2area = 2 * area / 3.141592;
    }
    printf("Property %d: This property will begin eroding in year %d.\n", i + 1,
           year - 1);
  }
  printf("END OF OUTPUT.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1218 <main+0xf8>
lea    0xec0(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x1,-0xc(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    11f0 <main+0xd0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsd  0xe4d(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe33(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xe1e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    11a2 <main+0x82>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1148 <main+0x28>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    120e <main+0xde>
lea    0xeba(%rip),%r14
lea    0x18(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xeb1(%rip),%rbx
xor    %ebp,%ebp
jmp    1198 <main+0x68>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebp
add    $0xffffffff,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0xc(%rsp),%ebp
jge    120e <main+0xde>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    $0x1,%edx
ucomisd 0xe43(%rip),%xmm0
movsd  0xe2b(%rip),%xmm3
movsd  0xe2b(%rip),%xmm4
jbe    1180 <main+0x50>
mov    $0x1,%edx
xorpd  %xmm1,%xmm1
nopl   0x0(%rax,%rax,1)
add    $0x1,%edx
addsd  %xmm3,%xmm1
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
divsd  %xmm4,%xmm2
ucomisd %xmm2,%xmm0
ja     11f0 <main+0xc0>
jmp    1180 <main+0x50>
lea    0xe49(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"%lf %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 i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %1
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 0, i32* %2
br label %11
11: ; preds = %41, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %44
15: ; preds = %11
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %5, double* %6)
%17 = load double, double* %5
%18 = load double, double* %5
%19 = load double, double* %6
%20 = load double, double* %6
%21 = fmul double %19, %20
%22 = call double @llvm.fmuladd.f64(double %17, double %18, double %21)
store double %22, double* %7
store i32 1, i32* %3
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %9
br label %23
23: ; preds = %27, %15
%24 = load double, double* %7
%25 = load double, double* %9
%26 = fcmp ogt double %24, %25
br i1 %26, label %27, label %35
27: ; preds = %23
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
%30 = load double, double* %8
%31 = fadd double %30, 5.000000e+01
store double %31, double* %8
%32 = load double, double* %8
%33 = fmul double 2.000000e+00, %32
%34 = fdiv double %33, 0x400921FAFC8B007A
store double %34, double* %9
br label %23
35: ; preds = %23
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
%38 = load i32, i32* %3
%39 = sub nsw i32 %38, 1
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %37, i32 %39)
br label %41
41: ; preds = %35
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %11
44: ; preds = %11
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"%lf %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 %33
10: ; preds = %0, %26
%11 = phi i32 [ %28, %26 ], [ 0, %0 ]
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3)
%13 = load double, double* %2
%14 = load double, double* %3
%15 = fmul double %14, %14
%16 = call double @llvm.fmuladd.f64(double %13, double %13, double %15)
%17 = fcmp ogt double %16, 0.000000e+00
br i1 %17, label %18, label %26
18: ; preds = %10, %18
%19 = phi double [ %22, %18 ], [ 0.000000e+00, %10 ]
%20 = phi i32 [ %21, %18 ], [ 1, %10 ]
%21 = add nuw nsw i32 %20, 1
%22 = fadd double %19, 5.000000e+01
%23 = fmul double %22, 2.000000e+00
%24 = fdiv double %23, 0x400921FAFC8B007A
%25 = fcmp ogt double %16, %24
br i1 %25, label %18, label %26
26: ; preds = %18, %10
%27 = phi i32 [ 1, %10 ], [ %21, %18 ]
%28 = add nuw nsw i32 %11, 1
%29 = add nsw i32 %27, -1
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %28, i32 %29)
%31 = load i32, i32* %1
%32 = icmp slt i32 %28, %31
br i1 %32, label %10, label %33
33: ; preds = %26, %0
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}