#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 *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float income;
  float taxes;
  printf("Enter your income: ");
  scanf("%f", &income);
  if (income < 750.00f) {
    taxes = income * 0.01f;
  } else if (income < 2250.00f) {
    taxes = (income - 750) * 0.02f + 7.50f;
  } else if (income < 3750.00f) {
    taxes = (income - 2250) * 0.03f + 37.50f;
  } else if (income < 5250.00f) {
    taxes = (income - 3750) * 0.04f + 82.50f;
  } else if (income < 7000.00f) {
    taxes = (income - 5250) * 0.05f + 142.50f;
  } else {
    taxes = (income - 7000) * 0.06f + 230.00f;
  }
  printf("Taxes due: $%.2f\n", taxes);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeab(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1176 <main+0x56>
movss  0xed5(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    12cc <main+0x1ac>
movss  0xe86(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    11bb <main+0x9b>
movss  -0x8(%rbp),%xmm0
movss  0xe6b(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe93(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe8b(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    12c7 <main+0x1a7>
movss  0xe45(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1200 <main+0xe0>
movss  -0x8(%rbp),%xmm0
movss  0xe2a(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe46(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe3e(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    12c2 <main+0x1a2>
movss  0xe04(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1245 <main+0x125>
movss  -0x8(%rbp),%xmm0
movss  0xde9(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xdf9(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xdf1(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    12bd <main+0x19d>
movss  0xdc3(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    128a <main+0x16a>
movss  -0x8(%rbp),%xmm0
movss  0xda8(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xdac(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xda4(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    12b8 <main+0x198>
movss  -0x8(%rbp),%xmm0
movss  0xd79(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xd71(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xd69(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    12bd <main+0x19d>
jmp    12c2 <main+0x1a2>
jmp    12c7 <main+0x1a7>
jmp    12cc <main+0x1ac>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd7b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf2c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf32(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  0xeb2(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1160 <main+0x40>
mulss  0xef5(%rip),%xmm0
jmp    1217 <main+0xf7>
movss  0xe9c(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    118a <main+0x6a>
addss  0xecf(%rip),%xmm0
mulss  0xecb(%rip),%xmm0
addss  0xec7(%rip),%xmm0
jmp    1217 <main+0xf7>
movss  0xe76(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    11b1 <main+0x91>
addss  0xe99(%rip),%xmm0
mulss  0xe95(%rip),%xmm0
addss  0xe91(%rip),%xmm0
jmp    1217 <main+0xf7>
movss  0xe53(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    11d8 <main+0xb8>
addss  0xe66(%rip),%xmm0
mulss  0xe62(%rip),%xmm0
addss  0xe5e(%rip),%xmm0
jmp    1217 <main+0xf7>
movss  0xe30(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    11ff <main+0xdf>
addss  0xe33(%rip),%xmm0
mulss  0xe2f(%rip),%xmm0
addss  0xe2b(%rip),%xmm0
jmp    1217 <main+0xf7>
addss  0xe0d(%rip),%xmm0
mulss  0xe09(%rip),%xmm0
addss  0xe05(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe49(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter your income: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Taxes due: $%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 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* %2)
%6 = load float, float* %2
%7 = fcmp olt float %6, 7.500000e+02
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load float, float* %2
%10 = fmul float %9, 0x3F847AE140000000
store float %10, float* %3
br label %47
11: ; preds = %0
%12 = load float, float* %2
%13 = fcmp olt float %12, 2.250000e+03
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load float, float* %2
%16 = fsub float %15, 7.500000e+02
%17 = call float @llvm.fmuladd.f32(float %16, float 0x3F947AE140000000, float 7.500000e+00)
store float %17, float* %3
br label %46
18: ; preds = %11
%19 = load float, float* %2
%20 = fcmp olt float %19, 3.750000e+03
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load float, float* %2
%23 = fsub float %22, 2.250000e+03
%24 = call float @llvm.fmuladd.f32(float %23, float 0x3F9EB851E0000000, float 3.750000e+01)
store float %24, float* %3
br label %45
25: ; preds = %18
%26 = load float, float* %2
%27 = fcmp olt float %26, 5.250000e+03
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load float, float* %2
%30 = fsub float %29, 3.750000e+03
%31 = call float @llvm.fmuladd.f32(float %30, float 0x3FA47AE140000000, float 8.250000e+01)
store float %31, float* %3
br label %44
32: ; preds = %25
%33 = load float, float* %2
%34 = fcmp olt float %33, 7.000000e+03
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = load float, float* %2
%37 = fsub float %36, 5.250000e+03
%38 = call float @llvm.fmuladd.f32(float %37, float 0x3FA99999A0000000, float 1.425000e+02)
store float %38, float* %3
br label %43
39: ; preds = %32
%40 = load float, float* %2
%41 = fsub float %40, 7.000000e+03
%42 = call float @llvm.fmuladd.f32(float %41, float 0x3FAEB851E0000000, float 2.300000e+02)
store float %42, float* %3
br label %43
43: ; preds = %39, %35
br label %44
44: ; preds = %43, %28
br label %45
45: ; preds = %44, %21
br label %46
46: ; preds = %45, %14
br label %47
47: ; preds = %46, %8
%48 = load float, float* %3
%49 = fpext float %48 to double
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %49)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter your income: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Taxes due: $%.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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 = fcmp olt float %5, 7.500000e+02
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = fmul float %5, 0x3F847AE140000000
br label %32
9: ; preds = %0
%10 = fcmp olt float %5, 2.250000e+03
br i1 %10, label %11, label %14
11: ; preds = %9
%12 = fadd float %5, -7.500000e+02
%13 = call float @llvm.fmuladd.f32(float %12, float 0x3F947AE140000000, float 7.500000e+00)
br label %32
14: ; preds = %9
%15 = fcmp olt float %5, 3.750000e+03
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = fadd float %5, -2.250000e+03
%18 = call float @llvm.fmuladd.f32(float %17, float 0x3F9EB851E0000000, float 3.750000e+01)
br label %32
19: ; preds = %14
%20 = fcmp olt float %5, 5.250000e+03
br i1 %20, label %21, label %24
21: ; preds = %19
%22 = fadd float %5, -3.750000e+03
%23 = call float @llvm.fmuladd.f32(float %22, float 0x3FA47AE140000000, float 8.250000e+01)
br label %32
24: ; preds = %19
%25 = fcmp olt float %5, 7.000000e+03
br i1 %25, label %26, label %29
26: ; preds = %24
%27 = fadd float %5, -5.250000e+03
%28 = call float @llvm.fmuladd.f32(float %27, float 0x3FA99999A0000000, float 1.425000e+02)
br label %32
29: ; preds = %24
%30 = fadd float %5, -7.000000e+03
%31 = call float @llvm.fmuladd.f32(float %30, float 0x3FAEB851E0000000, float 2.300000e+02)
br label %32
32: ; preds = %11, %21, %29, %26, %16, %7
%33 = phi float [ %8, %7 ], [ %13, %11 ], [ %18, %16 ], [ %23, %21 ], [ %28, %26 ], [ %31, %29 ]
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %34)
ret i32 0
}