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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed6(%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    11e3 <main+0xc3>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8f(%rip),%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11e3 <main+0xc3>
cmpl   $0x0,-0x8(%rbp)
jle    11e3 <main+0xc3>
cmpl   $0x7d0,-0x8(%rbp)
jg     11e3 <main+0xc3>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11e3 <main+0xc3>
movss  0xe56(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     11e3 <main+0xc3>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe2a(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe22(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee4(%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     11a1 <main+0x81>
cvtsi2ss %eax,%xmm1
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
addsd  0xe94(%rip),%xmm1
xorps  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    11a1 <main+0x81>
test   %eax,%eax
jle    11a1 <main+0x81>
cmp    $0x7d0,%eax
jg     11a1 <main+0x81>
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jbe    11a1 <main+0x81>
movss  0xe78(%rip),%xmm2
ucomiss %xmm0,%xmm2
jb     11a1 <main+0x81>
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rsp)
lea    0xe69(%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 = [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 ([5 x i8], [5 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 %36, label %8
8: ; preds = %0
%9 = load float, float* %3
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to float
%12 = fsub float %9, %11
%13 = fpext float %12 to double
%14 = fsub double %13, 5.000000e-01
%15 = fcmp ogt double %14, 0.000000e+00
br i1 %15, label %16, label %36
16: ; preds = %8
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %36
19: ; preds = %16
%20 = load i32, i32* %2
%21 = icmp sle i32 %20, 2000
br i1 %21, label %22, label %36
22: ; preds = %19
%23 = load float, float* %3
%24 = fcmp ogt float %23, 0.000000e+00
br i1 %24, label %25, label %36
25: ; preds = %22
%26 = load float, float* %3
%27 = fcmp ole float %26, 2.000000e+03
br i1 %27, label %28, label %36
28: ; preds = %25
%29 = load float, float* %3
%30 = load i32, i32* %2
%31 = sitofp i32 %30 to float
%32 = fsub float %29, %31
%33 = fpext float %32 to double
%34 = fsub double %33, 5.000000e-01
%35 = fptrunc double %34 to float
store float %35, float* %3
br label %36
36: ; preds = %28, %25, %22, %19, %16, %8, %0
%37 = load float, float* %3
%38 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %37)
ret i32 0
}

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