extern char *gaisler_device_str(int id) {
  switch (id) {
  case 0x003:
    return "GAISLER_LEON3";
  case 0x004:
    return "GAISLER_LEON3DSU";
  case 0x048:
    return "GAISLER_LEON4";
  case 0x049:
    return "GAISLER_LEON4DSU";
  case 0x005:
    return "GAISLER_ETHAHB";
  case 0x01D:
    return "GAISLER_ETHMAC";
  case 0x006:
    return "GAISLER_APBMST";
  case 0x007:
    return "GAISLER_AHBUART";
  case 0x008:
    return "GAISLER_SRCTRL";
  case 0x009:
    return "GAISLER_SDCTRL";
  case 0x00C:
    return "GAISLER_APBUART";
  case 0x00D:
    return "GAISLER_IRQMP";
  case 0x00E:
    return "GAISLER_AHBRAM";
  case 0x011:
    return "GAISLER_GPTIMER";
  case 0x012:
    return "GAISLER_PCITRG";
  case 0x013:
    return "GAISLER_PCISBRG";
  case 0x014:
    return "GAISLER_PCIFBRG";
  case 0x015:
    return "GAISLER_PCITRACE";
  case 0x016:
    return "GAISLER_PCIDMA";
  case 0x017:
    return "GAISLER_AHBTRACE";
  case 0x018:
    return "GAISLER_ETHDSU";
  case 0x01A:
    return "GAISLER_PIOPORT";
  case 0x01c:
    return "GAISLER_AHBJTAG";
  case 0x021:
    return "GAISLER_USBDC";
  case 0x024:
    return "GAISLER_ATACTRL";
  case 0x025:
    return "GAISLER_DDRSPA";
  case 0x026:
    return "GAISLER_USBEHC";
  case 0x027:
    return "GAISLER_USBUHC";
  case 0x028:
    return "GAISLER_I2CMST";
  case 0x02D:
    return "GAISLER_SPICTRL";
  case 0x061:
    return "GAISLER_VGA";
  case 0x063:
    return "GAISLER_SVGA";
  case 0x066:
    return "GAISLER_GRSYSMON";
  case 0x067:
    return "GAISLER_GRACECTRL";
  case 0x060:
    return "GAISLER_KBD";
  case 0x02E:
    return "GAISLER_DDR2SPA";
  case 0x045:
    return "GAISLER_SPIMCTRL";
  case 0x052:
    return "GAISLER_AHBSTAT";
  case 0x020:
    return "GAISLER_AHB2AHB";
  case 0xffd:
    return "GAISLER_L2TIME";
  case 0xffe:
    return "GAISLER_L2C";
  case 0xfff:
    return "GAISLER_PLUGPLAY";
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<gaisler_device_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x3,%eax
je     13da <gaisler_device_str+0x2da>
jmp    111b <gaisler_device_str+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     13ea <gaisler_device_str+0x2ea>
jmp    112c <gaisler_device_str+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
je     141a <gaisler_device_str+0x31a>
jmp    113d <gaisler_device_str+0x3d>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
je     143a <gaisler_device_str+0x33a>
jmp    114e <gaisler_device_str+0x4e>
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
je     144a <gaisler_device_str+0x34a>
jmp    115f <gaisler_device_str+0x5f>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     145a <gaisler_device_str+0x35a>
jmp    1170 <gaisler_device_str+0x70>
mov    -0x10(%rbp),%eax
sub    $0x9,%eax
je     146a <gaisler_device_str+0x36a>
jmp    1181 <gaisler_device_str+0x81>
mov    -0x10(%rbp),%eax
sub    $0xc,%eax
je     147a <gaisler_device_str+0x37a>
jmp    1192 <gaisler_device_str+0x92>
mov    -0x10(%rbp),%eax
sub    $0xd,%eax
je     148a <gaisler_device_str+0x38a>
jmp    11a3 <gaisler_device_str+0xa3>
mov    -0x10(%rbp),%eax
sub    $0xe,%eax
je     149a <gaisler_device_str+0x39a>
jmp    11b4 <gaisler_device_str+0xb4>
mov    -0x10(%rbp),%eax
sub    $0x11,%eax
je     14aa <gaisler_device_str+0x3aa>
jmp    11c5 <gaisler_device_str+0xc5>
mov    -0x10(%rbp),%eax
sub    $0x12,%eax
je     14ba <gaisler_device_str+0x3ba>
jmp    11d6 <gaisler_device_str+0xd6>
mov    -0x10(%rbp),%eax
sub    $0x13,%eax
je     14ca <gaisler_device_str+0x3ca>
jmp    11e7 <gaisler_device_str+0xe7>
mov    -0x10(%rbp),%eax
sub    $0x14,%eax
je     14da <gaisler_device_str+0x3da>
jmp    11f8 <gaisler_device_str+0xf8>
mov    -0x10(%rbp),%eax
sub    $0x15,%eax
je     14ea <gaisler_device_str+0x3ea>
jmp    1209 <gaisler_device_str+0x109>
mov    -0x10(%rbp),%eax
sub    $0x16,%eax
je     14fa <gaisler_device_str+0x3fa>
jmp    121a <gaisler_device_str+0x11a>
mov    -0x10(%rbp),%eax
sub    $0x17,%eax
je     150a <gaisler_device_str+0x40a>
jmp    122b <gaisler_device_str+0x12b>
mov    -0x10(%rbp),%eax
sub    $0x18,%eax
je     151a <gaisler_device_str+0x41a>
jmp    123c <gaisler_device_str+0x13c>
mov    -0x10(%rbp),%eax
sub    $0x1a,%eax
je     152a <gaisler_device_str+0x42a>
jmp    124d <gaisler_device_str+0x14d>
mov    -0x10(%rbp),%eax
sub    $0x1c,%eax
je     153a <gaisler_device_str+0x43a>
jmp    125e <gaisler_device_str+0x15e>
mov    -0x10(%rbp),%eax
sub    $0x1d,%eax
je     142a <gaisler_device_str+0x32a>
jmp    126f <gaisler_device_str+0x16f>
mov    -0x10(%rbp),%eax
sub    $0x20,%eax
je     163a <gaisler_device_str+0x53a>
jmp    1280 <gaisler_device_str+0x180>
mov    -0x10(%rbp),%eax
sub    $0x21,%eax
je     154a <gaisler_device_str+0x44a>
jmp    1291 <gaisler_device_str+0x191>
mov    -0x10(%rbp),%eax
sub    $0x24,%eax
je     155a <gaisler_device_str+0x45a>
jmp    12a2 <gaisler_device_str+0x1a2>
mov    -0x10(%rbp),%eax
sub    $0x25,%eax
je     156a <gaisler_device_str+0x46a>
jmp    12b3 <gaisler_device_str+0x1b3>
mov    -0x10(%rbp),%eax
sub    $0x26,%eax
je     157a <gaisler_device_str+0x47a>
jmp    12c4 <gaisler_device_str+0x1c4>
mov    -0x10(%rbp),%eax
sub    $0x27,%eax
je     158a <gaisler_device_str+0x48a>
jmp    12d5 <gaisler_device_str+0x1d5>
mov    -0x10(%rbp),%eax
sub    $0x28,%eax
je     159a <gaisler_device_str+0x49a>
jmp    12e6 <gaisler_device_str+0x1e6>
mov    -0x10(%rbp),%eax
sub    $0x2d,%eax
je     15aa <gaisler_device_str+0x4aa>
jmp    12f7 <gaisler_device_str+0x1f7>
mov    -0x10(%rbp),%eax
sub    $0x2e,%eax
je     160a <gaisler_device_str+0x50a>
jmp    1308 <gaisler_device_str+0x208>
mov    -0x10(%rbp),%eax
sub    $0x45,%eax
je     161a <gaisler_device_str+0x51a>
jmp    1319 <gaisler_device_str+0x219>
mov    -0x10(%rbp),%eax
sub    $0x48,%eax
je     13fa <gaisler_device_str+0x2fa>
jmp    132a <gaisler_device_str+0x22a>
mov    -0x10(%rbp),%eax
sub    $0x49,%eax
je     140a <gaisler_device_str+0x30a>
jmp    133b <gaisler_device_str+0x23b>
mov    -0x10(%rbp),%eax
sub    $0x52,%eax
je     162a <gaisler_device_str+0x52a>
jmp    134c <gaisler_device_str+0x24c>
mov    -0x10(%rbp),%eax
sub    $0x60,%eax
je     15fa <gaisler_device_str+0x4fa>
jmp    135d <gaisler_device_str+0x25d>
mov    -0x10(%rbp),%eax
sub    $0x61,%eax
je     15ba <gaisler_device_str+0x4ba>
jmp    136e <gaisler_device_str+0x26e>
mov    -0x10(%rbp),%eax
sub    $0x63,%eax
je     15ca <gaisler_device_str+0x4ca>
jmp    137f <gaisler_device_str+0x27f>
mov    -0x10(%rbp),%eax
sub    $0x66,%eax
je     15da <gaisler_device_str+0x4da>
jmp    1390 <gaisler_device_str+0x290>
mov    -0x10(%rbp),%eax
sub    $0x67,%eax
je     15ea <gaisler_device_str+0x4ea>
jmp    13a1 <gaisler_device_str+0x2a1>
mov    -0x10(%rbp),%eax
sub    $0xffd,%eax
je     164a <gaisler_device_str+0x54a>
jmp    13b4 <gaisler_device_str+0x2b4>
mov    -0x10(%rbp),%eax
sub    $0xffe,%eax
je     165a <gaisler_device_str+0x55a>
jmp    13c7 <gaisler_device_str+0x2c7>
mov    -0x10(%rbp),%eax
sub    $0xfff,%eax
je     166a <gaisler_device_str+0x56a>
jmp    167a <gaisler_device_str+0x57a>
lea    0xc1f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc1a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc19(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc18(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc18(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc16(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc15(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc15(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc15(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc15(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc12(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc12(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc11(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc10(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc0f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc0e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc0e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc0a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc07(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc08(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc0a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc06(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc06(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc07(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc07(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc07(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc06(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
lea    0xc02(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1687 <gaisler_device_str+0x587>
jmp    167f <gaisler_device_str+0x57f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gaisler_device_str>:
cmp    $0xffc,%edi
jg     1133 <gaisler_device_str+0x33>
add    $0xfffffffd,%edi
cmp    $0x64,%edi
ja     1297 <gaisler_device_str+0x197>
lea    0x1079(%rip),%rax
lea    0xede(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0x1070(%rip),%rax
ret
cmp    $0xffd,%edi
je     1287 <gaisler_device_str+0x187>
cmp    $0xffe,%edi
je     128f <gaisler_device_str+0x18f>
cmp    $0xfff,%edi
jne    1297 <gaisler_device_str+0x197>
lea    0x12a9(%rip),%rax
ret
lea    0x106c(%rip),%rax
ret
lea    0x1082(%rip),%rax
ret
lea    0x1089(%rip),%rax
ret
lea    0x1091(%rip),%rax
ret
lea    0x1098(%rip),%rax
ret
lea    0x109f(%rip),%rax
ret
lea    0x10a7(%rip),%rax
ret
lea    0x10ad(%rip),%rax
ret
lea    0x10b4(%rip),%rax
ret
lea    0x10bc(%rip),%rax
ret
lea    0x10c3(%rip),%rax
ret
lea    0x10cb(%rip),%rax
ret
lea    0x10d3(%rip),%rax
ret
lea    0x10dc(%rip),%rax
ret
lea    0x10e3(%rip),%rax
ret
lea    0x10ec(%rip),%rax
ret
lea    0x10f3(%rip),%rax
ret
lea    0x10fb(%rip),%rax
ret
lea    0xfeb(%rip),%rax
ret
lea    0x11de(%rip),%rax
ret
lea    0x10f3(%rip),%rax
ret
lea    0x10f9(%rip),%rax
ret
lea    0x1101(%rip),%rax
ret
lea    0x1108(%rip),%rax
ret
lea    0x110f(%rip),%rax
ret
lea    0x1116(%rip),%rax
ret
lea    0x111d(%rip),%rax
ret
lea    0x116d(%rip),%rax
ret
lea    0x1175(%rip),%rax
ret
lea    0xf65(%rip),%rax
ret
lea    0xf6b(%rip),%rax
ret
lea    0x116e(%rip),%rax
ret
lea    0x1139(%rip),%rax
ret
lea    0x10f5(%rip),%rax
ret
lea    0x10f9(%rip),%rax
ret
lea    0x10fe(%rip),%rax
ret
lea    0x1107(%rip),%rax
ret
lea    0x115e(%rip),%rax
ret
lea    0x1165(%rip),%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"GAISLER_LEON3\00"
@.str.1 = [17 x i8] c"GAISLER_LEON3DSU\00"
@.str.2 = [14 x i8] c"GAISLER_LEON4\00"
@.str.3 = [17 x i8] c"GAISLER_LEON4DSU\00"
@.str.4 = [15 x i8] c"GAISLER_ETHAHB\00"
@.str.5 = [15 x i8] c"GAISLER_ETHMAC\00"
@.str.6 = [15 x i8] c"GAISLER_APBMST\00"
@.str.7 = [16 x i8] c"GAISLER_AHBUART\00"
@.str.8 = [15 x i8] c"GAISLER_SRCTRL\00"
@.str.9 = [15 x i8] c"GAISLER_SDCTRL\00"
@.str.10 = [16 x i8] c"GAISLER_APBUART\00"
@.str.11 = [14 x i8] c"GAISLER_IRQMP\00"
@.str.12 = [15 x i8] c"GAISLER_AHBRAM\00"
@.str.13 = [16 x i8] c"GAISLER_GPTIMER\00"
@.str.14 = [15 x i8] c"GAISLER_PCITRG\00"
@.str.15 = [16 x i8] c"GAISLER_PCISBRG\00"
@.str.16 = [16 x i8] c"GAISLER_PCIFBRG\00"
@.str.17 = [17 x i8] c"GAISLER_PCITRACE\00"
@.str.18 = [15 x i8] c"GAISLER_PCIDMA\00"
@.str.19 = [17 x i8] c"GAISLER_AHBTRACE\00"
@.str.20 = [15 x i8] c"GAISLER_ETHDSU\00"
@.str.21 = [16 x i8] c"GAISLER_PIOPORT\00"
@.str.22 = [16 x i8] c"GAISLER_AHBJTAG\00"
@.str.23 = [14 x i8] c"GAISLER_USBDC\00"
@.str.24 = [16 x i8] c"GAISLER_ATACTRL\00"
@.str.25 = [15 x i8] c"GAISLER_DDRSPA\00"
@.str.26 = [15 x i8] c"GAISLER_USBEHC\00"
@.str.27 = [15 x i8] c"GAISLER_USBUHC\00"
@.str.28 = [15 x i8] c"GAISLER_I2CMST\00"
@.str.29 = [16 x i8] c"GAISLER_SPICTRL\00"
@.str.30 = [12 x i8] c"GAISLER_VGA\00"
@.str.31 = [13 x i8] c"GAISLER_SVGA\00"
@.str.32 = [17 x i8] c"GAISLER_GRSYSMON\00"
@.str.33 = [18 x i8] c"GAISLER_GRACECTRL\00"
@.str.34 = [12 x i8] c"GAISLER_KBD\00"
@.str.35 = [16 x i8] c"GAISLER_DDR2SPA\00"
@.str.36 = [17 x i8] c"GAISLER_SPIMCTRL\00"
@.str.37 = [16 x i8] c"GAISLER_AHBSTAT\00"
@.str.38 = [16 x i8] c"GAISLER_AHB2AHB\00"
@.str.39 = [15 x i8] c"GAISLER_L2TIME\00"
@.str.40 = [12 x i8] c"GAISLER_L2C\00"
@.str.41 = [17 x i8] c"GAISLER_PLUGPLAY\00"
define i8* @gaisler_device_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %47 [
i32 3, label %5
i32 4, label %6
i32 72, label %7
i32 73, label %8
i32 5, label %9
i32 29, label %10
i32 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
i32 12, label %15
i32 13, label %16
i32 14, label %17
i32 17, label %18
i32 18, label %19
i32 19, label %20
i32 20, label %21
i32 21, label %22
i32 22, label %23
i32 23, label %24
i32 24, label %25
i32 26, label %26
i32 28, label %27
i32 33, label %28
i32 36, label %29
i32 37, label %30
i32 38, label %31
i32 39, label %32
i32 40, label %33
i32 45, label %34
i32 97, label %35
i32 99, label %36
i32 102, label %37
i32 103, label %38
i32 96, label %39
i32 46, label %40
i32 69, label %41
i32 82, label %42
i32 32, label %43
i32 4093, label %44
i32 4094, label %45
i32 4095, label %46
]
5: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
br label %49
6: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %49
7: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %49
8: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %49
9: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %49
10: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %49
11: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %49
12: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %49
13: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %49
14: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %49
15: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %49
16: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %49
17: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %49
18: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %49
19: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %49
20: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %49
21: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %49
22: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %49
23: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %49
24: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %49
25: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %49
26: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %49
27: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %49
28: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %49
29: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %49
30: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %49
31: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i64 0, i64 0), i8** %2
br label %49
32: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.27, i64 0, i64 0), i8** %2
br label %49
33: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.28, i64 0, i64 0), i8** %2
br label %49
34: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.29, i64 0, i64 0), i8** %2
br label %49
35: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.30, i64 0, i64 0), i8** %2
br label %49
36: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.31, i64 0, i64 0), i8** %2
br label %49
37: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0), i8** %2
br label %49
38: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.33, i64 0, i64 0), i8** %2
br label %49
39: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0), i8** %2
br label %49
40: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.35, i64 0, i64 0), i8** %2
br label %49
41: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.36, i64 0, i64 0), i8** %2
br label %49
42: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.37, i64 0, i64 0), i8** %2
br label %49
43: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.38, i64 0, i64 0), i8** %2
br label %49
44: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.39, i64 0, i64 0), i8** %2
br label %49
45: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.40, i64 0, i64 0), i8** %2
br label %49
46: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.41, i64 0, i64 0), i8** %2
br label %49
47: ; preds = %1
br label %48
48: ; preds = %47
store i8* null, i8** %2
br label %49
49: ; preds = %48, %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, %7, %6, %5
%50 = load i8*, i8** %2
ret i8* %50
}

LLVM IR (-O2):
@.str = [14 x i8] c"GAISLER_LEON3\00"
@.str.1 = [17 x i8] c"GAISLER_LEON3DSU\00"
@.str.2 = [14 x i8] c"GAISLER_LEON4\00"
@.str.3 = [17 x i8] c"GAISLER_LEON4DSU\00"
@.str.4 = [15 x i8] c"GAISLER_ETHAHB\00"
@.str.5 = [15 x i8] c"GAISLER_ETHMAC\00"
@.str.6 = [15 x i8] c"GAISLER_APBMST\00"
@.str.7 = [16 x i8] c"GAISLER_AHBUART\00"
@.str.8 = [15 x i8] c"GAISLER_SRCTRL\00"
@.str.9 = [15 x i8] c"GAISLER_SDCTRL\00"
@.str.10 = [16 x i8] c"GAISLER_APBUART\00"
@.str.11 = [14 x i8] c"GAISLER_IRQMP\00"
@.str.12 = [15 x i8] c"GAISLER_AHBRAM\00"
@.str.13 = [16 x i8] c"GAISLER_GPTIMER\00"
@.str.14 = [15 x i8] c"GAISLER_PCITRG\00"
@.str.15 = [16 x i8] c"GAISLER_PCISBRG\00"
@.str.16 = [16 x i8] c"GAISLER_PCIFBRG\00"
@.str.17 = [17 x i8] c"GAISLER_PCITRACE\00"
@.str.18 = [15 x i8] c"GAISLER_PCIDMA\00"
@.str.19 = [17 x i8] c"GAISLER_AHBTRACE\00"
@.str.20 = [15 x i8] c"GAISLER_ETHDSU\00"
@.str.21 = [16 x i8] c"GAISLER_PIOPORT\00"
@.str.22 = [16 x i8] c"GAISLER_AHBJTAG\00"
@.str.23 = [14 x i8] c"GAISLER_USBDC\00"
@.str.24 = [16 x i8] c"GAISLER_ATACTRL\00"
@.str.25 = [15 x i8] c"GAISLER_DDRSPA\00"
@.str.26 = [15 x i8] c"GAISLER_USBEHC\00"
@.str.27 = [15 x i8] c"GAISLER_USBUHC\00"
@.str.28 = [15 x i8] c"GAISLER_I2CMST\00"
@.str.29 = [16 x i8] c"GAISLER_SPICTRL\00"
@.str.30 = [12 x i8] c"GAISLER_VGA\00"
@.str.31 = [13 x i8] c"GAISLER_SVGA\00"
@.str.32 = [17 x i8] c"GAISLER_GRSYSMON\00"
@.str.33 = [18 x i8] c"GAISLER_GRACECTRL\00"
@.str.34 = [12 x i8] c"GAISLER_KBD\00"
@.str.35 = [16 x i8] c"GAISLER_DDR2SPA\00"
@.str.36 = [17 x i8] c"GAISLER_SPIMCTRL\00"
@.str.37 = [16 x i8] c"GAISLER_AHBSTAT\00"
@.str.38 = [16 x i8] c"GAISLER_AHB2AHB\00"
@.str.39 = [15 x i8] c"GAISLER_L2TIME\00"
@.str.40 = [12 x i8] c"GAISLER_L2C\00"
@.str.41 = [17 x i8] c"GAISLER_PLUGPLAY\00"
define i8* @gaisler_device_str(i32 %0) {
switch i32 %0, label %43 [
i32 3, label %44
i32 4, label %2
i32 72, label %3
i32 73, label %4
i32 5, label %5
i32 29, label %6
i32 6, label %7
i32 7, label %8
i32 8, label %9
i32 9, label %10
i32 12, label %11
i32 13, label %12
i32 14, label %13
i32 17, label %14
i32 18, label %15
i32 19, label %16
i32 20, label %17
i32 21, label %18
i32 22, label %19
i32 23, label %20
i32 24, label %21
i32 26, label %22
i32 28, label %23
i32 33, label %24
i32 36, label %25
i32 37, label %26
i32 38, label %27
i32 39, label %28
i32 40, label %29
i32 45, label %30
i32 97, label %31
i32 99, label %32
i32 102, label %33
i32 103, label %34
i32 96, label %35
i32 46, label %36
i32 69, label %37
i32 82, label %38
i32 32, label %39
i32 4093, label %40
i32 4094, label %41
i32 4095, label %42
]
2: ; preds = %1
br label %44
3: ; preds = %1
br label %44
4: ; preds = %1
br label %44
5: ; preds = %1
br label %44
6: ; preds = %1
br label %44
7: ; preds = %1
br label %44
8: ; preds = %1
br label %44
9: ; preds = %1
br label %44
10: ; preds = %1
br label %44
11: ; preds = %1
br label %44
12: ; preds = %1
br label %44
13: ; preds = %1
br label %44
14: ; preds = %1
br label %44
15: ; preds = %1
br label %44
16: ; preds = %1
br label %44
17: ; preds = %1
br label %44
18: ; preds = %1
br label %44
19: ; preds = %1
br label %44
20: ; preds = %1
br label %44
21: ; preds = %1
br label %44
22: ; preds = %1
br label %44
23: ; preds = %1
br label %44
24: ; preds = %1
br label %44
25: ; preds = %1
br label %44
26: ; preds = %1
br label %44
27: ; preds = %1
br label %44
28: ; preds = %1
br label %44
29: ; preds = %1
br label %44
30: ; preds = %1
br label %44
31: ; preds = %1
br label %44
32: ; preds = %1
br label %44
33: ; preds = %1
br label %44
34: ; preds = %1
br label %44
35: ; preds = %1
br label %44
36: ; preds = %1
br label %44
37: ; preds = %1
br label %44
38: ; preds = %1
br label %44
39: ; preds = %1
br label %44
40: ; preds = %1
br label %44
41: ; preds = %1
br label %44
42: ; preds = %1
br label %44
43: ; preds = %1
br label %44
44: ; preds = %1, %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, %7, %6, %5, %4, %3, %2
%45 = phi i8* [ null, %43 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.41, i64 0, i64 0), %42 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.40, i64 0, i64 0), %41 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.39, i64 0, i64 0), %40 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.38, i64 0, i64 0), %39 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.37, i64 0, i64 0), %38 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.36, i64 0, i64 0), %37 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.35, i64 0, i64 0), %36 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0), %35 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.33, i64 0, i64 0), %34 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0), %33 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.31, i64 0, i64 0), %32 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.30, i64 0, i64 0), %31 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.29, i64 0, i64 0), %30 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.28, i64 0, i64 0), %29 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.27, i64 0, i64 0), %28 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i64 0, i64 0), %27 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), %26 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0), %25 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %45
}