#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 withdrawAmt;
  float initialBalance;
  scanf("%d%f", &withdrawAmt, &initialBalance);
  if (withdrawAmt % 5 != 0) {
    printf("%0.2f", initialBalance);
  } else {
    if (initialBalance < withdrawAmt + 0.50) {
      printf("%0.2f", initialBalance);
    } else {
      printf("%0.2f", initialBalance - withdrawAmt - 0.50);
    }
  }
  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
je     116d <main+0x4d>
movss  -0xc(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0xba>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm2
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    11a7 <main+0x87>
movss  -0xc(%rbp),%xmm0
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    11d5 <main+0xb5>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe3f(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0xba>
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     117b <main+0x5b>
cvtss2sd %xmm0,%xmm1
cvtsi2sd %eax,%xmm2
addsd  0xe9e(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     117b <main+0x5b>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
addss  0xe8d(%rip),%xmm0
lea    0xe8f(%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 = [6 x i8] c"%0.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 %8, label %11
8: ; preds = %0
%9 = load float, float* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %9)
br label %31
11: ; preds = %0
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to double
%16 = fadd double %15, 5.000000e-01
%17 = fcmp olt double %13, %16
br i1 %17, label %18, label %21
18: ; preds = %11
%19 = load float, float* %3
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %19)
br label %30
21: ; preds = %11
%22 = load float, float* %3
%23 = load i32, i32* %2
%24 = sitofp i32 %23 to float
%25 = fsub float %22, %24
%26 = fpext float %25 to double
%27 = fsub double %26, 5.000000e-01
%28 = fptrunc double %27 to float
%29 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %28)
br label %30
30: ; preds = %21, %18
br label %31
31: ; preds = %30, %8
ret i32 0
}

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