char *usb_vid_get(int vid) {
  switch (vid) {
  case 0x18D1:
    return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Google");
  case 0x0bb4:
    return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! HTC");
  case 0x22b8:
    return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Motorola");
  case 0x04e8:
    return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Samsung");
  case 0xfff6:
    return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Other/Samsung?");
  case 0x0fce:
    return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Sony");
  case 0xfff5:
    return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LGE");
  case 0x1d6b:
    return ("Linux");
  case 0x05c6:
    return ("Qualcomm");
  case 0x1519:
    return ("Comneon");
  case 0x0835:
    return ("Action Star");
  }
  return ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  Unknown VID");
}


x86 assembly (clang, -O0):
<usb_vid_get>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x4e8,%eax
je     120b <usb_vid_get+0x10b>
jmp    111d <usb_vid_get+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x5c6,%eax
je     125b <usb_vid_get+0x15b>
jmp    1130 <usb_vid_get+0x30>
mov    -0x10(%rbp),%eax
sub    $0x835,%eax
je     127b <usb_vid_get+0x17b>
jmp    1143 <usb_vid_get+0x43>
mov    -0x10(%rbp),%eax
sub    $0xbb4,%eax
je     11eb <usb_vid_get+0xeb>
jmp    1156 <usb_vid_get+0x56>
mov    -0x10(%rbp),%eax
sub    $0xfce,%eax
je     122b <usb_vid_get+0x12b>
jmp    1169 <usb_vid_get+0x69>
mov    -0x10(%rbp),%eax
sub    $0x1519,%eax
je     126b <usb_vid_get+0x16b>
jmp    117c <usb_vid_get+0x7c>
mov    -0x10(%rbp),%eax
sub    $0x18d1,%eax
je     11db <usb_vid_get+0xdb>
jmp    118f <usb_vid_get+0x8f>
mov    -0x10(%rbp),%eax
sub    $0x1d6b,%eax
je     124b <usb_vid_get+0x14b>
jmp    11a2 <usb_vid_get+0xa2>
mov    -0x10(%rbp),%eax
sub    $0x22b8,%eax
je     11fb <usb_vid_get+0xfb>
jmp    11b5 <usb_vid_get+0xb5>
mov    -0x10(%rbp),%eax
sub    $0xfff5,%eax
je     123b <usb_vid_get+0x13b>
jmp    11c8 <usb_vid_get+0xc8>
mov    -0x10(%rbp),%eax
sub    $0xfff6,%eax
je     121b <usb_vid_get+0x11b>
jmp    128b <usb_vid_get+0x18b>
lea    0xe1e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xe36(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xe4b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xe65(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xe7e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xe9e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xeb4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xebf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1296 <usb_vid_get+0x196>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_vid_get>:
cmp    $0x1518,%edi
jle    1134 <usb_vid_get+0x34>
cmp    $0x22b7,%edi
jg     115c <usb_vid_get+0x5c>
cmp    $0x1519,%edi
je     1194 <usb_vid_get+0x94>
cmp    $0x18d1,%edi
je     119c <usb_vid_get+0x9c>
cmp    $0x1d6b,%edi
jne    11cc <usb_vid_get+0xcc>
lea    0xfe8(%rip),%rax
ret
cmp    $0x834,%edi
jle    117c <usb_vid_get+0x7c>
cmp    $0x835,%edi
je     11a4 <usb_vid_get+0xa4>
cmp    $0xbb4,%edi
je     11ac <usb_vid_get+0xac>
cmp    $0xfce,%edi
jne    11cc <usb_vid_get+0xcc>
lea    0xf75(%rip),%rax
ret
cmp    $0x22b8,%edi
je     11b4 <usb_vid_get+0xb4>
cmp    $0xfff5,%edi
je     11bc <usb_vid_get+0xbc>
cmp    $0xfff6,%edi
jne    11cc <usb_vid_get+0xcc>
lea    0xf25(%rip),%rax
ret
cmp    $0x4e8,%edi
je     11c4 <usb_vid_get+0xc4>
cmp    $0x5c6,%edi
jne    11cc <usb_vid_get+0xcc>
lea    0xf8e(%rip),%rax
ret
lea    0xf8f(%rip),%rax
ret
lea    0xe5d(%rip),%rax
ret
lea    0xf87(%rip),%rax
ret
lea    0xe75(%rip),%rax
ret
lea    0xe92(%rip),%rax
ret
lea    0xf33(%rip),%rax
ret
lea    0xeac(%rip),%rax
ret
lea    0xf6b(%rip),%rax
ret

LLVM IR (-O0):
@.str = [40 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Google\00"
@.str.1 = [37 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! HTC\00"
@.str.2 = [42 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Motorola\00"
@.str.3 = [41 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Samsung\00"
@.str.4 = [48 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Other/Samsung?\00"
@.str.5 = [38 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Sony\00"
@.str.6 = [37 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LGE\00"
@.str.7 = [6 x i8] c"Linux\00"
@.str.8 = [9 x i8] c"Qualcomm\00"
@.str.9 = [8 x i8] c"Comneon\00"
@.str.10 = [12 x i8] c"Action Star\00"
@.str.11 = [46 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Unknown VID\00"
define i8* @usb_vid_get(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %16 [
i32 6353, label %5
i32 2996, label %6
i32 8888, label %7
i32 1256, label %8
i32 65526, label %9
i32 4046, label %10
i32 65525, label %11
i32 7531, label %12
i32 1478, label %13
i32 5401, label %14
i32 2101, label %15
]
5: ; preds = %1
store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8** %2
br label %17
6: ; preds = %1
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %17
7: ; preds = %1
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %17
8: ; preds = %1
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %17
9: ; preds = %1
store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %17
10: ; preds = %1
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %17
11: ; preds = %1
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %17
12: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %17
13: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %17
14: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %17
15: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %17
16: ; preds = %1
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %17
17: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [40 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Google\00"
@.str.1 = [37 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! HTC\00"
@.str.2 = [42 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Motorola\00"
@.str.3 = [41 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Samsung\00"
@.str.4 = [48 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Other/Samsung?\00"
@.str.5 = [38 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Sony\00"
@.str.6 = [37 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LGE\00"
@.str.7 = [6 x i8] c"Linux\00"
@.str.8 = [9 x i8] c"Qualcomm\00"
@.str.9 = [8 x i8] c"Comneon\00"
@.str.10 = [12 x i8] c"Action Star\00"
@.str.11 = [46 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Unknown VID\00"
define i8* @usb_vid_get(i32 %0) {
switch i32 %0, label %12 [
i32 6353, label %13
i32 2996, label %2
i32 8888, label %3
i32 1256, label %4
i32 65526, label %5
i32 4046, label %6
i32 65525, label %7
i32 7531, label %8
i32 1478, label %9
i32 5401, label %10
i32 2101, label %11
]
2: ; preds = %1
br label %13
3: ; preds = %1
br label %13
4: ; preds = %1
br label %13
5: ; preds = %1
br label %13
6: ; preds = %1
br label %13
7: ; preds = %1
br label %13
8: ; preds = %1
br label %13
9: ; preds = %1
br label %13
10: ; preds = %1
br label %13
11: ; preds = %1
br label %13
12: ; preds = %1
br label %13
13: ; preds = %1, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%14 = phi i8* [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %14
}