#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 *, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int x;
  float y;
  scanf("%d", &x);
  scanf("%f", &y);
  if ((x % 5 == 0) && (y - 0.5 >= x))
    printf("%.2f", (y - x - 0.5));
  else
    printf("%.2f", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec3(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11be <main+0x9e>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe88(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     11be <main+0x9e>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe5b(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
jmp    11cf <main+0xaf>
movss  -0xc(%rbp),%xmm0
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed4(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
imul   $0xcccccccd,%eax,%ecx
add    $0x19999999,%ecx
movss  (%rsp),%xmm0
cmp    $0x33333332,%ecx
ja     118b <main+0x6b>
cvtss2sd %xmm0,%xmm1
addsd  0xe92(%rip),%xmm1
cvtsi2sd %eax,%xmm2
ucomisd %xmm2,%xmm1
jb     118b <main+0x6b>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
addss  0xe7d(%rip),%xmm0
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%6 = load i32, i32* %2
%7 = srem i32 %6, 5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %25
9: ; preds = %0
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fsub double %11, 5.000000e-01
%13 = load i32, i32* %2
%14 = sitofp i32 %13 to double
%15 = fcmp oge double %12, %14
br i1 %15, label %16, label %25
16: ; preds = %9
%17 = load float, float* %3
%18 = load i32, i32* %2
%19 = sitofp i32 %18 to float
%20 = fsub float %17, %19
%21 = fpext float %20 to double
%22 = fsub double %21, 5.000000e-01
%23 = fptrunc double %22 to float
%24 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), float %23)
br label %28
25: ; preds = %9, %0
%26 = load float, float* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), float %26)
br label %28
28: ; preds = %25, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%7 = load i32, i32* %1
%8 = srem i32 %7, 5
%9 = icmp eq i32 %8, 0
%10 = load float, float* %2
br i1 %9, label %11, label %20
11: ; preds = %0
%12 = fpext float %10 to double
%13 = fadd double %12, -5.000000e-01
%14 = sitofp i32 %7 to double
%15 = fcmp ult double %13, %14
br i1 %15, label %20, label %16
16: ; preds = %11
%17 = sitofp i32 %7 to float
%18 = fsub float %10, %17
%19 = fadd float %18, -5.000000e-01
br label %20
20: ; preds = %11, %0, %16
%21 = phi float [ %19, %16 ], [ %10, %11 ], [ %10, %0 ]
%22 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), float %21)
ret i32 0
}