#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 *, float *);
int main() {
  int x;
  float y;
  scanf("%d%f", &x, &y);
  if ((y >= (x + 0.50)) && (x % 5 == 0))
    y = y - x - 0.50;
  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
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xea7(%rip),%xmm2
addsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     11a2 <main+0x82>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a2 <main+0x82>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe6b(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe5f(%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
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
movslq 0x4(%rsp),%rax
cvtsi2sd %eax,%xmm2
addsd  0xeb1(%rip),%xmm2
ucomisd %xmm2,%xmm1
jb     118a <main+0x6a>
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %eax,%edx
sub    %ecx,%edx
jne    118a <main+0x6a>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
addss  0xe83(%rip),%xmm0
movss  %xmm0,(%rsp)
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%f\00"
@.str.1 = [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 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, float* %2)
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = load i32, i32* %1
%9 = sitofp i32 %8 to double
%10 = fadd double %9, 5.000000e-01
%11 = fcmp ole double %10, %7
%12 = srem i32 %8, 5
%13 = icmp eq i32 %12, 0
%14 = select i1 %11, i1 %13, i1 false
br i1 %14, label %15, label %19
15: ; preds = %0
%16 = sitofp i32 %8 to float
%17 = fsub float %6, %16
%18 = fadd float %17, -5.000000e-01
store float %18, float* %2
br label %19
19: ; preds = %15, %0
%20 = phi float [ %18, %15 ], [ %6, %0 ]
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %20)
ret i32 0
}