#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ sscanf(char const *, char *, int *);
float plToneStr(const char *plHex) {
  float hz;
  int hexHz;
  sscanf(plHex, "%2X", &hexHz);
  switch (hexHz) {
  case 0x01:
    hz = 67.0;
    break;
  case 0x02:
    hz = 69.3;
    break;
  case 0x03:
    hz = 71.9;
    break;
  case 0x04:
    hz = 74.4;
    break;
  case 0x05:
    hz = 77.0;
    break;
  case 0x06:
    hz = 79.7;
    break;
  case 0x07:
    hz = 82.5;
    break;
  case 0x08:
    hz = 85.4;
    break;
  case 0x09:
    hz = 88.5;
    break;
  case 0x0a:
    hz = 91.5;
    break;
  case 0x0b:
    hz = 94.8;
    break;
  case 0x0c:
    hz = 97.4;
    break;
  case 0x0d:
    hz = 100.0;
    break;
  case 0x0e:
    hz = 103.5;
    break;
  case 0x0f:
    hz = 107.2;
    break;
  case 0x10:
    hz = 110.9;
    break;
  case 0x11:
    hz = 114.8;
    break;
  case 0x12:
    hz = 118.8;
    break;
  case 0x13:
    hz = 123.0;
    break;
  case 0x14:
    hz = 127.3;
    break;
  case 0x15:
    hz = 131.8;
    break;
  case 0x16:
    hz = 136.5;
    break;
  case 0x17:
    hz = 141.3;
    break;
  case 0x18:
    hz = 146.2;
    break;
  case 0x19:
    hz = 151.4;
    break;
  case 0x1a:
    hz = 156.7;
    break;
  case 0x1b:
    hz = 159.8;
    break;
  case 0x1c:
    hz = 162.2;
    break;
  case 0x1d:
    hz = 165.5;
    break;
  case 0x1e:
    hz = 167.9;
    break;
  case 0x1f:
    hz = 171.3;
    break;
  case 0x20:
    hz = 173.8;
    break;
  case 0x21:
    hz = 177.3;
    break;
  case 0x22:
    hz = 179.9;
    break;
  case 0x23:
    hz = 183.5;
    break;
  case 0x24:
    hz = 186.2;
    break;
  case 0x25:
    hz = 189.9;
    break;
  case 0x26:
    hz = 192.8;
    break;
  case 0x27:
    hz = 196.6;
    break;
  case 0x28:
    hz = 199.5;
    break;
  case 0x29:
    hz = 203.5;
    break;
  case 0x2a:
    hz = 206.5;
    break;
  case 0x2b:
    hz = 210.7;
    break;
  case 0x2c:
    hz = 218.1;
    break;
  case 0x2d:
    hz = 225.7;
    break;
  case 0x2e:
    hz = 229.1;
    break;
  case 0x2f:
    hz = 233.6;
    break;
  case 0x30:
    hz = 241.8;
    break;
  case 0x31:
    hz = 250.3;
    break;
  case 0x32:
    hz = 254.1;
    break;
  case 0x33:
    hz = 1750.0;
    break;
  default:
    hz = 0;
    break;
  }
  return hz;
}


