float Mepg1AspectRatio(unsigned char code) {
  switch (code & 0x0f) {
  case 1:
    return 1.0;
  case 2:
    return (float)0.6735;
  case 3:
    return (float)0.7031;
  case 4:
    return (float)0.7615;
  case 5:
    return (float)0.8055;
  case 6:
    return (float)0.8437;
  case 7:
    return (float)0.8935;
  case 8:
    return (float)0.9157;
  case 9:
    return (float)0.9815;
  case 10:
    return (float)1.0255;
  case 11:
    return (float)1.0695;
  case 12:
    return (float)1.0950;
  case 13:
    return (float)1.1575;
  case 14:
    return (float)1.2015;
  default:
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Mepg1AspectRatio>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
and    $0xf,%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xd,%eax
ja     1233 <Mepg1AspectRatio+0x133>
mov    -0x10(%rbp),%rax
lea    0xf0a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movss  0xef5(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xedf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xeb3(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe9d(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe87(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe71(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe5b(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe45(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe2f(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe19(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xe03(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xded(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
movss  0xdd7(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    123b <Mepg1AspectRatio+0x13b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mepg1AspectRatio>:
and    $0xf,%edi
add    $0xffffffff,%edi
xorps  %xmm0,%xmm0
cmp    $0xd,%edi
ja     111d <Mepg1AspectRatio+0x1d>
movslq %edi,%rax
lea    0xee8(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @Mepg1AspectRatio(i8 zeroext %0) {
%2 = alloca float
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 15
switch i32 %6, label %21 [
i32 1, label %7
i32 2, label %8
i32 3, label %9
i32 4, label %10
i32 5, label %11
i32 6, label %12
i32 7, label %13
i32 8, label %14
i32 9, label %15
i32 10, label %16
i32 11, label %17
i32 12, label %18
i32 13, label %19
i32 14, label %20
]
7: ; preds = %1
store float 1.000000e+00, float* %2
br label %22
8: ; preds = %1
store float 0x3FE58D4FE0000000, float* %2
br label %22
9: ; preds = %1
store float 0x3FE67FCBA0000000, float* %2
br label %22
10: ; preds = %1
store float 0x3FE85E3540000000, float* %2
br label %22
11: ; preds = %1
store float 0x3FE9C6A7E0000000, float* %2
br label %22
12: ; preds = %1
store float 0x3FEAFF9720000000, float* %2
br label %22
13: ; preds = %1
store float 0x3FEC978D40000000, float* %2
br label %22
14: ; preds = %1
store float 0x3FED4D6A20000000, float* %2
br label %22
15: ; preds = %1
store float 0x3FEF6872C0000000, float* %2
br label %22
16: ; preds = %1
store float 0x3FF06872C0000000, float* %2
br label %22
17: ; preds = %1
store float 0x3FF11CAC00000000, float* %2
br label %22
18: ; preds = %1
store float 0x3FF1851EC0000000, float* %2
br label %22
19: ; preds = %1
store float 0x3FF2851EC0000000, float* %2
br label %22
20: ; preds = %1
store float 0x3FF3395820000000, float* %2
br label %22
21: ; preds = %1
store float 0.000000e+00, float* %2
br label %22
22: ; preds = %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7
%23 = load float, float* %2
ret float %23
}

LLVM IR (-O2):
@switch.table.Mepg1AspectRatio = [14 x float] [float 1.000000e+00, float 0x3FE58D4FE0000000, float 0x3FE67FCBA0000000, float 0x3FE85E3540000000, float 0x3FE9C6A7E0000000, float 0x3FEAFF9720000000, float 0x3FEC978D40000000, float 0x3FED4D6A20000000, float 0x3FEF6872C0000000, float 0x3FF06872C0000000, float 0x3FF11CAC00000000, float 0x3FF1851EC0000000, float 0x3FF2851EC0000000, float 0x3FF3395820000000]
define float @Mepg1AspectRatio(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = zext i8 %2 to i32
%4 = add nsw i32 %3, -1
%5 = icmp ult i32 %4, 14
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [14 x float], [14 x float]* @switch.table.Mepg1AspectRatio, i64 0, i64 %7
%9 = load float, float* %8
br label %10
10: ; preds = %1, %6
%11 = phi float [ %9, %6 ], [ 0.000000e+00, %1 ]
ret float %11
}