#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 amt;
  float bal;
  scanf("%d %f", &amt, &bal);
  if (amt % 5 == 0 && bal >= amt + 0.50f) {
    printf("%.2f\n", ((bal - amt) - 0.50f));
  } else {
    printf("%.2f\n", bal);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a1 <main+0x81>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
movss  0xe97(%rip),%xmm2
addss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jb     11a1 <main+0x81>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  0xe74(%rip),%xmm1
subss  %xmm1,%xmm0
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
movss  -0xc(%rbp),%xmm0
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
imul   $0xcccccccd,%eax,%ecx
add    $0x19999999,%ecx
movss  (%rsp),%xmm0
cmp    $0x33333332,%ecx
ja     1173 <main+0x53>
cvtsi2ss %eax,%xmm1
movss  0xea2(%rip),%xmm2
addss  %xmm1,%xmm2
ucomiss %xmm2,%xmm0
jb     1173 <main+0x53>
subss  %xmm1,%xmm0
addss  0xe91(%rip),%xmm0
lea    0xe94(%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"%.2f\0A\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 = srem i32 %5, 5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %0
%9 = load float, float* %3
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to float
%12 = fadd float %11, 5.000000e-01
%13 = fcmp oge float %9, %12
br i1 %13, label %14, label %21
14: ; preds = %8
%15 = load float, float* %3
%16 = load i32, i32* %2
%17 = sitofp i32 %16 to float
%18 = fsub float %15, %17
%19 = fsub float %18, 5.000000e-01
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %19)
br label %24
21: ; preds = %8, %0
%22 = load float, float* %3
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %22)
br label %24
24: ; preds = %21, %14
ret i32 0
}

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