#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 Calc_Tax(int);
int Calc_Taxable_Amount(int);
int /*<<< orphan*/ Print_Results(float, float, float);
float floor(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float AssessedValue;
  int AssessedValueCents;
  float AssessedValueDollars;
  int TaxableAmtCents;
  float TaxableAmtDollars;
  int PrptyTaxCents;
  float PrptyTaxDollars;
  printf("\n\nPlease enter the assessed value of the property: $ ");
  scanf("%f", &AssessedValue);
  AssessedValueCents = AssessedValue * 100;
  TaxableAmtCents = Calc_Taxable_Amount(AssessedValueCents);
  TaxableAmtDollars = floor((TaxableAmtCents / 100.0) + 0.5);
  PrptyTaxCents = Calc_Tax(TaxableAmtCents);
  PrptyTaxDollars = floor((PrptyTaxCents / 100.0) + 0.5);
  Print_Results(AssessedValue, TaxableAmtDollars, PrptyTaxDollars);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movss  0xe7d(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1070 <Calc_Taxable_Amount@plt>
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xe51(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe3d(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1080 <floor@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <Calc_Tax@plt>
mov    %eax,-0x1c(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xe1b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe07(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1080 <floor@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x20(%rbp),%xmm2
call   1060 <Print_Results@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
mulss  0xe70(%rip),%xmm0
cvttss2si %xmm0,%edi
call   1070 <Calc_Taxable_Amount@plt>
mov    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xe5e(%rip),%xmm0
addsd  0xe5e(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <floor@plt>
movss  %xmm0,0xc(%rsp)
mov    %ebx,%edi
call   1030 <Calc_Tax@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xe31(%rip),%xmm0
addsd  0xe31(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <floor@plt>
movapd %xmm0,%xmm2
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1060 <Print_Results@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"\0A\0APlease enter the assessed value of the property: $ \00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca float
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca float
store i32 0, i32* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%11 = load float, float* %2
%12 = fmul float %11, 1.000000e+02
%13 = fptosi float %12 to i32
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = call i32 @Calc_Taxable_Amount(i32 %14)
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = sitofp i32 %16 to double
%18 = fdiv double %17, 1.000000e+02
%19 = fadd double %18, 5.000000e-01
%20 = fptosi double %19 to i32
%21 = call float @floor(i32 %20)
store float %21, float* %6
%22 = load i32, i32* %5
%23 = call i32 @Calc_Tax(i32 %22)
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = sitofp i32 %24 to double
%26 = fdiv double %25, 1.000000e+02
%27 = fadd double %26, 5.000000e-01
%28 = fptosi double %27 to i32
%29 = call float @floor(i32 %28)
store float %29, float* %8
%30 = load float, float* %2
%31 = load float, float* %6
%32 = load float, float* %8
%33 = call i32 @Print_Results(float %30, float %31, float %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [54 x i8] c"\0A\0APlease enter the assessed value of the property: $ \00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 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 = fmul float %5, 1.000000e+02
%7 = fptosi float %6 to i32
%8 = call i32 @Calc_Taxable_Amount(i32 %7)
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 1.000000e+02
%11 = fadd double %10, 5.000000e-01
%12 = fptosi double %11 to i32
%13 = call float @floor(i32 %12)
%14 = call i32 @Calc_Tax(i32 %8)
%15 = sitofp i32 %14 to double
%16 = fdiv double %15, 1.000000e+02
%17 = fadd double %16, 5.000000e-01
%18 = fptosi double %17 to i32
%19 = call float @floor(i32 %18)
%20 = load float, float* %1
%21 = call i32 @Print_Results(float %20, float %13, float %19)
ret i32 0
}