#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() {
  float acc;
  int tw;
  float ch = 0.50;
  float fin;
  scanf("%d%f", &tw, &acc);
  if (acc < (tw + ch) || tw % 5 != 0) {
    printf("%f", acc);
  } else if ((acc + ch) > tw) {
    fin = acc - ch - tw;
    printf("%.2f", fin);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xec1(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
ja     117c <main+0x5c>
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1192 <main+0x72>
movss  -0x8(%rbp),%xmm0
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jbe    11d3 <main+0xb3>
movss  -0x8(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movslq (%rsp),%rax
cvtsi2ss %eax,%xmm1
movss  0xeb5(%rip),%xmm2
addss  %xmm1,%xmm2
ucomiss %xmm0,%xmm2
ja     1195 <main+0x75>
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
jne    1195 <main+0x75>
movss  0xe89(%rip),%xmm2
addss  %xmm0,%xmm2
ucomiss %xmm1,%xmm2
jbe    11a1 <main+0x81>
addss  0xe7c(%rip),%xmm0
subss  %xmm1,%xmm0
lea    0xe7a(%rip),%rdi
jmp    119c <main+0x7c>
lea    0xe6e(%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 = [3 x i8] c"%f\00"
@.str.2 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 5.000000e-01, float* %4
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, float* %2)
%7 = load float, float* %2
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to float
%10 = load float, float* %4
%11 = fadd float %9, %10
%12 = fcmp olt float %7, %11
br i1 %12, label %17, label %13
13: ; preds = %0
%14 = load i32, i32* %3
%15 = srem i32 %14, 5
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %13, %0
%18 = load float, float* %2
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float %18)
br label %37
20: ; preds = %13
%21 = load float, float* %2
%22 = load float, float* %4
%23 = fadd float %21, %22
%24 = load i32, i32* %3
%25 = sitofp i32 %24 to float
%26 = fcmp ogt float %23, %25
br i1 %26, label %27, label %36
27: ; preds = %20
%28 = load float, float* %2
%29 = load float, float* %4
%30 = fsub float %28, %29
%31 = load i32, i32* %3
%32 = sitofp i32 %31 to float
%33 = fsub float %30, %32
store float %33, float* %5
%34 = load float, float* %5
%35 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), float %34)
br label %36
36: ; preds = %27, %20
br label %37
37: ; preds = %36, %17
ret i32 0
}

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