#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 */
float M_PI_2;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int i, N, year;
  float x, y;
  scanf("%d\n", &N);
  for (i = 1; i <= N; i++) {
    scanf("%f %f\n", &x, &y);
    year = M_PI_2 * (x * x + y * y) / 50.0 + 1.0;
    printf("Property %d: This property will begin eroding in year %d.\n", i,
           year);
  }
  puts("END OF OUTPUT.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11e8 <main+0xb8>
lea    0xea9(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    0x2e67(%rip),%rax
movss  (%rax),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x14(%rbp),%xmm3
movss  -0x18(%rbp),%xmm2
mulss  -0x18(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe57(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe43(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe46(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1158 <main+0x28>
lea    0xe67(%rip),%rdi
call   1030 <puts@plt>
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    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11d9 <main+0xa9>
lea    0xeb1(%rip),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%r12
mov    0x2e74(%rip),%r13
lea    0xea0(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
add    $0x1,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
mulss  0x0(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xe43(%rip),%xmm0
addsd  0xe43(%rip),%xmm0
cvttsd2si %xmm0,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
cmp    0xc(%rsp),%ebp
jl     1180 <main+0x50>
lea    0xe76(%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 = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"%f %f\0A\00"
@M_PI_2 = global float 0.000000e+00
@.str.2 = [59 x i8] c"Property %d: This property will begin eroding in year %d.\0A\00"
@.str.3 = [15 x i8] c"END OF OUTPUT.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 1, i32* %2
br label %8
8: ; preds = %29, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %32
12: ; preds = %8
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float* %5, float* %6)
%14 = load float, float* @M_PI_2
%15 = load float, float* %5
%16 = load float, float* %5
%17 = load float, float* %6
%18 = load float, float* %6
%19 = fmul float %17, %18
%20 = call float @llvm.fmuladd.f32(float %15, float %16, float %19)
%21 = fmul float %14, %20
%22 = fpext float %21 to double
%23 = fdiv double %22, 5.000000e+01
%24 = fadd double %23, 1.000000e+00
%25 = fptosi double %24 to i32
store i32 %25, i32* %4
%26 = load i32, i32* %2
%27 = load i32, i32* %4
%28 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %26, i32 %27)
br label %29
29: ; preds = %12
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %8
32: ; preds = %8
%33 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

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