#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, double *, double *);
int main() {
  double v, r, h, d, a;
  int tmp;
  while (scanf("%lf%lf", &v, &d) != EOF) {
    r = d / 2;
    a = 3.14 * r * r;
    h = v / a;
    printf("ALTURA = %.2lf\n", h);
    printf("AREA = %.2lf\n", a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
je     11b6 <main+0x96>
movsd  -0x28(%rbp),%xmm0
movsd  0xea8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe8f(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x40,%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    0xedb(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x2e9f(%rip),%rbp
cmp    0x0(%rbp),%rax
je     11c7 <main+0xa7>
lea    0xec1(%rip),%r14
lea    0xeca(%rip),%r15
lea    0xeac(%rip),%r12
lea    0x8(%rsp),%r13
mov    %rsp,%rbx
nopl   0x0(%rax)
movsd  (%rsp),%xmm0
mulsd  0xe83(%rip),%xmm0
movapd %xmm0,%xmm1
mulsd  0xe7f(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
movsd  0x10(%rsp),%xmm0
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    0x0(%rbp),%rax
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%lf%lf\00"
@EOF = global i64 0
@.str.1 = [16 x i8] c"ALTURA = %.2lf\0A\00"
@.str.2 = [14 x i8] c"AREA = %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
store i32 0, i32* %1
br label %8
8: ; preds = %12, %0
%9 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %2, double* %5)
%10 = load i64, i64* @EOF
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %26
12: ; preds = %8
%13 = load double, double* %5
%14 = fdiv double %13, 2.000000e+00
store double %14, double* %3
%15 = load double, double* %3
%16 = fmul double 3.140000e+00, %15
%17 = load double, double* %3
%18 = fmul double %16, %17
store double %18, double* %6
%19 = load double, double* %2
%20 = load double, double* %6
%21 = fdiv double %19, %20
store double %21, double* %4
%22 = load double, double* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %22)
%24 = load double, double* %6
%25 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %24)
br label %8
26: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@EOF = global i64 0
@.str.1 = [16 x i8] c"ALTURA = %.2lf\0A\00"
@.str.2 = [14 x i8] c"AREA = %.2lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %20, label %8
8: ; preds = %0, %8
%9 = load double, double* %2
%10 = fmul double %9, 5.000000e-01
%11 = fmul double %10, 3.140000e+00
%12 = fmul double %10, %11
%13 = load double, double* %1
%14 = fdiv double %13, %12
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %12)
%17 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %8
20: ; preds = %8, %0
ret i32 0
}