#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 a, b;
  scanf("%lf %lf", &a, &b);
  if (b > 100 || b < 0) {
    printf("invalid");
  } else {
    printf("%.2f", a * ((100 - b) / 100));
  }
  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
movsd  0xeb0(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1168 <main+0x48>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    117b <main+0x5b>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ab <main+0x8b>
movsd  -0x10(%rbp),%xmm0
movsd  0xe78(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  0xe6b(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
lea    0xe74(%rip),%rdi
mov    $0x1,%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
ucomisd 0xeb8(%rip),%xmm1
ja     117e <main+0x5e>
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
ja     117e <main+0x5e>
movsd  0xea4(%rip),%xmm2
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
mulsd  0x10(%rsp),%xmm0
lea    0xea3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    118c <main+0x6c>
lea    0xe8b(%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 = [8 x i8] c"invalid\00"
@.str.2 = [5 x i8] c"%.2f\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, 1.000000e+02
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %12
10: ; preds = %7, %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %19
12: ; preds = %7
%13 = load double, double* %2
%14 = load double, double* %3
%15 = fsub double 1.000000e+02, %14
%16 = fdiv double %15, 1.000000e+02
%17 = fmul double %13, %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %17)
br label %19
19: ; preds = %12, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [8 x i8] c"invalid\00"
@.str.2 = [5 x i8] c"%.2f\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, 1.000000e+02
%8 = fcmp olt double %6, 0.000000e+00
%9 = or i1 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %18
12: ; preds = %0
%13 = load double, double* %1
%14 = fsub double 1.000000e+02, %6
%15 = fdiv double %14, 1.000000e+02
%16 = fmul double %15, %13
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %16)
br label %18
18: ; preds = %12, %10
ret i32 0
}