#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 *, ...);
scalar_t__ scanf(char *, double *);
int main() {
  double n;
  while (scanf("%lf", &n) != EOF) {
    if (n < 0)
      break;
    if (n == 1)
      printf("0%%\n");
    else
      printf("%.0lf%%\n", ((n / 4.0) * 100));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     11c2 <main+0xa2>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1162 <main+0x42>
jmp    11c2 <main+0xa2>
movsd  -0x10(%rbp),%xmm0
movsd  0xe91(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1192 <main+0x72>
jp     1192 <main+0x72>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bd <main+0x9d>
movsd  -0x10(%rbp),%xmm0
movsd  0xe71(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe5d(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xe6b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xeec(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea3(%rip),%r13
cmp    0x0(%r13),%rax
je     11db <main+0xbb>
movsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     11db <main+0xbb>
lea    0xeba(%rip),%r14
lea    0xeaf(%rip),%r15
lea    0x8(%rsp),%rbx
lea    0xeac(%rip),%r12
nopl   (%rax)
ucomisd 0xe78(%rip),%xmm0
jne    11a0 <main+0x80>
jp     11a0 <main+0x80>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11ba <main+0x9a>
nopl   0x0(%rax,%rax,1)
mulsd  0xe60(%rip),%xmm0
mulsd  0xe60(%rip),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
je     11db <main+0xbb>
movsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1180 <main+0x60>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@EOF = global i64 0
@.str.1 = [5 x i8] c"0%%\0A\00"
@.str.2 = [9 x i8] c"%.0lf%%\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = load double, double* %1
%7 = fcmp olt double %6, 0.000000e+00
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %25, label %9
9: ; preds = %0, %18
%10 = phi double [ %22, %18 ], [ %6, %0 ]
%11 = fcmp oeq double %10, 1.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %18
14: ; preds = %9
%15 = fmul double %10, 2.500000e-01
%16 = fmul double %15, 1.000000e+02
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double %16)
br label %18
18: ; preds = %14, %12
%19 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%20 = load i64, i64* @EOF
%21 = icmp eq i64 %19, %20
%22 = load double, double* %1
%23 = fcmp olt double %22, 0.000000e+00
%24 = select i1 %21, i1 true, i1 %23
br i1 %24, label %25, label %9
25: ; preds = %18, %0
ret i32 0
}