#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 argc, char const *argv[]) {
  float balance;
  int withdrawal;
  scanf("%d %f", &withdrawal, &balance);
  if (withdrawal % 5 == 0 && balance >= (0.5 + withdrawal)) {
    printf("%0.2f\n", balance - withdrawal - 0.5);
  } else {
    printf("%0.2f\n", balance);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b5 <main+0x95>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2sdl -0x18(%rbp),%xmm2
movsd  0xe8c(%rip),%xmm1
addsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     11b5 <main+0x95>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe64(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
movss  -0x14(%rbp),%xmm0
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee4(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
imul   $0xcccccccd,%eax,%ecx
add    $0x19999999,%ecx
movss  0x4(%rsp),%xmm0
cmp    $0x33333332,%ecx
ja     117b <main+0x5b>
cvtss2sd %xmm0,%xmm1
cvtsi2sd %eax,%xmm2
addsd  0xe9e(%rip),%xmm2
ucomisd %xmm2,%xmm1
jb     117b <main+0x5b>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
addss  0xe8d(%rip),%xmm0
lea    0xe90(%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 = [7 x i8] c"%0.2f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %7, float* %6)
%9 = load i32, i32* %7
%10 = srem i32 %9, 5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %28
12: ; preds = %2
%13 = load float, float* %6
%14 = fpext float %13 to double
%15 = load i32, i32* %7
%16 = sitofp i32 %15 to double
%17 = fadd double 5.000000e-01, %16
%18 = fcmp oge double %14, %17
br i1 %18, label %19, label %28
19: ; preds = %12
%20 = load float, float* %6
%21 = load i32, i32* %7
%22 = sitofp i32 %21 to float
%23 = fsub float %20, %22
%24 = fpext float %23 to double
%25 = fsub double %24, 5.000000e-01
%26 = fptrunc double %25 to float
%27 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %26)
br label %31
28: ; preds = %12, %2
%29 = load float, float* %6
%30 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %29)
br label %31
31: ; preds = %28, %19
ret i32 0
}

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