#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 *, double *, double *);
int main() {
  double w, h;
  scanf("%lf %lf", &w, &h);
  if (h > 0 && w > 0) {
    h /= 100;
    printf("%.2f", w / (h * h));
  } else {
    printf("invalid");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11a3 <main+0x83>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11a3 <main+0x83>
movsd  -0x18(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xe79(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11b1 <main+0x91>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    117c <main+0x5c>
movsd  0x10(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jbe    117c <main+0x5c>
divsd  0xea2(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
lea    0xe9d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    118a <main+0x6a>
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [5 x i8] c"%.2f\00"
@.str.2 = [8 x i8] c"invalid\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = load double, double* %3
%6 = fcmp ogt double %5, 0.000000e+00
br i1 %6, label %7, label %19
7: ; preds = %0
%8 = load double, double* %2
%9 = fcmp ogt double %8, 0.000000e+00
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load double, double* %3
%12 = fdiv double %11, 1.000000e+02
store double %12, double* %3
%13 = load double, double* %2
%14 = load double, double* %3
%15 = load double, double* %3
%16 = fmul double %14, %15
%17 = fdiv double %13, %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %17)
br label %21
19: ; preds = %7, %0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [5 x i8] c"%.2f\00"
@.str.2 = [8 x i8] c"invalid\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %2
%7 = fcmp ogt double %6, 0.000000e+00
%8 = load double, double* %1
%9 = fcmp ogt double %8, 0.000000e+00
%10 = select i1 %7, i1 %9, i1 false
br i1 %10, label %11, label %16
11: ; preds = %0
%12 = fdiv double %6, 1.000000e+02
store double %12, double* %2
%13 = fmul double %12, %12
%14 = fdiv double %8, %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %14)
br label %18
16: ; preds = %0
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %18
18: ; preds = %16, %11
ret i32 0
}