float av9194_getclock(int clock, void *p) {
  float ret = 0.0;
  switch (clock & 0x0f) {
  case 0:
    ret = 25175000.0;
    break;
  case 1:
    ret = 28322000.0;
    break;
  case 2:
    ret = 40000000.0;
    break;
  case 4:
    ret = 50000000.0;
    break;
  case 5:
    ret = 77000000.0;
    break;
  case 6:
    ret = 36000000.0;
    break;
  case 7:
    ret = 44900000.0;
    break;
  case 8:
    ret = 130000000.0;
    break;
  case 9:
    ret = 120000000.0;
    break;
  case 0xa:
    ret = 80000000.0;
    break;
  case 0xb:
    ret = 31500000.0;
    break;
  case 0xc:
    ret = 110000000.0;
    break;
  case 0xd:
    ret = 65000000.0;
    break;
  case 0xe:
    ret = 75000000.0;
    break;
  case 0xf:
    ret = 94500000.0;
    break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<av9194_getclock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %rax,-0x20(%rbp)
sub    $0xf,%eax
ja     1242 <av9194_getclock+0x142>
mov    -0x20(%rbp),%rax
lea    0xf0c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movss  0xef7(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xee1(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xecb(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe9f(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe89(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe73(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe5d(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe47(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe31(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe1b(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xe05(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xdef(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xdd9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1242 <av9194_getclock+0x142>
movss  0xdc3(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<av9194_getclock>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
movss  (%rax,%rdi,4),%xmm0
ret

LLVM IR (-O0):
define float @av9194_getclock(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca float
store i32 %0, i32* %3
store i8* %1, i8** %4
store float 0.000000e+00, float* %5
%6 = load i32, i32* %3
%7 = and i32 %6, 15
switch i32 %7, label %23 [
i32 0, label %8
i32 1, label %9
i32 2, label %10
i32 4, label %11
i32 5, label %12
i32 6, label %13
i32 7, label %14
i32 8, label %15
i32 9, label %16
i32 10, label %17
i32 11, label %18
i32 12, label %19
i32 13, label %20
i32 14, label %21
i32 15, label %22
]
8: ; preds = %2
store float 2.517500e+07, float* %5
br label %23
9: ; preds = %2
store float 2.832200e+07, float* %5
br label %23
10: ; preds = %2
store float 4.000000e+07, float* %5
br label %23
11: ; preds = %2
store float 5.000000e+07, float* %5
br label %23
12: ; preds = %2
store float 7.700000e+07, float* %5
br label %23
13: ; preds = %2
store float 3.600000e+07, float* %5
br label %23
14: ; preds = %2
store float 4.490000e+07, float* %5
br label %23
15: ; preds = %2
store float 1.300000e+08, float* %5
br label %23
16: ; preds = %2
store float 1.200000e+08, float* %5
br label %23
17: ; preds = %2
store float 8.000000e+07, float* %5
br label %23
18: ; preds = %2
store float 3.150000e+07, float* %5
br label %23
19: ; preds = %2
store float 1.100000e+08, float* %5
br label %23
20: ; preds = %2
store float 6.500000e+07, float* %5
br label %23
21: ; preds = %2
store float 7.500000e+07, float* %5
br label %23
22: ; preds = %2
store float 9.450000e+07, float* %5
br label %23
23: ; preds = %2, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8
%24 = load float, float* %5
ret float %24
}

LLVM IR (-O2):
@switch.table.av9194_getclock = [16 x float] [float 2.517500e+07, float 2.832200e+07, float 4.000000e+07, float 0.000000e+00, float 5.000000e+07, float 7.700000e+07, float 3.600000e+07, float 4.490000e+07, float 1.300000e+08, float 1.200000e+08, float 8.000000e+07, float 3.150000e+07, float 1.100000e+08, float 6.500000e+07, float 7.500000e+07, float 9.450000e+07]
define float @av9194_getclock(i32 %0, i8* nocapture readnone %1) {
%3 = and i32 %0, 15
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [16 x float], [16 x float]* @switch.table.av9194_getclock, i64 0, i64 %4
%6 = load float, float* %5
ret float %6
}