int getFrequencyFromChannel(int channel) {
  static int frequencies[] = {
      -1,   2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462,
      2467, 2472, 2484, -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
      -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   5170, 5175,
      5180, 5185, 5190, 5195, 5200, 5205, 5210, 5215, 5220, 5225, 5230, 5235,
      5240, 5245, 5250, 5255, 5260, 5265, 5270, 5275, 5280, 5285, 5290, 5295,
      5300, 5305, 5310, 5315, 5320, 5325, 5330, 5335, 5340, 5345, 5350, 5355,
      5360, 5365, 5370, 5375, 5380, 5385, 5390, 5395, 5400, 5405, 5410, 5415,
      5420, 5425, 5430, 5435, 5440, 5445, 5450, 5455, 5460, 5465, 5470, 5475,
      5480, 5485, 5490, 5495, 5500, 5505, 5510, 5515, 5520, 5525, 5530, 5535,
      5540, 5545, 5550, 5555, 5560, 5565, 5570, 5575, 5580, 5585, 5590, 5595,
      5600, 5605, 5610, 5615, 5620, 5625, 5630, 5635, 5640, 5645, 5650, 5655,
      5660, 5665, 5670, 5675, 5680, 5685, 5690, 5695, 5700, 5705, 5710, 5715,
      5720, 5725, 5730, 5735, 5740, 5745, 5750, 5755, 5760, 5765, 5770, 5775,
      5780, 5785, 5790, 5795, 5800, 5805, 5810, 5815, 5820, 5825, 5830, 5835,
      5840, 5845, 5850, 5855, 5860, 5865, 5870, 5875, 5880, 5885, 5890, 5895,
      5900, 5905, 5910, 5915, 5920, 5925, 5930, 5935, 5940, 5945, 5950, 5955,
      5960, 5965, 5970, 5975, 5980, 5985, 5990, 5995, 6000, 6005, 6010, 6015,
      6020, 6025, 6030, 6035, 6040, 6045, 6050, 6055, 6060, 6065, 6070, 6075,
      6080, 6085, 6090, 6095, 6100};
  return (channel > 0 && channel <= 221) ? frequencies[channel] : -1;
}


