int getSignalCode(int signType) {
  int _freq, _code;
  switch (signType) {
  case 0:
    _code = 1;
    _freq = 0;
    break;
  case 1:
    _code = 3;
    _freq = 0;
    break;
  case 2:
    _code = 20;
    _freq = 1;
    break;
  case 3:
    _code = 17;
    _freq = 1;
    break;
  case 4:
    _code = 25;
    _freq = 2;
    break;
  case 8:
    _code = 1;
    _freq = 0;
    break;
  case 9:
    _code = 2;
    _freq = 0;
    break;
  case 10:
    _code = 19;
    _freq = 1;
    break;
  case 11:
    _code = 14;
    _freq = 1;
    break;
  case 16:
    _code = 10;
    _freq = 0;
    break;
  case 17:
    _code = 1;
    _freq = 0;
    break;
  case 18:
    _code = 30;
    _freq = 3;
    break;
  case 19:
    _code = 33;
    _freq = 3;
    break;
  case 20:
    _code = 25;
    _freq = 4;
    break;
  case 21:
    _code = 28;
    _freq = 4;
    break;
  case 22:
    _code = 38;
    _freq = 4;
    break;
  case 24:
    _code = 1;
    _freq = 0;
    break;
  default:
    _code = 1;
    _freq = 0;
    break;
  }
  return _code;
}


x86 assembly (clang, -O0):
<getSignalCode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x18,%rax
ja     126f <getSignalCode+0x16f>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x3,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x14,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x11,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x19,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x13,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0xe,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0xa,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x1e,-0xc(%rbp)
movl   $0x3,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x21,-0xc(%rbp)
movl   $0x3,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x19,-0xc(%rbp)
movl   $0x4,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x1c,-0xc(%rbp)
movl   $0x4,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x26,-0xc(%rbp)
movl   $0x4,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    127d <getSignalCode+0x17d>
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSignalCode>:
add    $0xffffffff,%edi
mov    $0x1,%eax
cmp    $0x15,%edi
ja     111a <getSignalCode+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @getSignalCode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
switch i32 %5, label %23 [
i32 0, label %6
i32 1, label %7
i32 2, label %8
i32 3, label %9
i32 4, label %10
i32 8, label %11
i32 9, label %12
i32 10, label %13
i32 11, label %14
i32 16, label %15
i32 17, label %16
i32 18, label %17
i32 19, label %18
i32 20, label %19
i32 21, label %20
i32 22, label %21
i32 24, label %22
]
6: ; preds = %1
store i32 1, i32* %4
store i32 0, i32* %3
br label %24
7: ; preds = %1
store i32 3, i32* %4
store i32 0, i32* %3
br label %24
8: ; preds = %1
store i32 20, i32* %4
store i32 1, i32* %3
br label %24
9: ; preds = %1
store i32 17, i32* %4
store i32 1, i32* %3
br label %24
10: ; preds = %1
store i32 25, i32* %4
store i32 2, i32* %3
br label %24
11: ; preds = %1
store i32 1, i32* %4
store i32 0, i32* %3
br label %24
12: ; preds = %1
store i32 2, i32* %4
store i32 0, i32* %3
br label %24
13: ; preds = %1
store i32 19, i32* %4
store i32 1, i32* %3
br label %24
14: ; preds = %1
store i32 14, i32* %4
store i32 1, i32* %3
br label %24
15: ; preds = %1
store i32 10, i32* %4
store i32 0, i32* %3
br label %24
16: ; preds = %1
store i32 1, i32* %4
store i32 0, i32* %3
br label %24
17: ; preds = %1
store i32 30, i32* %4
store i32 3, i32* %3
br label %24
18: ; preds = %1
store i32 33, i32* %4
store i32 3, i32* %3
br label %24
19: ; preds = %1
store i32 25, i32* %4
store i32 4, i32* %3
br label %24
20: ; preds = %1
store i32 28, i32* %4
store i32 4, i32* %3
br label %24
21: ; preds = %1
store i32 38, i32* %4
store i32 4, i32* %3
br label %24
22: ; preds = %1
store i32 1, i32* %4
store i32 0, i32* %3
br label %24
23: ; preds = %1
store i32 1, i32* %4
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
@switch.table.getSignalCode = [22 x i32] [i32 3, i32 20, i32 17, i32 25, i32 1, i32 1, i32 1, i32 1, i32 2, i32 19, i32 14, i32 1, i32 1, i32 1, i32 1, i32 10, i32 1, i32 30, i32 33, i32 25, i32 28, i32 38]
define i32 @getSignalCode(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 22
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [22 x i32], [22 x i32]* @switch.table.getSignalCode, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}