#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(void) {
  double volume, diametro, raio, area;
  while (scanf("%lf\n%lf\n", &volume, &diametro) != EOF) {
    raio = diametro / 2;
    area = raio * raio * 3.14;
    printf("ALTURA = %.2f\n", volume / area);
    printf("AREA = %.2f\n", area);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
je     11b0 <main+0x90>
movsd  -0x18(%rbp),%xmm0
movsd  0xea8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe85(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x28(%rbp),%xmm0
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x30,%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     11c3 <main+0xa3>
lea    0xec3(%rip),%r14
lea    0xecb(%rip),%r15
lea    0xeac(%rip),%r12
lea    0x8(%rsp),%r13
mov    %rsp,%rbx
nopl   0x0(%rax)
movsd  (%rsp),%xmm1
mulsd  0xe83(%rip),%xmm1
mulsd  %xmm1,%xmm1
mulsd  0xe7f(%rip),%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 = [9 x i8] c"%lf\0A%lf\0A\00"
@EOF = global i64 0
@.str.1 = [15 x i8] c"ALTURA = %.2f\0A\00"
@.str.2 = [13 x i8] c"AREA = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
br label %6
6: ; preds = %10, %0
%7 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %23
10: ; preds = %6
%11 = load double, double* %3
%12 = fdiv double %11, 2.000000e+00
store double %12, double* %4
%13 = load double, double* %4
%14 = load double, double* %4
%15 = fmul double %13, %14
%16 = fmul double %15, 3.140000e+00
store double %16, double* %5
%17 = load double, double* %2
%18 = load double, double* %5
%19 = fdiv double %17, %18
%20 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %19)
%21 = load double, double* %5
%22 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), double %21)
br label %6
23: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%lf\0A%lf\0A\00"
@EOF = global i64 0
@.str.1 = [15 x i8] c"ALTURA = %.2f\0A\00"
@.str.2 = [13 x i8] c"AREA = %.2f\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 ([9 x i8], [9 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, %10
%12 = fmul double %11, 3.140000e+00
%13 = load double, double* %1
%14 = fdiv double %13, %12
%15 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), double %12)
%17 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 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
}