x86 assembly (clang, -O0):
<plToneStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x1071(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x32,%eax
ja     14ef <plToneStr+0x3df>
mov    -0x18(%rbp),%rax
lea    0xf7c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movss  0xf67(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xf51(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xf3b(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xf25(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xf0f(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xef9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xee3(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xeb7(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xea1(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xe8b(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xe75(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xe5f(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xe49(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xe33(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xe1d(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xe07(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xdf1(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xddb(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xdc5(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xdaf(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xd99(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xd83(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xd6d(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xd57(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xd41(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xd2b(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xd15(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xcff(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xce9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xcd3(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xcbd(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xca7(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xc91(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xc7b(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xc65(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xc4f(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xc39(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xc23(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xc0d(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xbf7(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xbe1(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xbcb(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xbb5(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xb9f(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xb89(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xb73(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xb5d(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xb47(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xb31(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
movss  0xb1b(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    14f7 <plToneStr+0x3e7>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plToneStr>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cmp    $0x32,%eax
ja     113f <plToneStr+0x2f>
cltq
lea    0xeca(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%2X\00"
define float @plToneStr(i8* %0) {
%2 = alloca i8*
%3 = alloca float
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%7 = load i32, i32* %4
switch i32 %7, label %59 [
i32 1, label %8
i32 2, label %9
i32 3, 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
i32 16, label %23
i32 17, label %24
i32 18, label %25
i32 19, label %26
i32 20, label %27
i32 21, label %28
i32 22, label %29
i32 23, label %30
i32 24, label %31
i32 25, label %32
i32 26, label %33
i32 27, label %34
i32 28, label %35
i32 29, label %36
i32 30, label %37
i32 31, label %38
i32 32, label %39
i32 33, label %40
i32 34, label %41
i32 35, label %42
i32 36, label %43
i32 37, label %44
i32 38, label %45
i32 39, label %46
i32 40, label %47
i32 41, label %48
i32 42, label %49
i32 43, label %50
i32 44, label %51
i32 45, label %52
i32 46, label %53
i32 47, label %54
i32 48, label %55
i32 49, label %56
i32 50, label %57
i32 51, label %58
]
8: ; preds = %1
store float 6.700000e+01, float* %3
br label %60
9: ; preds = %1
store float 0x4051533340000000, float* %3
br label %60
10: ; preds = %1
store float 0x4051F999A0000000, float* %3
br label %60
11: ; preds = %1
store float 0x40529999A0000000, float* %3
br label %60
12: ; preds = %1
store float 7.700000e+01, float* %3
br label %60
13: ; preds = %1
store float 0x4053ECCCC0000000, float* %3
br label %60
14: ; preds = %1
store float 8.250000e+01, float* %3
br label %60
15: ; preds = %1
store float 0x40555999A0000000, float* %3
br label %60
16: ; preds = %1
store float 8.850000e+01, float* %3
br label %60
17: ; preds = %1
store float 9.150000e+01, float* %3
br label %60
18: ; preds = %1
store float 0x4057B33340000000, float* %3
br label %60
19: ; preds = %1
store float 0x40585999A0000000, float* %3
br label %60
20: ; preds = %1
store float 1.000000e+02, float* %3
br label %60
21: ; preds = %1
store float 1.035000e+02, float* %3
br label %60
22: ; preds = %1
store float 0x405ACCCCC0000000, float* %3
br label %60
23: ; preds = %1
store float 0x405BB999A0000000, float* %3
br label %60
24: ; preds = %1
store float 0x405CB33340000000, float* %3
br label %60
25: ; preds = %1
store float 0x405DB33340000000, float* %3
br label %60
26: ; preds = %1
store float 1.230000e+02, float* %3
br label %60
27: ; preds = %1
store float 0x405FD33340000000, float* %3
br label %60
28: ; preds = %1
store float 0x40607999A0000000, float* %3
br label %60
29: ; preds = %1
store float 1.365000e+02, float* %3
br label %60
30: ; preds = %1
store float 0x4061A999A0000000, float* %3
br label %60
31: ; preds = %1
store float 0x4062466660000000, float* %3
br label %60
32: ; preds = %1
store float 0x4062ECCCC0000000, float* %3
br label %60
33: ; preds = %1
store float 0x4063966660000000, float* %3
br label %60
34: ; preds = %1
store float 0x4063F999A0000000, float* %3
br label %60
35: ; preds = %1
store float 0x4064466660000000, float* %3
br label %60
36: ; preds = %1
store float 1.655000e+02, float* %3
br label %60
37: ; preds = %1
store float 0x4064FCCCC0000000, float* %3
br label %60
38: ; preds = %1
store float 0x40656999A0000000, float* %3
br label %60
39: ; preds = %1
store float 0x4065B999A0000000, float* %3
br label %60
40: ; preds = %1
store float 0x40662999A0000000, float* %3
br label %60
41: ; preds = %1
store float 0x40667CCCC0000000, float* %3
br label %60
42: ; preds = %1
store float 1.835000e+02, float* %3
br label %60
43: ; preds = %1
store float 0x4067466660000000, float* %3
br label %60
44: ; preds = %1
store float 0x4067BCCCC0000000, float* %3
br label %60
45: ; preds = %1
store float 0x40681999A0000000, float* %3
br label %60
46: ; preds = %1
store float 0x4068933340000000, float* %3
br label %60
47: ; preds = %1
store float 1.995000e+02, float* %3
br label %60
48: ; preds = %1
store float 2.035000e+02, float* %3
br label %60
49: ; preds = %1
store float 2.065000e+02, float* %3
br label %60
50: ; preds = %1
store float 0x406A566660000000, float* %3
br label %60
51: ; preds = %1
store float 0x406B433340000000, float* %3
br label %60
52: ; preds = %1
store float 0x406C366660000000, float* %3
br label %60
53: ; preds = %1
store float 0x406CA33340000000, float* %3
br label %60
54: ; preds = %1
store float 0x406D333340000000, float* %3
br label %60
55: ; preds = %1
store float 0x406E3999A0000000, float* %3
br label %60
56: ; preds = %1
store float 0x406F4999A0000000, float* %3
br label %60
57: ; preds = %1
store float 0x406FC33340000000, float* %3
br label %60
58: ; preds = %1
store float 1.750000e+03, float* %3
br label %60
59: ; preds = %1
store float 0.000000e+00, float* %3
br label %60
60: ; preds = %59, %58, %57, %56, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8
%61 = load float, float* %3
ret float %61
}

LLVM IR (-O2):
@.str = [4 x i8] c"%2X\00"
@switch.table.plToneStr = [51 x float] [float 6.700000e+01, float 0x4051533340000000, float 0x4051F999A0000000, float 0x40529999A0000000, float 7.700000e+01, float 0x4053ECCCC0000000, float 8.250000e+01, float 0x40555999A0000000, float 8.850000e+01, float 9.150000e+01, float 0x4057B33340000000, float 0x40585999A0000000, float 1.000000e+02, float 1.035000e+02, float 0x405ACCCCC0000000, float 0x405BB999A0000000, float 0x405CB33340000000, float 0x405DB33340000000, float 1.230000e+02, float 0x405FD33340000000, float 0x40607999A0000000, float 1.365000e+02, float 0x4061A999A0000000, float 0x4062466660000000, float 0x4062ECCCC0000000, float 0x4063966660000000, float 0x4063F999A0000000, float 0x4064466660000000, float 1.655000e+02, float 0x4064FCCCC0000000, float 0x40656999A0000000, float 0x4065B999A0000000, float 0x40662999A0000000, float 0x40667CCCC0000000, float 1.835000e+02, float 0x4067466660000000, float 0x4067BCCCC0000000, float 0x40681999A0000000, float 0x4068933340000000, float 1.995000e+02, float 2.035000e+02, float 2.065000e+02, float 0x406A566660000000, float 0x406B433340000000, float 0x406C366660000000, float 0x406CA33340000000, float 0x406D333340000000, float 0x406E3999A0000000, float 0x406F4999A0000000, float 0x406FC33340000000, float 1.750000e+03]
define float @plToneStr(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = add i32 %5, -1
%7 = icmp ult i32 %6, 51
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = sext i32 %6 to i64
%10 = getelementptr inbounds [51 x float], [51 x float]* @switch.table.plToneStr, i64 0, i64 %9
%11 = load float, float* %10
br label %12
12: ; preds = %1, %8
%13 = phi float [ %11, %8 ], [ 0.000000e+00, %1 ]
ret float %13
}