char *mel_get_device_name(unsigned int dev_type) {
  char *name = "Unknown";
  if (dev_type & ((1 << 0))) {
    name = "M";
    goto __exit_point;
  }
  if (dev_type & ((1 << 13) | (1 << 9))) {
    name = "Z";
    goto __exit_point;
  }
  if (dev_type & ((1 << 14) | (1 << 12))) {
    name = "V";
    goto __exit_point;
  }
  if (dev_type & ((1 << 15) | (1 << 16) | (1 << 10))) {
    name = "K";
    goto __exit_point;
  }
  if (dev_type & ((1 << 17) | (1 << 18))) {
    name = "H";
    goto __exit_point;
  }
  switch (dev_type) {
  case (1 << 1):
    name = "S";
    break;
  case (1 << 2):
    name = "X";
    break;
  case (1 << 3):
    name = "Y";
    break;
  case (1 << 4):
    name = "T";
    break;
  case (1 << 5):
    name = "C";
    break;
  case (1 << 6):
    name = "D";
    break;
  case (1 << 7):
    name = "R";
    break;
  case (1 << 26):
    name = "SU";
    break;
  case (1 << 11):
    name = ".";
    break;
  case (1 << 19):
    name = "E";
    break;
  case (1 << 20):
    name = "P";
    break;
  case (1 << 21):
    name = "I";
    break;
  case (1 << 22):
    name = "N";
    break;
  case (1 << 25):
    name = "";
    break;
  case (1 << 23):
    name = "U";
    break;
  case (1 << 24):
    name = "\\G";
    break;
  case (1 << 8):
    name = "ER";
    break;
  }
__exit_point:
  return (name);
}