x86 assembly (clang, -O0):
<getFrequencyFromChannel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1134 <getFrequencyFromChannel+0x34>
cmpl   $0xdd,-0x4(%rbp)
jg     1134 <getFrequencyFromChannel+0x34>
movslq -0x4(%rbp),%rcx
lea    0x2f07(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <getFrequencyFromChannel+0x41>
mov    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <getFrequencyFromChannel+0x41>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFrequencyFromChannel>:
lea    -0x1(%rdi),%ecx
mov    $0xffffffff,%eax
cmp    $0xdc,%ecx
ja     111c <getFrequencyFromChannel+0x1c>
mov    %edi,%eax
lea    0xee7(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@getFrequencyFromChannel.frequencies = internal global [221 x i32] [i32 -1, i32 2412, i32 2417, i32 2422, i32 2427, i32 2432, i32 2437, i32 2442, i32 2447, i32 2452, i32 2457, i32 2462, i32 2467, i32 2472, i32 2484, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 5170, i32 5175, i32 5180, i32 5185, i32 5190, i32 5195, i32 5200, i32 5205, i32 5210, i32 5215, i32 5220, i32 5225, i32 5230, i32 5235, i32 5240, i32 5245, i32 5250, i32 5255, i32 5260, i32 5265, i32 5270, i32 5275, i32 5280, i32 5285, i32 5290, i32 5295, i32 5300, i32 5305, i32 5310, i32 5315, i32 5320, i32 5325, i32 5330, i32 5335, i32 5340, i32 5345, i32 5350, i32 5355, i32 5360, i32 5365, i32 5370, i32 5375, i32 5380, i32 5385, i32 5390, i32 5395, i32 5400, i32 5405, i32 5410, i32 5415, i32 5420, i32 5425, i32 5430, i32 5435, i32 5440, i32 5445, i32 5450, i32 5455, i32 5460, i32 5465, i32 5470, i32 5475, i32 5480, i32 5485, i32 5490, i32 5495, i32 5500, i32 5505, i32 5510, i32 5515, i32 5520, i32 5525, i32 5530, i32 5535, i32 5540, i32 5545, i32 5550, i32 5555, i32 5560, i32 5565, i32 5570, i32 5575, i32 5580, i32 5585, i32 5590, i32 5595, i32 5600, i32 5605, i32 5610, i32 5615, i32 5620, i32 5625, i32 5630, i32 5635, i32 5640, i32 5645, i32 5650, i32 5655, i32 5660, i32 5665, i32 5670, i32 5675, i32 5680, i32 5685, i32 5690, i32 5695, i32 5700, i32 5705, i32 5710, i32 5715, i32 5720, i32 5725, i32 5730, i32 5735, i32 5740, i32 5745, i32 5750, i32 5755, i32 5760, i32 5765, i32 5770, i32 5775, i32 5780, i32 5785, i32 5790, i32 5795, i32 5800, i32 5805, i32 5810, i32 5815, i32 5820, i32 5825, i32 5830, i32 5835, i32 5840, i32 5845, i32 5850, i32 5855, i32 5860, i32 5865, i32 5870, i32 5875, i32 5880, i32 5885, i32 5890, i32 5895, i32 5900, i32 5905, i32 5910, i32 5915, i32 5920, i32 5925, i32 5930, i32 5935, i32 5940, i32 5945, i32 5950, i32 5955, i32 5960, i32 5965, i32 5970, i32 5975, i32 5980, i32 5985, i32 5990, i32 5995, i32 6000, i32 6005, i32 6010, i32 6015, i32 6020, i32 6025, i32 6030, i32 6035, i32 6040, i32 6045, i32 6050, i32 6055, i32 6060, i32 6065, i32 6070, i32 6075, i32 6080, i32 6085, i32 6090, i32 6095, i32 6100]
define i32 @getFrequencyFromChannel(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 221
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [221 x i32], [221 x i32]* @getFrequencyFromChannel.frequencies, i64 0, i64 %10
%12 = load i32, i32* %11
br label %14
13: ; preds = %5, %1
br label %14
14: ; preds = %13, %8
%15 = phi i32 [ %12, %8 ], [ -1, %13 ]
ret i32 %15
}

LLVM IR (-O2):
@getFrequencyFromChannel.frequencies = internal unnamed_addr constant [221 x i32] [i32 -1, i32 2412, i32 2417, i32 2422, i32 2427, i32 2432, i32 2437, i32 2442, i32 2447, i32 2452, i32 2457, i32 2462, i32 2467, i32 2472, i32 2484, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 5170, i32 5175, i32 5180, i32 5185, i32 5190, i32 5195, i32 5200, i32 5205, i32 5210, i32 5215, i32 5220, i32 5225, i32 5230, i32 5235, i32 5240, i32 5245, i32 5250, i32 5255, i32 5260, i32 5265, i32 5270, i32 5275, i32 5280, i32 5285, i32 5290, i32 5295, i32 5300, i32 5305, i32 5310, i32 5315, i32 5320, i32 5325, i32 5330, i32 5335, i32 5340, i32 5345, i32 5350, i32 5355, i32 5360, i32 5365, i32 5370, i32 5375, i32 5380, i32 5385, i32 5390, i32 5395, i32 5400, i32 5405, i32 5410, i32 5415, i32 5420, i32 5425, i32 5430, i32 5435, i32 5440, i32 5445, i32 5450, i32 5455, i32 5460, i32 5465, i32 5470, i32 5475, i32 5480, i32 5485, i32 5490, i32 5495, i32 5500, i32 5505, i32 5510, i32 5515, i32 5520, i32 5525, i32 5530, i32 5535, i32 5540, i32 5545, i32 5550, i32 5555, i32 5560, i32 5565, i32 5570, i32 5575, i32 5580, i32 5585, i32 5590, i32 5595, i32 5600, i32 5605, i32 5610, i32 5615, i32 5620, i32 5625, i32 5630, i32 5635, i32 5640, i32 5645, i32 5650, i32 5655, i32 5660, i32 5665, i32 5670, i32 5675, i32 5680, i32 5685, i32 5690, i32 5695, i32 5700, i32 5705, i32 5710, i32 5715, i32 5720, i32 5725, i32 5730, i32 5735, i32 5740, i32 5745, i32 5750, i32 5755, i32 5760, i32 5765, i32 5770, i32 5775, i32 5780, i32 5785, i32 5790, i32 5795, i32 5800, i32 5805, i32 5810, i32 5815, i32 5820, i32 5825, i32 5830, i32 5835, i32 5840, i32 5845, i32 5850, i32 5855, i32 5860, i32 5865, i32 5870, i32 5875, i32 5880, i32 5885, i32 5890, i32 5895, i32 5900, i32 5905, i32 5910, i32 5915, i32 5920, i32 5925, i32 5930, i32 5935, i32 5940, i32 5945, i32 5950, i32 5955, i32 5960, i32 5965, i32 5970, i32 5975, i32 5980, i32 5985, i32 5990, i32 5995, i32 6000, i32 6005, i32 6010, i32 6015, i32 6020, i32 6025, i32 6030, i32 6035, i32 6040, i32 6045, i32 6050, i32 6055, i32 6060, i32 6065, i32 6070, i32 6075, i32 6080, i32 6085, i32 6090, i32 6095, i32 6100]
define i32 @getFrequencyFromChannel(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 221
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = zext i32 %0 to i64
%6 = getelementptr inbounds [221 x i32], [221 x i32]* @getFrequencyFromChannel.frequencies, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}