double CalculateTaxDue(double taxableIncome) {
  if (taxableIncome < 0.0) {
    return 0.0;
  }
  double taxdue = 0.0;
  if (taxableIncome < 750.0) {
    taxdue = taxableIncome * 0.01;
  } else if (taxableIncome < 2250.0) {
    taxdue = 7.5 + taxableIncome * 0.02;
  } else if (taxableIncome < 3750.0) {
    taxdue = 37.5 + taxableIncome * 0.03;
  } else if (taxableIncome < 5250.0) {
    taxdue = 82.5 + taxableIncome * 0.04;
  } else if (taxableIncome < 7000.0) {
    taxdue = 142.5 + taxableIncome * 0.05;
  } else {
    taxdue = 230.0 + taxableIncome * 0.06;
  }
  return taxdue;
}


x86 assembly (clang, -O0):
<CalculateTaxDue>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1124 <CalculateTaxDue+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    127e <CalculateTaxDue+0x17e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xecc(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1156 <CalculateTaxDue+0x56>
movsd  0xf31(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1274 <CalculateTaxDue+0x174>
movsd  0xeaa(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1190 <CalculateTaxDue+0x90>
movsd  -0x10(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeee(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    126f <CalculateTaxDue+0x16f>
movsd  0xe78(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11ca <CalculateTaxDue+0xca>
movsd  -0x10(%rbp),%xmm0
movsd  0xea8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    126a <CalculateTaxDue+0x16a>
movsd  0xe46(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1204 <CalculateTaxDue+0x104>
movsd  -0x10(%rbp),%xmm0
movsd  0xe5e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe5a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1265 <CalculateTaxDue+0x165>
movsd  0xe14(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    123e <CalculateTaxDue+0x13e>
movsd  -0x10(%rbp),%xmm0
movsd  0xe14(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe10(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1260 <CalculateTaxDue+0x160>
movsd  -0x10(%rbp),%xmm0
movsd  0xddd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1265 <CalculateTaxDue+0x165>
jmp    126a <CalculateTaxDue+0x16a>
jmp    126f <CalculateTaxDue+0x16f>
jmp    1274 <CalculateTaxDue+0x174>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalculateTaxDue>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1124 <CalculateTaxDue+0x24>
movsd  0xeee(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1129 <CalculateTaxDue+0x29>
mulsd  0xf58(%rip),%xmm0
movapd %xmm0,%xmm1
movapd %xmm1,%xmm0
ret
movsd  0xed7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1148 <CalculateTaxDue+0x48>
mulsd  0xf29(%rip),%xmm0
addsd  0xf29(%rip),%xmm0
ret
movsd  0xec0(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1167 <CalculateTaxDue+0x67>
mulsd  0xefa(%rip),%xmm0
addsd  0xefa(%rip),%xmm0
ret
movsd  0xea9(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1186 <CalculateTaxDue+0x86>
mulsd  0xecb(%rip),%xmm0
addsd  0xecb(%rip),%xmm0
ret
movsd  0xe92(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    11a5 <CalculateTaxDue+0xa5>
mulsd  0xe9c(%rip),%xmm0
addsd  0xe9c(%rip),%xmm0
ret
mulsd  0xe7b(%rip),%xmm0
addsd  0xe7b(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @CalculateTaxDue(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %25, label %3
3: ; preds = %1
%4 = fcmp olt double %0, 7.500000e+02
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = fmul double %0, 1.000000e-02
br label %25
7: ; preds = %3
%8 = fcmp olt double %0, 2.250000e+03
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e-02, double 7.500000e+00)
br label %25
11: ; preds = %7
%12 = fcmp olt double %0, 3.750000e+03
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = tail call double @llvm.fmuladd.f64(double %0, double 3.000000e-02, double 3.750000e+01)
br label %25
15: ; preds = %11
%16 = fcmp olt double %0, 5.250000e+03
br i1 %16, label %17, label %19
17: ; preds = %15
%18 = tail call double @llvm.fmuladd.f64(double %0, double 4.000000e-02, double 8.250000e+01)
br label %25
19: ; preds = %15
%20 = fcmp olt double %0, 7.000000e+03
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = tail call double @llvm.fmuladd.f64(double %0, double 5.000000e-02, double 1.425000e+02)
br label %25
23: ; preds = %19
%24 = tail call double @llvm.fmuladd.f64(double %0, double 6.000000e-02, double 2.300000e+02)
br label %25
25: ; preds = %5, %13, %21, %23, %17, %9, %1
%26 = phi double [ 0.000000e+00, %1 ], [ %6, %5 ], [ %10, %9 ], [ %14, %13 ], [ %18, %17 ], [ %22, %21 ], [ %24, %23 ]
ret double %26
}