x86 assembly (clang, -O0):
<mel_get_device_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1131 <mel_get_device_name+0x31>
lea    0xee0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13ff <mel_get_device_name+0x2ff>
mov    -0x4(%rbp),%eax
and    $0x2200,%eax
cmp    $0x0,%eax
je     1152 <mel_get_device_name+0x52>
lea    0xec1(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13ff <mel_get_device_name+0x2ff>
mov    -0x4(%rbp),%eax
and    $0x5000,%eax
cmp    $0x0,%eax
je     1173 <mel_get_device_name+0x73>
lea    0xea2(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13ff <mel_get_device_name+0x2ff>
mov    -0x4(%rbp),%eax
and    $0x18400,%eax
cmp    $0x0,%eax
je     1194 <mel_get_device_name+0x94>
lea    0xe83(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13ff <mel_get_device_name+0x2ff>
mov    -0x4(%rbp),%eax
and    $0x60000,%eax
cmp    $0x0,%eax
je     11b5 <mel_get_device_name+0xb5>
lea    0xe64(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13ff <mel_get_device_name+0x2ff>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2,%eax
je     12ef <mel_get_device_name+0x1ef>
jmp    11c9 <mel_get_device_name+0xc9>
mov    -0x14(%rbp),%eax
sub    $0x4,%eax
je     12ff <mel_get_device_name+0x1ff>
jmp    11da <mel_get_device_name+0xda>
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
je     130f <mel_get_device_name+0x20f>
jmp    11eb <mel_get_device_name+0xeb>
mov    -0x14(%rbp),%eax
sub    $0x10,%eax
je     131f <mel_get_device_name+0x21f>
jmp    11fc <mel_get_device_name+0xfc>
mov    -0x14(%rbp),%eax
sub    $0x20,%eax
je     132f <mel_get_device_name+0x22f>
jmp    120d <mel_get_device_name+0x10d>
mov    -0x14(%rbp),%eax
sub    $0x40,%eax
je     133f <mel_get_device_name+0x23f>
jmp    121e <mel_get_device_name+0x11e>
mov    -0x14(%rbp),%eax
sub    $0x80,%eax
je     134f <mel_get_device_name+0x24f>
jmp    1231 <mel_get_device_name+0x131>
mov    -0x14(%rbp),%eax
sub    $0x100,%eax
je     13ef <mel_get_device_name+0x2ef>
jmp    1244 <mel_get_device_name+0x144>
mov    -0x14(%rbp),%eax
sub    $0x800,%eax
je     136f <mel_get_device_name+0x26f>
jmp    1257 <mel_get_device_name+0x157>
mov    -0x14(%rbp),%eax
sub    $0x80000,%eax
je     137f <mel_get_device_name+0x27f>
jmp    126a <mel_get_device_name+0x16a>
mov    -0x14(%rbp),%eax
sub    $0x100000,%eax
je     138f <mel_get_device_name+0x28f>
jmp    127d <mel_get_device_name+0x17d>
mov    -0x14(%rbp),%eax
sub    $0x200000,%eax
je     139f <mel_get_device_name+0x29f>
jmp    1290 <mel_get_device_name+0x190>
mov    -0x14(%rbp),%eax
sub    $0x400000,%eax
je     13af <mel_get_device_name+0x2af>
jmp    12a3 <mel_get_device_name+0x1a3>
mov    -0x14(%rbp),%eax
sub    $0x800000,%eax
je     13cf <mel_get_device_name+0x2cf>
jmp    12b6 <mel_get_device_name+0x1b6>
mov    -0x14(%rbp),%eax
sub    $0x1000000,%eax
je     13df <mel_get_device_name+0x2df>
jmp    12c9 <mel_get_device_name+0x1c9>
mov    -0x14(%rbp),%eax
sub    $0x2000000,%eax
je     13bf <mel_get_device_name+0x2bf>
jmp    12dc <mel_get_device_name+0x1dc>
mov    -0x14(%rbp),%eax
sub    $0x4000000,%eax
je     135f <mel_get_device_name+0x25f>
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xd1c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xd0e(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xd00(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xcf2(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xce4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xcd6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xcd9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xcb8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xcab(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc9d(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc8f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc81(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc73(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc5c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc49(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc45(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13fa <mel_get_device_name+0x2fa>
lea    0xc38(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13ff <mel_get_device_name+0x2ff>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mel_get_device_name>:
test   $0x1,%dil
jne    1116 <mel_get_device_name+0x16>
test   $0x2200,%edi
je     111e <mel_get_device_name+0x1e>
lea    0xf71(%rip),%rax
ret
lea    0xf67(%rip),%rax
ret
test   $0x5000,%edi
je     112e <mel_get_device_name+0x2e>
lea    0xf5b(%rip),%rax
ret
test   $0x18400,%edi
je     113e <mel_get_device_name+0x3e>
lea    0xf4d(%rip),%rax
ret
test   $0x60000,%edi
je     114e <mel_get_device_name+0x4e>
lea    0xf3f(%rip),%rax
ret
lea    0xf27(%rip),%rax
cmp    $0x7ff,%edi
jle    119d <mel_get_device_name+0x9d>
cmp    $0x3fffff,%edi
jle    11c6 <mel_get_device_name+0xc6>
cmp    $0xffffff,%edi
jle    120f <mel_get_device_name+0x10f>
cmp    $0x1000000,%edi
je     123f <mel_get_device_name+0x13f>
cmp    $0x2000000,%edi
je     1247 <mel_get_device_name+0x147>
cmp    $0x4000000,%edi
jne    1246 <mel_get_device_name+0x146>
lea    0xefe(%rip),%rax
ret
cmp    $0x3f,%edi
jg     11ea <mel_get_device_name+0xea>
add    $0xfffffffe,%edi
cmp    $0x1e,%edi
ja     1246 <mel_get_device_name+0x146>
lea    0xe4b(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xec9(%rip),%rax
ret
cmp    $0xfffff,%edi
jg     1227 <mel_get_device_name+0x127>
cmp    $0x800,%edi
je     126f <mel_get_device_name+0x16f>
cmp    $0x80000,%edi
jne    1246 <mel_get_device_name+0x146>
lea    0xeb6(%rip),%rax
ret
cmp    $0x40,%edi
je     1277 <mel_get_device_name+0x177>
cmp    $0x80,%edi
je     127f <mel_get_device_name+0x17f>
cmp    $0x100,%edi
jne    1246 <mel_get_device_name+0x146>
lea    0xe9c(%rip),%rax
ret
cmp    $0x400000,%edi
je     1287 <mel_get_device_name+0x187>
cmp    $0x800000,%edi
jne    1246 <mel_get_device_name+0x146>
lea    0xe75(%rip),%rax
ret
cmp    $0x100000,%edi
je     128f <mel_get_device_name+0x18f>
cmp    $0x200000,%edi
jne    1246 <mel_get_device_name+0x146>
lea    0xe65(%rip),%rax
ret
lea    0xe61(%rip),%rax
ret
lea    0xe50(%rip),%rax
ret
lea    0xe3a(%rip),%rax
ret
lea    0xe34(%rip),%rax
ret
lea    0xe2e(%rip),%rax
ret
lea    0xe28(%rip),%rax
ret
lea    0xe27(%rip),%rax
ret
lea    0xe1a(%rip),%rax
ret
lea    0xe25(%rip),%rax
ret
lea    0xe17(%rip),%rax
ret
lea    0xe0b(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Unknown\00"
@.str.1 = [2 x i8] c"M\00"
@.str.2 = [2 x i8] c"Z\00"
@.str.3 = [2 x i8] c"V\00"
@.str.4 = [2 x i8] c"K\00"
@.str.5 = [2 x i8] c"H\00"
@.str.6 = [2 x i8] c"S\00"
@.str.7 = [2 x i8] c"X\00"
@.str.8 = [2 x i8] c"Y\00"
@.str.9 = [2 x i8] c"T\00"
@.str.10 = [2 x i8] c"C\00"
@.str.11 = [2 x i8] c"D\00"
@.str.12 = [2 x i8] c"R\00"
@.str.13 = [3 x i8] c"SU\00"
@.str.14 = [2 x i8] c".\00"
@.str.15 = [2 x i8] c"E\00"
@.str.16 = [2 x i8] c"P\00"
@.str.17 = [2 x i8] c"I\00"
@.str.18 = [2 x i8] c"N\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [2 x i8] c"U\00"
@.str.21 = [3 x i8] c"\\G\00"
@.str.22 = [3 x i8] c"ER\00"
define i8* @mel_get_device_name(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32, i32* %2
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %48
8: ; preds = %1
%9 = load i32, i32* %2
%10 = and i32 %9, 8704
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %48
13: ; preds = %8
%14 = load i32, i32* %2
%15 = and i32 %14, 20480
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %48
18: ; preds = %13
%19 = load i32, i32* %2
%20 = and i32 %19, 99328
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %18
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %48
23: ; preds = %18
%24 = load i32, i32* %2
%25 = and i32 %24, 393216
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %23
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %48
28: ; preds = %23
%29 = load i32, i32* %2
switch i32 %29, label %47 [
i32 2, label %30
i32 4, label %31
i32 8, label %32
i32 16, label %33
i32 32, label %34
i32 64, label %35
i32 128, label %36
i32 67108864, label %37
i32 2048, label %38
i32 524288, label %39
i32 1048576, label %40
i32 2097152, label %41
i32 4194304, label %42
i32 33554432, label %43
i32 8388608, label %44
i32 16777216, label %45
i32 256, label %46
]
30: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %47
31: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %47
32: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %47
33: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %47
34: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %47
35: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %47
36: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %47
37: ; preds = %28
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %47
38: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %47
39: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %47
40: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %47
41: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %47
42: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8** %3
br label %47
43: ; preds = %28
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0), i8** %3
br label %47
44: ; preds = %28
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), i8** %3
br label %47
45: ; preds = %28
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i8** %3
br label %47
46: ; preds = %28
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8** %3
br label %47
47: ; preds = %28, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30
br label %48
48: ; preds = %47, %27, %22, %17, %12, %7
%49 = load i8*, i8** %3
ret i8* %49
}

LLVM IR (-O2):
@.str = [8 x i8] c"Unknown\00"
@.str.1 = [2 x i8] c"M\00"
@.str.2 = [2 x i8] c"Z\00"
@.str.3 = [2 x i8] c"V\00"
@.str.4 = [2 x i8] c"K\00"
@.str.5 = [2 x i8] c"H\00"
@.str.6 = [2 x i8] c"S\00"
@.str.7 = [2 x i8] c"X\00"
@.str.8 = [2 x i8] c"Y\00"
@.str.9 = [2 x i8] c"T\00"
@.str.10 = [2 x i8] c"C\00"
@.str.11 = [2 x i8] c"D\00"
@.str.12 = [2 x i8] c"R\00"
@.str.13 = [3 x i8] c"SU\00"
@.str.14 = [2 x i8] c".\00"
@.str.15 = [2 x i8] c"E\00"
@.str.16 = [2 x i8] c"P\00"
@.str.17 = [2 x i8] c"I\00"
@.str.18 = [2 x i8] c"N\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [2 x i8] c"U\00"
@.str.21 = [3 x i8] c"\\G\00"
@.str.22 = [3 x i8] c"ER\00"
define i8* @mel_get_device_name(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %34
4: ; preds = %1
%5 = and i32 %0, 8704
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %34
7: ; preds = %4
%8 = and i32 %0, 20480
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %34
10: ; preds = %7
%11 = and i32 %0, 99328
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %34
13: ; preds = %10
%14 = and i32 %0, 393216
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %34
16: ; preds = %13
switch i32 %0, label %34 [
i32 2, label %17
i32 4, label %18
i32 8, label %19
i32 16, label %20
i32 32, label %21
i32 64, label %22
i32 128, label %23
i32 67108864, label %24
i32 2048, label %25
i32 524288, label %26
i32 1048576, label %27
i32 2097152, label %28
i32 4194304, label %29
i32 33554432, label %30
i32 8388608, label %31
i32 16777216, label %32
i32 256, label %33
]
17: ; preds = %16
br label %34
18: ; preds = %16
br label %34
19: ; preds = %16
br label %34
20: ; preds = %16
br label %34
21: ; preds = %16
br label %34
22: ; preds = %16
br label %34
23: ; preds = %16
br label %34
24: ; preds = %16
br label %34
25: ; preds = %16
br label %34
26: ; preds = %16
br label %34
27: ; preds = %16
br label %34
28: ; preds = %16
br label %34
29: ; preds = %16
br label %34
30: ; preds = %16
br label %34
31: ; preds = %16
br label %34
32: ; preds = %16
br label %34
33: ; preds = %16
br label %34
34: ; preds = %13, %10, %7, %4, %1, %17, %18, %19, %20, %21, %22, %23, %24, %25, %26, %27, %28, %29, %30, %31, %32, %33, %16
%35 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %16 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), %33 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), %32 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), %31 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0), %30 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), %29 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), %28 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), %27 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), %26 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), %25 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), %24 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), %23 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), %22 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), %21 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), %20 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), %19 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), %18 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), %17 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), %7 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), %10 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), %13 ]
ret i8* %35
}