#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;
  while (1) {
    scanf("%lf %lf", &a, &b);
    if (a < 0) {
      break;
    }
    if (b > 100 || b < 0) {
      printf("invalid\n");
    } else {
      printf("%.2f\n", 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>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1156 <main+0x36>
jmp    11c3 <main+0xa3>
movsd  -0x18(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     117b <main+0x5b>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    118e <main+0x6e>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <main+0x9e>
movsd  -0x10(%rbp),%xmm0
movsd  0xe65(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  0xe58(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
lea    0xe62(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecc(%rip),%rdi
mov    %rsp,%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xea7(%rip),%r14
lea    0xe92(%rip),%r15
mov    %rsp,%r12
lea    0x8(%rsp),%rbx
lea    0xe8b(%rip),%r13
jmp    11b5 <main+0x85>
nop
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1160 <main+0x30>
movsd  0x8(%rsp),%xmm1
ucomisd 0xe3d(%rip),%xmm1
ja     1190 <main+0x60>
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
ja     1190 <main+0x60>
movsd  0xe29(%rip),%xmm3
movapd %xmm3,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1198 <main+0x68>

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

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