#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 (((x >= 0) && (x <= 2000)) && ((y >= 0) && (y <= 2000))) {
    if (x % 5 == 0) {
      if (x >= (y - 0.5)) {
        printf("%0.2f", y);
      } else {
        y = y - x;
        y = y - 0.5;
        printf("%0.2f", y);
      }
    } else
      printf("%0.2f", y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1228 <main+0x108>
cmpl   $0x7d0,-0x8(%rbp)
jg     1228 <main+0x108>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1228 <main+0x108>
movss  0xe8d(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     1228 <main+0x108>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1212 <main+0xf2>
cvtsi2sdl -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe61(%rip),%xmm2
subsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     11cb <main+0xab>
movss  -0xc(%rbp),%xmm0
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
jmp    120d <main+0xed>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe19(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe0e(%rip),%rdi
call   1030 <printf@plt>
jmp    1223 <main+0x103>
movss  -0xc(%rbp),%xmm0
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
jmp    1228 <main+0x108>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x7d0,%eax
ja     11a8 <main+0x88>
movss  (%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     11a8 <main+0x88>
movss  0xeab(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     11a8 <main+0x88>
imul   $0xffffcccd,%eax,%ecx
movzwl %cx,%ecx
cmp    $0x3333,%ecx
ja     119c <main+0x7c>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
cvtss2sd %xmm0,%xmm2
addsd  0xe8a(%rip),%xmm2
ucomisd %xmm2,%xmm1
jae    119c <main+0x7c>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
addss  0xe6d(%rip),%xmm0
movss  %xmm0,(%rsp)
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %f\00"
@.str.1 = [6 x i8] c"%0.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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, float* %3)
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %46
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 2000
br i1 %9, label %10, label %46
10: ; preds = %7
%11 = load float, float* %3
%12 = fcmp oge float %11, 0.000000e+00
br i1 %12, label %13, label %46
13: ; preds = %10
%14 = load float, float* %3
%15 = fcmp ole float %14, 2.000000e+03
br i1 %15, label %16, label %46
16: ; preds = %13
%17 = load i32, i32* %2
%18 = srem i32 %17, 5
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %42
20: ; preds = %16
%21 = load i32, i32* %2
%22 = sitofp i32 %21 to double
%23 = load float, float* %3
%24 = fpext float %23 to double
%25 = fsub double %24, 5.000000e-01
%26 = fcmp oge double %22, %25
br i1 %26, label %27, label %30
27: ; preds = %20
%28 = load float, float* %3
%29 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %28)
br label %41
30: ; preds = %20
%31 = load float, float* %3
%32 = load i32, i32* %2
%33 = sitofp i32 %32 to float
%34 = fsub float %31, %33
store float %34, float* %3
%35 = load float, float* %3
%36 = fpext float %35 to double
%37 = fsub double %36, 5.000000e-01
%38 = fptrunc double %37 to float
store float %38, float* %3
%39 = load float, float* %3
%40 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %39)
br label %41
41: ; preds = %30, %27
br label %45
42: ; preds = %16
%43 = load float, float* %3
%44 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %43)
br label %45
45: ; preds = %42, %41
br label %46
46: ; preds = %45, %13, %10, %7, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %f\00"
@.str.1 = [6 x i8] c"%0.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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, float* %2)
%6 = load i32, i32* %1
%7 = icmp ult i32 %6, 2001
%8 = load float, float* %2
%9 = fcmp oge float %8, 0.000000e+00
%10 = select i1 %7, i1 %9, i1 false
%11 = fcmp ole float %8, 2.000000e+03
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %13, label %29
13: ; preds = %0
%14 = trunc i32 %6 to i16
%15 = urem i16 %14, 5
%16 = icmp eq i16 %15, 0
br i1 %16, label %17, label %26
17: ; preds = %13
%18 = sitofp i32 %6 to double
%19 = fpext float %8 to double
%20 = fadd double %19, -5.000000e-01
%21 = fcmp ugt double %20, %18
br i1 %21, label %22, label %26
22: ; preds = %17
%23 = sitofp i32 %6 to float
%24 = fsub float %8, %23
%25 = fadd float %24, -5.000000e-01
store float %25, float* %2
br label %26
26: ; preds = %13, %17, %22
%27 = phi float [ %25, %22 ], [ %8, %17 ], [ %8, %13 ]
%28 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %27)
br label %29
29: ; preds = %26, %0
ret i32 0
}