#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(void) {
  int withdraw;
  float balance;
  scanf("%d %f", &withdraw, &balance);
  if (withdraw % 5 != 0 || withdraw + 0.50 > balance) {
    printf("%.2f", balance);
  } else {
    balance -= withdraw + 0.50;
    printf("%.2f", balance);
  }
  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>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117b <main+0x5b>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe9c(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1191 <main+0x71>
movss  -0xc(%rbp),%xmm0
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <main+0xa9>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe62(%rip),%xmm0
addsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe4a(%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
cmp    $0x33333333,%ecx
jb     1154 <main+0x34>
movss  (%rsp),%xmm0
jmp    117f <main+0x5f>
cvtsi2sd %eax,%xmm1
addsd  0xea0(%rip),%xmm1
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm2
ucomisd %xmm2,%xmm1
ja     117f <main+0x5f>
subsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,(%rsp)
lea    0xe88(%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 = [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 ([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 ne i32 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %0
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to double
%11 = fadd double %10, 5.000000e-01
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fcmp ogt double %11, %13
br i1 %14, label %15, label %18
15: ; preds = %8, %0
%16 = load float, float* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %16)
br label %28
18: ; preds = %8
%19 = load i32, i32* %2
%20 = sitofp i32 %19 to double
%21 = fadd double %20, 5.000000e-01
%22 = load float, float* %3
%23 = fpext float %22 to double
%24 = fsub double %23, %21
%25 = fptrunc double %24 to float
store float %25, float* %3
%26 = load float, float* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %26)
br label %28
28: ; preds = %18, %15
ret i32 0
}

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