#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*/ chance(float *, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int /*<<< orphan*/ system(char *);
int main() {
  int count;
  float money;
  printf("Enter the money:");
  scanf("%f", &money);
  money = money - 0.75;
  printf("%f\n", money);
  chance(&money, 2.0);
  chance(&money, 1.0);
  chance(&money, 0.50);
  chance(&money, 0.20);
  chance(&money, 0.10);
  chance(&money, 0.05);
  chance(&money, 0.01);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeed(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <scanf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeba(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb9(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    -0xc(%rbp),%rdi
movsd  0xe82(%rip),%xmm0
call   1030 <chance@plt>
lea    -0xc(%rbp),%rdi
movsd  0xe69(%rip),%xmm0
call   1030 <chance@plt>
lea    -0xc(%rbp),%rdi
movsd  0xe50(%rip),%xmm0
call   1030 <chance@plt>
lea    -0xc(%rbp),%rdi
movsd  0xe37(%rip),%xmm0
call   1030 <chance@plt>
lea    -0xc(%rbp),%rdi
movsd  0xe1e(%rip),%xmm0
call   1030 <chance@plt>
lea    -0xc(%rbp),%rdi
movsd  0xe05(%rip),%xmm0
call   1030 <chance@plt>
lea    -0xc(%rbp),%rdi
movsd  0xdec(%rip),%xmm0
call   1030 <chance@plt>
lea    0xe38(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xef4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xef7(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0xe8b(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xece(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe73(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <chance@plt>
movsd  0xe6b(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <chance@plt>
movsd  0xe63(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <chance@plt>
movsd  0xe5b(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <chance@plt>
movsd  0xe53(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <chance@plt>
movsd  0xe4b(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <chance@plt>
movsd  0xe43(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <chance@plt>
lea    0xe54(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter the money:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [4 x i8] c"%f\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fsub double %7, 7.500000e-01
%9 = fptrunc double %8 to float
store float %9, float* %3
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %11)
%13 = call i32 @chance(float* %3, double 2.000000e+00)
%14 = call i32 @chance(float* %3, double 1.000000e+00)
%15 = call i32 @chance(float* %3, double 5.000000e-01)
%16 = call i32 @chance(float* %3, double 2.000000e-01)
%17 = call i32 @chance(float* %3, double 1.000000e-01)
%18 = call i32 @chance(float* %3, double 5.000000e-02)
%19 = call i32 @chance(float* %3, double 1.000000e-02)
%20 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter the money:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [4 x i8] c"%f\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fadd float %5, -7.500000e-01
store float %6, float* %1
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %7)
%9 = call i32 @chance(float* %1, double 2.000000e+00)
%10 = call i32 @chance(float* %1, double 1.000000e+00)
%11 = call i32 @chance(float* %1, double 5.000000e-01)
%12 = call i32 @chance(float* %1, double 2.000000e-01)
%13 = call i32 @chance(float* %1, double 1.000000e-01)
%14 = call i32 @chance(float* %1, double 5.000000e-02)
%15 = call i32 @chance(float* %1, double 1.000000e-02)
%16 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}