float MMtoDB(float mm) {
  float db;
  mm = 100. - mm;
  if (mm <= 0.) {
    db = 10.;
  } else if (mm < 48.) {
    db = 10. - 5. / 12. * mm;
  } else if (mm < 84.) {
    db = -10. - 10. / 12. * (mm - 48.);
  } else if (mm < 96.) {
    db = -40. - 20. / 12. * (mm - 84.);
  } else if (mm < 100.) {
    db = -60. - 35. * (mm - 96.);
  } else
    db = -200.;
  return db;
}


x86 assembly (clang, -O0):
<MMtoDB>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     114f <MMtoDB+0x4f>
movss  0xf1f(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    12bc <MMtoDB+0x1bc>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1199 <MMtoDB+0x99>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    12b7 <MMtoDB+0x1b7>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe66(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ef <MMtoDB+0xef>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe43(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe6f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe6b(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    12b2 <MMtoDB+0x1b2>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe18(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1245 <MMtoDB+0x145>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdf5(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe09(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe05(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    12ad <MMtoDB+0x1ad>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdaa(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    129b <MMtoDB+0x19b>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xda7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xda3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd9f(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    12a8 <MMtoDB+0x1a8>
movss  0xdbd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    12ad <MMtoDB+0x1ad>
jmp    12b2 <MMtoDB+0x1b2>
jmp    12b7 <MMtoDB+0x1b7>
jmp    12bc <MMtoDB+0x1bc>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMtoDB>:
movss  0xef8(%rip),%xmm1
movaps %xmm1,%xmm2
subss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm2,%xmm0
jae    1140 <MMtoDB+0x40>
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
movss  0xee2(%rip),%xmm3
ucomiss %xmm2,%xmm3
jbe    1149 <MMtoDB+0x49>
mulsd  0xf2d(%rip),%xmm0
addsd  0xf2d(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret
movss  0xebc(%rip),%xmm0
ret
movss  0xebb(%rip),%xmm3
ucomiss %xmm2,%xmm3
jbe    1173 <MMtoDB+0x73>
addsd  0xeea(%rip),%xmm0
mulsd  0xeea(%rip),%xmm0
addsd  0xeea(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret
movss  0xe95(%rip),%xmm3
ucomiss %xmm2,%xmm3
jbe    119d <MMtoDB+0x9d>
addsd  0xea8(%rip),%xmm0
mulsd  0xea8(%rip),%xmm0
addsd  0xea8(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret
ucomiss %xmm2,%xmm1
jbe    11bf <MMtoDB+0xbf>
addsd  0xe6e(%rip),%xmm0
mulsd  0xe6e(%rip),%xmm0
addsd  0xe6e(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret
movss  0xe4d(%rip),%xmm0
ret

LLVM IR (-O0):
define float @MMtoDB(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double 1.000000e+02, %5
%7 = fptrunc double %6 to float
store float %7, float* %2
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fcmp ole double %9, 0.000000e+00
br i1 %10, label %11, label %12
11: ; preds = %1
store float 1.000000e+01, float* %3
br label %56
12: ; preds = %1
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fcmp olt double %14, 4.800000e+01
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load float, float* %2
%18 = fpext float %17 to double
%19 = call double @llvm.fmuladd.f64(double 0xBFDAAAAAAAAAAAAB, double %18, double 1.000000e+01)
%20 = fptrunc double %19 to float
store float %20, float* %3
br label %55
21: ; preds = %12
%22 = load float, float* %2
%23 = fpext float %22 to double
%24 = fcmp olt double %23, 8.400000e+01
br i1 %24, label %25, label %31
25: ; preds = %21
%26 = load float, float* %2
%27 = fpext float %26 to double
%28 = fsub double %27, 4.800000e+01
%29 = call double @llvm.fmuladd.f64(double 0xBFEAAAAAAAAAAAAB, double %28, double -1.000000e+01)
%30 = fptrunc double %29 to float
store float %30, float* %3
br label %54
31: ; preds = %21
%32 = load float, float* %2
%33 = fpext float %32 to double
%34 = fcmp olt double %33, 9.600000e+01
br i1 %34, label %35, label %41
35: ; preds = %31
%36 = load float, float* %2
%37 = fpext float %36 to double
%38 = fsub double %37, 8.400000e+01
%39 = call double @llvm.fmuladd.f64(double 0xBFFAAAAAAAAAAAAB, double %38, double -4.000000e+01)
%40 = fptrunc double %39 to float
store float %40, float* %3
br label %53
41: ; preds = %31
%42 = load float, float* %2
%43 = fpext float %42 to double
%44 = fcmp olt double %43, 1.000000e+02
br i1 %44, label %45, label %51
45: ; preds = %41
%46 = load float, float* %2
%47 = fpext float %46 to double
%48 = fsub double %47, 9.600000e+01
%49 = call double @llvm.fmuladd.f64(double -3.500000e+01, double %48, double -6.000000e+01)
%50 = fptrunc double %49 to float
store float %50, float* %3
br label %52
51: ; preds = %41
store float -2.000000e+02, float* %3
br label %52
52: ; preds = %51, %45
br label %53
53: ; preds = %52, %35
br label %54
54: ; preds = %53, %25
br label %55
55: ; preds = %54, %16
br label %56
56: ; preds = %55, %11
%57 = load float, float* %3
ret float %57
}

LLVM IR (-O2):
define float @MMtoDB(float %0) {
%2 = fsub float 1.000000e+02, %0
%3 = fpext float %2 to double
%4 = fcmp ugt float %2, 0.000000e+00
br i1 %4, label %5, label %28
5: ; preds = %1
%6 = fcmp olt float %2, 4.800000e+01
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = tail call double @llvm.fmuladd.f64(double %3, double 0xBFDAAAAAAAAAAAAB, double 1.000000e+01)
%9 = fptrunc double %8 to float
br label %28
10: ; preds = %5
%11 = fcmp olt float %2, 8.400000e+01
br i1 %11, label %12, label %16
12: ; preds = %10
%13 = fadd double %3, -4.800000e+01
%14 = tail call double @llvm.fmuladd.f64(double %13, double 0xBFEAAAAAAAAAAAAB, double -1.000000e+01)
%15 = fptrunc double %14 to float
br label %28
16: ; preds = %10
%17 = fcmp olt float %2, 9.600000e+01
br i1 %17, label %18, label %22
18: ; preds = %16
%19 = fadd double %3, -8.400000e+01
%20 = tail call double @llvm.fmuladd.f64(double %19, double 0xBFFAAAAAAAAAAAAB, double -4.000000e+01)
%21 = fptrunc double %20 to float
br label %28
22: ; preds = %16
%23 = fcmp olt float %2, 1.000000e+02
br i1 %23, label %24, label %28
24: ; preds = %22
%25 = fadd double %3, -9.600000e+01
%26 = tail call double @llvm.fmuladd.f64(double %25, double -3.500000e+01, double -6.000000e+01)
%27 = fptrunc double %26 to float
br label %28
28: ; preds = %22, %1, %7, %18, %24, %12
%29 = phi float [ %9, %7 ], [ %15, %12 ], [ %21, %18 ], [ %27, %24 ], [ 1.000000e+01, %1 ], [ -2.000000e+02, %22 ]
ret float %29
}