float calc_taxes(float income) {
  float taxes;
  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;
  }
  return taxes;
}


x86 assembly (clang, -O0):
<calc_taxes>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1132 <calc_taxes+0x32>
movss  0xf19(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1288 <calc_taxes+0x188>
movss  0xeca(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1177 <calc_taxes+0x77>
movss  -0x4(%rbp),%xmm0
movss  0xeaf(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xed7(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xecf(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1283 <calc_taxes+0x183>
movss  0xe89(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    11bc <calc_taxes+0xbc>
movss  -0x4(%rbp),%xmm0
movss  0xe6e(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe8a(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe82(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    127e <calc_taxes+0x17e>
movss  0xe48(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1201 <calc_taxes+0x101>
movss  -0x4(%rbp),%xmm0
movss  0xe2d(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe3d(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe35(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1279 <calc_taxes+0x179>
movss  0xe07(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1246 <calc_taxes+0x146>
movss  -0x4(%rbp),%xmm0
movss  0xdec(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xdf0(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xde8(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1274 <calc_taxes+0x174>
movss  -0x4(%rbp),%xmm0
movss  0xdbd(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xdb5(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xdad(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1279 <calc_taxes+0x179>
jmp    127e <calc_taxes+0x17e>
jmp    1283 <calc_taxes+0x183>
jmp    1288 <calc_taxes+0x188>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_taxes>:
movss  0xef8(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1116 <calc_taxes+0x16>
mulss  0xf3b(%rip),%xmm0
ret
movss  0xee6(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    113c <calc_taxes+0x3c>
addss  0xf19(%rip),%xmm0
mulss  0xf15(%rip),%xmm0
addss  0xf11(%rip),%xmm0
ret
movss  0xec4(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1162 <calc_taxes+0x62>
addss  0xee7(%rip),%xmm0
mulss  0xee3(%rip),%xmm0
addss  0xedf(%rip),%xmm0
ret
movss  0xea2(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1188 <calc_taxes+0x88>
addss  0xeb5(%rip),%xmm0
mulss  0xeb1(%rip),%xmm0
addss  0xead(%rip),%xmm0
ret
movss  0xe80(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    11ae <calc_taxes+0xae>
addss  0xe83(%rip),%xmm0
mulss  0xe7f(%rip),%xmm0
addss  0xe7b(%rip),%xmm0
ret
addss  0xe5e(%rip),%xmm0
mulss  0xe5a(%rip),%xmm0
addss  0xe56(%rip),%xmm0
ret

LLVM IR (-O0):
define float @calc_taxes(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fcmp olt float %4, 7.500000e+02
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %2
%8 = fmul float %7, 0x3F847AE140000000
store float %8, float* %3
br label %45
9: ; preds = %1
%10 = load float, float* %2
%11 = fcmp olt float %10, 2.250000e+03
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load float, float* %2
%14 = fsub float %13, 7.500000e+02
%15 = call float @llvm.fmuladd.f32(float %14, float 0x3F947AE140000000, float 7.500000e+00)
store float %15, float* %3
br label %44
16: ; preds = %9
%17 = load float, float* %2
%18 = fcmp olt float %17, 3.750000e+03
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load float, float* %2
%21 = fsub float %20, 2.250000e+03
%22 = call float @llvm.fmuladd.f32(float %21, float 0x3F9EB851E0000000, float 3.750000e+01)
store float %22, float* %3
br label %43
23: ; preds = %16
%24 = load float, float* %2
%25 = fcmp olt float %24, 5.250000e+03
br i1 %25, label %26, label %30
26: ; preds = %23
%27 = load float, float* %2
%28 = fsub float %27, 3.750000e+03
%29 = call float @llvm.fmuladd.f32(float %28, float 0x3FA47AE140000000, float 8.250000e+01)
store float %29, float* %3
br label %42
30: ; preds = %23
%31 = load float, float* %2
%32 = fcmp olt float %31, 7.000000e+03
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = load float, float* %2
%35 = fsub float %34, 5.250000e+03
%36 = call float @llvm.fmuladd.f32(float %35, float 0x3FA99999A0000000, float 1.425000e+02)
store float %36, float* %3
br label %41
37: ; preds = %30
%38 = load float, float* %2
%39 = fsub float %38, 7.000000e+03
%40 = call float @llvm.fmuladd.f32(float %39, float 0x3FAEB851E0000000, float 2.300000e+02)
store float %40, float* %3
br label %41
41: ; preds = %37, %33
br label %42
42: ; preds = %41, %26
br label %43
43: ; preds = %42, %19
br label %44
44: ; preds = %43, %12
br label %45
45: ; preds = %44, %6
%46 = load float, float* %3
ret float %46
}

LLVM IR (-O2):
define float @calc_taxes(float %0) {
%2 = fcmp olt float %0, 7.500000e+02
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = fmul float %0, 0x3F847AE140000000
br label %28
5: ; preds = %1
%6 = fcmp olt float %0, 2.250000e+03
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = fadd float %0, -7.500000e+02
%9 = tail call float @llvm.fmuladd.f32(float %8, float 0x3F947AE140000000, float 7.500000e+00)
br label %28
10: ; preds = %5
%11 = fcmp olt float %0, 3.750000e+03
br i1 %11, label %12, label %15
12: ; preds = %10
%13 = fadd float %0, -2.250000e+03
%14 = tail call float @llvm.fmuladd.f32(float %13, float 0x3F9EB851E0000000, float 3.750000e+01)
br label %28
15: ; preds = %10
%16 = fcmp olt float %0, 5.250000e+03
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = fadd float %0, -3.750000e+03
%19 = tail call float @llvm.fmuladd.f32(float %18, float 0x3FA47AE140000000, float 8.250000e+01)
br label %28
20: ; preds = %15
%21 = fcmp olt float %0, 7.000000e+03
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = fadd float %0, -5.250000e+03
%24 = tail call float @llvm.fmuladd.f32(float %23, float 0x3FA99999A0000000, float 1.425000e+02)
br label %28
25: ; preds = %20
%26 = fadd float %0, -7.000000e+03
%27 = tail call float @llvm.fmuladd.f32(float %26, float 0x3FAEB851E0000000, float 2.300000e+02)
br label %28
28: ; preds = %7, %17, %25, %22, %12, %3
%29 = phi float [ %4, %3 ], [ %9, %7 ], [ %14, %12 ], [ %19, %17 ], [ %24, %22 ], [ %27, %25 ]
ret float %29
}