char *ADSerrorText(int err) {
  switch (err) {
  case 0:
    return "ok";
  case 0x0001:
    return "Internal error";
  case 0x0002:
    return "No Rtime";
  case 0x0003:
    return "Allocation locked memory error";
  case 0x0004:
    return "Insert mailbox error";
  case 0x0005:
    return "Wrong receive HMSG";
  case 0x0006:
    return "target port not found";
  case 0x0007:
    return "target machine not found";
  case 0x0008:
    return "unknown command ID";
  case 0x0009:
    return "Bad task ID";
  case 0x000A:
    return "No IO";
  case 0x000B:
    return "unknown AMS command";
  case 0x000C:
    return "Win 32 error";
  case 0x000D:
    return "port not connected";
  case 0x000E:
    return "invalid AMS length";
  case 0x000F:
    return "invalid AMS Net ID";
  case 0x0010:
    return "Low installation level";
  case 0x0011:
    return "No debug available";
  case 0x0012:
    return "Port disabled";
  case 0x0013:
    return "Port already connected";
  case 0x0014:
    return "AMS Sync Win 32 error";
  case 0x0015:
    return "AMS Sync timeout";
  case 0x0016:
    return "AMS Sync AMS error";
  case 0x0017:
    return "AMS Sync no index map";
  case 0x0018:
    return "Invalid AMS port";
  case 0x0019:
    return "No memory";
  case 0x001A:
    return "TCP send error";
  case 0x001B:
    return "Host unreachable";
  case 0x0500:
    return "Router: no locked memory";
  case 0x0502:
    return "Router: mailbox full";
  case 0x050a:
    return "Router: not (yet) active";
  case 0x0700:
    return "error class <device error>??";
  case 0x0701:
    return "service is not supported by server";
  case 0x0702:
    return "invalid index group";
  case 0x0703:
    return "invalid index offset";
  case 0x0704:
    return "reading/writing not permitted";
  case 0x0705:
    return "parameter size not correct";
  case 0x0706:
    return "invalid parameter value(s)";
  case 0x0707:
    return "device is not in a ready state";
  case 0x0708:
    return "device is busy";
  case 0x0709:
    return "invalid context. (must be in Windows ?)";
  case 0x070A:
    return "out of memory";
  case 0x070B:
    return "invalid parameter value(s)";
  case 0x070C:
    return "not found (files,...)";
  case 0x070D:
    return "syntax error in command or file";
  case 0x070E:
    return "objects do not match";
  case 0x070F:
    return "object already exists";
  case 0x0710:
    return "symbol not found";
  case 0x0711:
    return "symbol version invalid";
  case 0x0712:
    return "server is in invalid state";
  case 0x0713:
    return "AdsTransMode not supported";
  case 0x0714:
    return "Notification handle is invalid";
  case 0x0715:
    return "Notification client not registered";
  case 0x0716:
    return "No more notification handles";
  case 0x0717:
    return "Size for watch too big";
  case 0x0718:
    return "device not initialized";
  case 0x0719:
    return "device has a timeout";
  case 0x0740:
    return "error class <client error>??";
  case 0x0741:
    return "invalid parameter at service";
  case 0x0742:
    return "polling list is empty";
  case 0x0743:
    return "var connection already in use";
  case 0x0744:
    return "invoke ID in use";
  case 0x0745:
    return "timeout elapsed";
  case 0x0746:
    return "error in win32 subsystem";
  case 0x0748:
    return "ads port not opened";
  case 0x0750:
    return "internal error in ads sync";
  case 0x0751:
    return "Hash table overflow";
  case 0x0752:
    return "key not found in hash";
  case 0x0753:
    return "no more symbols in cache";
  case 0x0754:
    return "invalid response received";
  case 0x0755:
    return "Sync port locked";
  case 0x274c:
    return "A socket operation was attempted to an unreachable host";
  case 0x274d:
    return "A connection attempt failed";
  default:
    return "Unknown error code";
  }
}


x86 assembly (clang, -O0):
<ADSerrorText>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     163c <ADSerrorText+0x53c>
jmp    111a <ADSerrorText+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     164c <ADSerrorText+0x54c>
jmp    112b <ADSerrorText+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     165c <ADSerrorText+0x55c>
jmp    113c <ADSerrorText+0x3c>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     166c <ADSerrorText+0x56c>
jmp    114d <ADSerrorText+0x4d>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     167c <ADSerrorText+0x57c>
jmp    115e <ADSerrorText+0x5e>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
je     168c <ADSerrorText+0x58c>
jmp    116f <ADSerrorText+0x6f>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
je     169c <ADSerrorText+0x59c>
jmp    1180 <ADSerrorText+0x80>
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
je     16ac <ADSerrorText+0x5ac>
jmp    1191 <ADSerrorText+0x91>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     16bc <ADSerrorText+0x5bc>
jmp    11a2 <ADSerrorText+0xa2>
mov    -0x10(%rbp),%eax
sub    $0x9,%eax
je     16cc <ADSerrorText+0x5cc>
jmp    11b3 <ADSerrorText+0xb3>
mov    -0x10(%rbp),%eax
sub    $0xa,%eax
je     16dc <ADSerrorText+0x5dc>
jmp    11c4 <ADSerrorText+0xc4>
mov    -0x10(%rbp),%eax
sub    $0xb,%eax
je     16ec <ADSerrorText+0x5ec>
jmp    11d5 <ADSerrorText+0xd5>
mov    -0x10(%rbp),%eax
sub    $0xc,%eax
je     16fc <ADSerrorText+0x5fc>
jmp    11e6 <ADSerrorText+0xe6>
mov    -0x10(%rbp),%eax
sub    $0xd,%eax
je     170c <ADSerrorText+0x60c>
jmp    11f7 <ADSerrorText+0xf7>
mov    -0x10(%rbp),%eax
sub    $0xe,%eax
je     171c <ADSerrorText+0x61c>
jmp    1208 <ADSerrorText+0x108>
mov    -0x10(%rbp),%eax
sub    $0xf,%eax
je     172c <ADSerrorText+0x62c>
jmp    1219 <ADSerrorText+0x119>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     173c <ADSerrorText+0x63c>
jmp    122a <ADSerrorText+0x12a>
mov    -0x10(%rbp),%eax
sub    $0x11,%eax
je     174c <ADSerrorText+0x64c>
jmp    123b <ADSerrorText+0x13b>
mov    -0x10(%rbp),%eax
sub    $0x12,%eax
je     175c <ADSerrorText+0x65c>
jmp    124c <ADSerrorText+0x14c>
mov    -0x10(%rbp),%eax
sub    $0x13,%eax
je     176c <ADSerrorText+0x66c>
jmp    125d <ADSerrorText+0x15d>
mov    -0x10(%rbp),%eax
sub    $0x14,%eax
je     177c <ADSerrorText+0x67c>
jmp    126e <ADSerrorText+0x16e>
mov    -0x10(%rbp),%eax
sub    $0x15,%eax
je     178c <ADSerrorText+0x68c>
jmp    127f <ADSerrorText+0x17f>
mov    -0x10(%rbp),%eax
sub    $0x16,%eax
je     179c <ADSerrorText+0x69c>
jmp    1290 <ADSerrorText+0x190>
mov    -0x10(%rbp),%eax
sub    $0x17,%eax
je     17ac <ADSerrorText+0x6ac>
jmp    12a1 <ADSerrorText+0x1a1>
mov    -0x10(%rbp),%eax
sub    $0x18,%eax
je     17bc <ADSerrorText+0x6bc>
jmp    12b2 <ADSerrorText+0x1b2>
mov    -0x10(%rbp),%eax
sub    $0x19,%eax
je     17cc <ADSerrorText+0x6cc>
jmp    12c3 <ADSerrorText+0x1c3>
mov    -0x10(%rbp),%eax
sub    $0x1a,%eax
je     17dc <ADSerrorText+0x6dc>
jmp    12d4 <ADSerrorText+0x1d4>
mov    -0x10(%rbp),%eax
sub    $0x1b,%eax
je     17ec <ADSerrorText+0x6ec>
jmp    12e5 <ADSerrorText+0x1e5>
mov    -0x10(%rbp),%eax
sub    $0x500,%eax
je     17fc <ADSerrorText+0x6fc>
jmp    12f8 <ADSerrorText+0x1f8>
mov    -0x10(%rbp),%eax
sub    $0x502,%eax
je     180c <ADSerrorText+0x70c>
jmp    130b <ADSerrorText+0x20b>
mov    -0x10(%rbp),%eax
sub    $0x50a,%eax
je     181c <ADSerrorText+0x71c>
jmp    131e <ADSerrorText+0x21e>
mov    -0x10(%rbp),%eax
sub    $0x700,%eax
je     182c <ADSerrorText+0x72c>
jmp    1331 <ADSerrorText+0x231>
mov    -0x10(%rbp),%eax
sub    $0x701,%eax
je     183c <ADSerrorText+0x73c>
jmp    1344 <ADSerrorText+0x244>
mov    -0x10(%rbp),%eax
sub    $0x702,%eax
je     184c <ADSerrorText+0x74c>
jmp    1357 <ADSerrorText+0x257>
mov    -0x10(%rbp),%eax
sub    $0x703,%eax
je     185c <ADSerrorText+0x75c>
jmp    136a <ADSerrorText+0x26a>
mov    -0x10(%rbp),%eax
sub    $0x704,%eax
je     186c <ADSerrorText+0x76c>
jmp    137d <ADSerrorText+0x27d>
mov    -0x10(%rbp),%eax
sub    $0x705,%eax
je     187c <ADSerrorText+0x77c>
jmp    1390 <ADSerrorText+0x290>
mov    -0x10(%rbp),%eax
sub    $0x706,%eax
je     188c <ADSerrorText+0x78c>
jmp    13a3 <ADSerrorText+0x2a3>
mov    -0x10(%rbp),%eax
sub    $0x707,%eax
je     189c <ADSerrorText+0x79c>
jmp    13b6 <ADSerrorText+0x2b6>
mov    -0x10(%rbp),%eax
sub    $0x708,%eax
je     18ac <ADSerrorText+0x7ac>
jmp    13c9 <ADSerrorText+0x2c9>
mov    -0x10(%rbp),%eax
sub    $0x709,%eax
je     18bc <ADSerrorText+0x7bc>
jmp    13dc <ADSerrorText+0x2dc>
mov    -0x10(%rbp),%eax
sub    $0x70a,%eax
je     18cc <ADSerrorText+0x7cc>
jmp    13ef <ADSerrorText+0x2ef>
mov    -0x10(%rbp),%eax
sub    $0x70b,%eax
je     18dc <ADSerrorText+0x7dc>
jmp    1402 <ADSerrorText+0x302>
mov    -0x10(%rbp),%eax
sub    $0x70c,%eax
je     18ec <ADSerrorText+0x7ec>
jmp    1415 <ADSerrorText+0x315>
mov    -0x10(%rbp),%eax
sub    $0x70d,%eax
je     18fc <ADSerrorText+0x7fc>
jmp    1428 <ADSerrorText+0x328>
mov    -0x10(%rbp),%eax
sub    $0x70e,%eax
je     190c <ADSerrorText+0x80c>
jmp    143b <ADSerrorText+0x33b>
mov    -0x10(%rbp),%eax
sub    $0x70f,%eax
je     191c <ADSerrorText+0x81c>
jmp    144e <ADSerrorText+0x34e>
mov    -0x10(%rbp),%eax
sub    $0x710,%eax
je     192c <ADSerrorText+0x82c>
jmp    1461 <ADSerrorText+0x361>
mov    -0x10(%rbp),%eax
sub    $0x711,%eax
je     193c <ADSerrorText+0x83c>
jmp    1474 <ADSerrorText+0x374>
mov    -0x10(%rbp),%eax
sub    $0x712,%eax
je     194c <ADSerrorText+0x84c>
jmp    1487 <ADSerrorText+0x387>
mov    -0x10(%rbp),%eax
sub    $0x713,%eax
je     195c <ADSerrorText+0x85c>
jmp    149a <ADSerrorText+0x39a>
mov    -0x10(%rbp),%eax
sub    $0x714,%eax
je     196c <ADSerrorText+0x86c>
jmp    14ad <ADSerrorText+0x3ad>
mov    -0x10(%rbp),%eax
sub    $0x715,%eax
je     197c <ADSerrorText+0x87c>
jmp    14c0 <ADSerrorText+0x3c0>
mov    -0x10(%rbp),%eax
sub    $0x716,%eax
je     198c <ADSerrorText+0x88c>
jmp    14d3 <ADSerrorText+0x3d3>
mov    -0x10(%rbp),%eax
sub    $0x717,%eax
je     199c <ADSerrorText+0x89c>
jmp    14e6 <ADSerrorText+0x3e6>
mov    -0x10(%rbp),%eax
sub    $0x718,%eax
je     19ac <ADSerrorText+0x8ac>
jmp    14f9 <ADSerrorText+0x3f9>
mov    -0x10(%rbp),%eax
sub    $0x719,%eax
je     19bc <ADSerrorText+0x8bc>
jmp    150c <ADSerrorText+0x40c>
mov    -0x10(%rbp),%eax
sub    $0x740,%eax
je     19cc <ADSerrorText+0x8cc>
jmp    151f <ADSerrorText+0x41f>
mov    -0x10(%rbp),%eax
sub    $0x741,%eax
je     19dc <ADSerrorText+0x8dc>
jmp    1532 <ADSerrorText+0x432>
mov    -0x10(%rbp),%eax
sub    $0x742,%eax
je     19ec <ADSerrorText+0x8ec>
jmp    1545 <ADSerrorText+0x445>
mov    -0x10(%rbp),%eax
sub    $0x743,%eax
je     19fc <ADSerrorText+0x8fc>
jmp    1558 <ADSerrorText+0x458>
mov    -0x10(%rbp),%eax
sub    $0x744,%eax
je     1a0c <ADSerrorText+0x90c>
jmp    156b <ADSerrorText+0x46b>
mov    -0x10(%rbp),%eax
sub    $0x745,%eax
je     1a1c <ADSerrorText+0x91c>
jmp    157e <ADSerrorText+0x47e>
mov    -0x10(%rbp),%eax
sub    $0x746,%eax
je     1a2c <ADSerrorText+0x92c>
jmp    1591 <ADSerrorText+0x491>
mov    -0x10(%rbp),%eax
sub    $0x748,%eax
je     1a3c <ADSerrorText+0x93c>
jmp    15a4 <ADSerrorText+0x4a4>
mov    -0x10(%rbp),%eax
sub    $0x750,%eax
je     1a4c <ADSerrorText+0x94c>
jmp    15b7 <ADSerrorText+0x4b7>
mov    -0x10(%rbp),%eax
sub    $0x751,%eax
je     1a5c <ADSerrorText+0x95c>
jmp    15ca <ADSerrorText+0x4ca>
mov    -0x10(%rbp),%eax
sub    $0x752,%eax
je     1a6c <ADSerrorText+0x96c>
jmp    15dd <ADSerrorText+0x4dd>
mov    -0x10(%rbp),%eax
sub    $0x753,%eax
je     1a7c <ADSerrorText+0x97c>
jmp    15f0 <ADSerrorText+0x4f0>
mov    -0x10(%rbp),%eax
sub    $0x754,%eax
je     1a8c <ADSerrorText+0x98c>
jmp    1603 <ADSerrorText+0x503>
mov    -0x10(%rbp),%eax
sub    $0x755,%eax
je     1a9c <ADSerrorText+0x99c>
jmp    1616 <ADSerrorText+0x516>
mov    -0x10(%rbp),%eax
sub    $0x274c,%eax
je     1aac <ADSerrorText+0x9ac>
jmp    1629 <ADSerrorText+0x529>
mov    -0x10(%rbp),%eax
sub    $0x274d,%eax
je     1abc <ADSerrorText+0x9bc>
jmp    1acc <ADSerrorText+0x9cc>
lea    0x9bd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9b0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9af(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9a8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9b7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9bc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9bf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9c5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9ce(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9d1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9cd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9c3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa58(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9b7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9ba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9bd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9c0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9c7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9ca(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9c8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9cf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9d5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9d6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9d9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9df(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9e0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9da(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9d9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9da(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9e3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9e8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9f1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9fe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa11(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa15(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa1a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa28(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa33(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa3e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa4d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa4c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0x9e3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa52(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa58(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa68(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa6d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa73(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa74(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa7b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa86(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xa91(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xaa0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xab3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xac0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xac7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xace(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xad3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xae0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xaed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xaf3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb01(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb02(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb02(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb0b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb0f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb1a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb1e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb24(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb2d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb37(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb38(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb60(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1ad7 <ADSerrorText+0x9d7>
lea    0xb6c(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADSerrorText>:
cmp    $0x6ff,%edi
jle    112b <ADSerrorText+0x2b>
lea    -0x700(%rdi),%eax
cmp    $0x55,%eax
ja     1181 <ADSerrorText+0x81>
lea    0xf56(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1364(%rip),%rax
ret
cmp    $0x4ff,%edi
jg     1159 <ADSerrorText+0x59>
cmp    $0x1b,%edi
ja     119d <ADSerrorText+0x9d>
lea    0x1089(%rip),%rax
mov    %edi,%ecx
lea    0xeb8(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x1073(%rip),%rax
ret
cmp    $0x500,%edi
je     13a5 <ADSerrorText+0x2a5>
cmp    $0x502,%edi
je     13ad <ADSerrorText+0x2ad>
cmp    $0x50a,%edi
jne    119d <ADSerrorText+0x9d>
lea    0x1253(%rip),%rax
ret
cmp    $0x274c,%edi
je     13b5 <ADSerrorText+0x2b5>
cmp    $0x274d,%edi
jne    119d <ADSerrorText+0x9d>
lea    0x164f(%rip),%rax
ret
lea    0x1663(%rip),%rax
ret
lea    0x1240(%rip),%rax
ret
lea    0x1255(%rip),%rax
ret
lea    0x1270(%rip),%rax
ret
lea    0x127c(%rip),%rax
ret
lea    0x1289(%rip),%rax
ret
lea    0x129f(%rip),%rax
ret
lea    0x12cd(%rip),%rax
ret
lea    0x12e4(%rip),%rax
ret
lea    0x12eb(%rip),%rax
ret
lea    0x130b(%rip),%rax
ret
lea    0x1311(%rip),%rax
ret
lea    0x131f(%rip),%rax
ret
lea    0x1337(%rip),%rax
ret
lea    0x1344(%rip),%rax
ret
lea    0x1352(%rip),%rax
ret
lea    0x135b(%rip),%rax
ret
lea    0x136a(%rip),%rax
ret
lea    0x137d(%rip),%rax
ret
lea    0x1390(%rip),%rax
ret
lea    0x13a7(%rip),%rax
ret
lea    0x13c2(%rip),%rax
ret
lea    0x13d7(%rip),%rax
ret
lea    0x13e6(%rip),%rax
ret
lea    0x13f5(%rip),%rax
ret
lea    0x1402(%rip),%rax
ret
lea    0x1417(%rip),%rax
ret
lea    0x142c(%rip),%rax
ret
lea    0x143a(%rip),%rax
ret
lea    0x1450(%rip),%rax
ret
lea    0x1459(%rip),%rax
ret
lea    0x1461(%rip),%rax
ret
lea    0x1472(%rip),%rax
ret
lea    0x147e(%rip),%rax
ret
lea    0x1491(%rip),%rax
ret
lea    0x149d(%rip),%rax
ret
lea    0x14ab(%rip),%rax
ret
lea    0x14bc(%rip),%rax
ret
lea    0x14ce(%rip),%rax
ret
lea    0xefe(%rip),%rax
ret
lea    0xeff(%rip),%rax
ret
lea    0xf16(%rip),%rax
ret
lea    0xf23(%rip),%rax
ret
lea    0xf2e(%rip),%rax
ret
lea    0xf3c(%rip),%rax
ret
lea    0xf4d(%rip),%rax
ret
lea    0xf58(%rip),%rax
ret
lea    0xf5c(%rip),%rax
ret
lea    0xf5a(%rip),%rax
ret
lea    0xff7(%rip),%rax
ret
lea    0xf5e(%rip),%rax
ret
lea    0xf69(%rip),%rax
ret
lea    0xf74(%rip),%rax
ret
lea    0xf7f(%rip),%rax
ret
lea    0xf8e(%rip),%rax
ret
lea    0xf99(%rip),%rax
ret
lea    0xf9f(%rip),%rax
ret
lea    0xfae(%rip),%rax
ret
lea    0xfbc(%rip),%rax
ret
lea    0xfc5(%rip),%rax
ret
lea    0xfd0(%rip),%rax
ret
lea    0xfde(%rip),%rax
ret
lea    0xfe7(%rip),%rax
ret
lea    0xfe9(%rip),%rax
ret
lea    0xff0(%rip),%rax
ret
lea    0xff9(%rip),%rax
ret
lea    0x100a(%rip),%rax
ret
lea    0x13f7(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ok\00"
@.str.1 = [15 x i8] c"Internal error\00"
@.str.2 = [9 x i8] c"No Rtime\00"
@.str.3 = [31 x i8] c"Allocation locked memory error\00"
@.str.4 = [21 x i8] c"Insert mailbox error\00"
@.str.5 = [19 x i8] c"Wrong receive HMSG\00"
@.str.6 = [22 x i8] c"target port not found\00"
@.str.7 = [25 x i8] c"target machine not found\00"
@.str.8 = [19 x i8] c"unknown command ID\00"
@.str.9 = [12 x i8] c"Bad task ID\00"
@.str.10 = [6 x i8] c"No IO\00"
@.str.11 = [20 x i8] c"unknown AMS command\00"
@.str.12 = [13 x i8] c"Win 32 error\00"
@.str.13 = [19 x i8] c"port not connected\00"
@.str.14 = [19 x i8] c"invalid AMS length\00"
@.str.15 = [19 x i8] c"invalid AMS Net ID\00"
@.str.16 = [23 x i8] c"Low installation level\00"
@.str.17 = [19 x i8] c"No debug available\00"
@.str.18 = [14 x i8] c"Port disabled\00"
@.str.19 = [23 x i8] c"Port already connected\00"
@.str.20 = [22 x i8] c"AMS Sync Win 32 error\00"
@.str.21 = [17 x i8] c"AMS Sync timeout\00"
@.str.22 = [19 x i8] c"AMS Sync AMS error\00"
@.str.23 = [22 x i8] c"AMS Sync no index map\00"
@.str.24 = [17 x i8] c"Invalid AMS port\00"
@.str.25 = [10 x i8] c"No memory\00"
@.str.26 = [15 x i8] c"TCP send error\00"
@.str.27 = [17 x i8] c"Host unreachable\00"
@.str.28 = [25 x i8] c"Router: no locked memory\00"
@.str.29 = [21 x i8] c"Router: mailbox full\00"
@.str.30 = [25 x i8] c"Router: not (yet) active\00"
@.str.31 = [29 x i8] c"error class <device error>??\00"
@.str.32 = [35 x i8] c"service is not supported by server\00"
@.str.33 = [20 x i8] c"invalid index group\00"
@.str.34 = [21 x i8] c"invalid index offset\00"
@.str.35 = [30 x i8] c"reading/writing not permitted\00"
@.str.36 = [27 x i8] c"parameter size not correct\00"
@.str.37 = [27 x i8] c"invalid parameter value(s)\00"
@.str.38 = [31 x i8] c"device is not in a ready state\00"
@.str.39 = [15 x i8] c"device is busy\00"
@.str.40 = [40 x i8] c"invalid context. (must be in Windows ?)\00"
@.str.41 = [14 x i8] c"out of memory\00"
@.str.42 = [22 x i8] c"not found (files,...)\00"
@.str.43 = [32 x i8] c"syntax error in command or file\00"
@.str.44 = [21 x i8] c"objects do not match\00"
@.str.45 = [22 x i8] c"object already exists\00"
@.str.46 = [17 x i8] c"symbol not found\00"
@.str.47 = [23 x i8] c"symbol version invalid\00"
@.str.48 = [27 x i8] c"server is in invalid state\00"
@.str.49 = [27 x i8] c"AdsTransMode not supported\00"
@.str.50 = [31 x i8] c"Notification handle is invalid\00"
@.str.51 = [35 x i8] c"Notification client not registered\00"
@.str.52 = [29 x i8] c"No more notification handles\00"
@.str.53 = [23 x i8] c"Size for watch too big\00"
@.str.54 = [23 x i8] c"device not initialized\00"
@.str.55 = [21 x i8] c"device has a timeout\00"
@.str.56 = [29 x i8] c"error class <client error>??\00"
@.str.57 = [29 x i8] c"invalid parameter at service\00"
@.str.58 = [22 x i8] c"polling list is empty\00"
@.str.59 = [30 x i8] c"var connection already in use\00"
@.str.60 = [17 x i8] c"invoke ID in use\00"
@.str.61 = [16 x i8] c"timeout elapsed\00"
@.str.62 = [25 x i8] c"error in win32 subsystem\00"
@.str.63 = [20 x i8] c"ads port not opened\00"
@.str.64 = [27 x i8] c"internal error in ads sync\00"
@.str.65 = [20 x i8] c"Hash table overflow\00"
@.str.66 = [22 x i8] c"key not found in hash\00"
@.str.67 = [25 x i8] c"no more symbols in cache\00"
@.str.68 = [26 x i8] c"invalid response received\00"
@.str.69 = [17 x i8] c"Sync port locked\00"
@.str.70 = [56 x i8] c"A socket operation was attempted to an unreachable host\00"
@.str.71 = [28 x i8] c"A connection attempt failed\00"
@.str.72 = [19 x i8] c"Unknown error code\00"
define i8* @ADSerrorText(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %78 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
i32 10, label %15
i32 11, label %16
i32 12, label %17
i32 13, label %18
i32 14, label %19
i32 15, label %20
i32 16, label %21
i32 17, label %22
i32 18, label %23
i32 19, label %24
i32 20, label %25
i32 21, label %26
i32 22, label %27
i32 23, label %28
i32 24, label %29
i32 25, label %30
i32 26, label %31
i32 27, label %32
i32 1280, label %33
i32 1282, label %34
i32 1290, label %35
i32 1792, label %36
i32 1793, label %37
i32 1794, label %38
i32 1795, label %39
i32 1796, label %40
i32 1797, label %41
i32 1798, label %42
i32 1799, label %43
i32 1800, label %44
i32 1801, label %45
i32 1802, label %46
i32 1803, label %47
i32 1804, label %48
i32 1805, label %49
i32 1806, label %50
i32 1807, label %51
i32 1808, label %52
i32 1809, label %53
i32 1810, label %54
i32 1811, label %55
i32 1812, label %56
i32 1813, label %57
i32 1814, label %58
i32 1815, label %59
i32 1816, label %60
i32 1817, label %61
i32 1856, label %62
i32 1857, label %63
i32 1858, label %64
i32 1859, label %65
i32 1860, label %66
i32 1861, label %67
i32 1862, label %68
i32 1864, label %69
i32 1872, label %70
i32 1873, label %71
i32 1874, label %72
i32 1875, label %73
i32 1876, label %74
i32 1877, label %75
i32 10060, label %76
i32 10061, label %77
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %79
6: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %79
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %79
8: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %79
9: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %79
10: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %79
11: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %79
12: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %79
13: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %79
14: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %79
15: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %79
16: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %79
17: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %79
18: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %79
19: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %79
20: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %79
21: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %79
22: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %79
23: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %79
24: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %79
25: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %79
26: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %79
27: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %79
28: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %79
29: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %79
30: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %79
31: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i64 0, i64 0), i8** %2
br label %79
32: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.27, i64 0, i64 0), i8** %2
br label %79
33: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.28, i64 0, i64 0), i8** %2
br label %79
34: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0), i8** %2
br label %79
35: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), i8** %2
br label %79
36: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.31, i64 0, i64 0), i8** %2
br label %79
37: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.32, i64 0, i64 0), i8** %2
br label %79
38: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.33, i64 0, i64 0), i8** %2
br label %79
39: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.34, i64 0, i64 0), i8** %2
br label %79
40: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.35, i64 0, i64 0), i8** %2
br label %79
41: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.36, i64 0, i64 0), i8** %2
br label %79
42: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.37, i64 0, i64 0), i8** %2
br label %79
43: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.38, i64 0, i64 0), i8** %2
br label %79
44: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.39, i64 0, i64 0), i8** %2
br label %79
45: ; preds = %1
store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.40, i64 0, i64 0), i8** %2
br label %79
46: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.41, i64 0, i64 0), i8** %2
br label %79
47: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.37, i64 0, i64 0), i8** %2
br label %79
48: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.42, i64 0, i64 0), i8** %2
br label %79
49: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.43, i64 0, i64 0), i8** %2
br label %79
50: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.44, i64 0, i64 0), i8** %2
br label %79
51: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.45, i64 0, i64 0), i8** %2
br label %79
52: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.46, i64 0, i64 0), i8** %2
br label %79
53: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.47, i64 0, i64 0), i8** %2
br label %79
54: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.48, i64 0, i64 0), i8** %2
br label %79
55: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.49, i64 0, i64 0), i8** %2
br label %79
56: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.50, i64 0, i64 0), i8** %2
br label %79
57: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.51, i64 0, i64 0), i8** %2
br label %79
58: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.52, i64 0, i64 0), i8** %2
br label %79
59: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.53, i64 0, i64 0), i8** %2
br label %79
60: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.54, i64 0, i64 0), i8** %2
br label %79
61: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.55, i64 0, i64 0), i8** %2
br label %79
62: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.56, i64 0, i64 0), i8** %2
br label %79
63: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.57, i64 0, i64 0), i8** %2
br label %79
64: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.58, i64 0, i64 0), i8** %2
br label %79
65: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.59, i64 0, i64 0), i8** %2
br label %79
66: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.60, i64 0, i64 0), i8** %2
br label %79
67: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.61, i64 0, i64 0), i8** %2
br label %79
68: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.62, i64 0, i64 0), i8** %2
br label %79
69: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.63, i64 0, i64 0), i8** %2
br label %79
70: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.64, i64 0, i64 0), i8** %2
br label %79
71: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.65, i64 0, i64 0), i8** %2
br label %79
72: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.66, i64 0, i64 0), i8** %2
br label %79
73: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.67, i64 0, i64 0), i8** %2
br label %79
74: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.68, i64 0, i64 0), i8** %2
br label %79
75: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.69, i64 0, i64 0), i8** %2
br label %79
76: ; preds = %1
store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.70, i64 0, i64 0), i8** %2
br label %79
77: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.71, i64 0, i64 0), i8** %2
br label %79
78: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.72, i64 0, i64 0), i8** %2
br label %79
79: ; preds = %78, %77, %76, %75, %74, %73, %72, %71, %70, %69, %68, %67, %66, %65, %64, %63, %62, %61, %60, %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, %7, %6, %5
%80 = load i8*, i8** %2
ret i8* %80
}

LLVM IR (-O2):
@.str = [3 x i8] c"ok\00"
@.str.1 = [15 x i8] c"Internal error\00"
@.str.2 = [9 x i8] c"No Rtime\00"
@.str.3 = [31 x i8] c"Allocation locked memory error\00"
@.str.4 = [21 x i8] c"Insert mailbox error\00"
@.str.5 = [19 x i8] c"Wrong receive HMSG\00"
@.str.6 = [22 x i8] c"target port not found\00"
@.str.7 = [25 x i8] c"target machine not found\00"
@.str.8 = [19 x i8] c"unknown command ID\00"
@.str.9 = [12 x i8] c"Bad task ID\00"
@.str.10 = [6 x i8] c"No IO\00"
@.str.11 = [20 x i8] c"unknown AMS command\00"
@.str.12 = [13 x i8] c"Win 32 error\00"
@.str.13 = [19 x i8] c"port not connected\00"
@.str.14 = [19 x i8] c"invalid AMS length\00"
@.str.15 = [19 x i8] c"invalid AMS Net ID\00"
@.str.16 = [23 x i8] c"Low installation level\00"
@.str.17 = [19 x i8] c"No debug available\00"
@.str.18 = [14 x i8] c"Port disabled\00"
@.str.19 = [23 x i8] c"Port already connected\00"
@.str.20 = [22 x i8] c"AMS Sync Win 32 error\00"
@.str.21 = [17 x i8] c"AMS Sync timeout\00"
@.str.22 = [19 x i8] c"AMS Sync AMS error\00"
@.str.23 = [22 x i8] c"AMS Sync no index map\00"
@.str.24 = [17 x i8] c"Invalid AMS port\00"
@.str.25 = [10 x i8] c"No memory\00"
@.str.26 = [15 x i8] c"TCP send error\00"
@.str.27 = [17 x i8] c"Host unreachable\00"
@.str.28 = [25 x i8] c"Router: no locked memory\00"
@.str.29 = [21 x i8] c"Router: mailbox full\00"
@.str.30 = [25 x i8] c"Router: not (yet) active\00"
@.str.31 = [29 x i8] c"error class <device error>??\00"
@.str.32 = [35 x i8] c"service is not supported by server\00"
@.str.33 = [20 x i8] c"invalid index group\00"
@.str.34 = [21 x i8] c"invalid index offset\00"
@.str.35 = [30 x i8] c"reading/writing not permitted\00"
@.str.36 = [27 x i8] c"parameter size not correct\00"
@.str.37 = [27 x i8] c"invalid parameter value(s)\00"
@.str.38 = [31 x i8] c"device is not in a ready state\00"
@.str.39 = [15 x i8] c"device is busy\00"
@.str.40 = [40 x i8] c"invalid context. (must be in Windows ?)\00"
@.str.41 = [14 x i8] c"out of memory\00"
@.str.42 = [22 x i8] c"not found (files,...)\00"
@.str.43 = [32 x i8] c"syntax error in command or file\00"
@.str.44 = [21 x i8] c"objects do not match\00"
@.str.45 = [22 x i8] c"object already exists\00"
@.str.46 = [17 x i8] c"symbol not found\00"
@.str.47 = [23 x i8] c"symbol version invalid\00"
@.str.48 = [27 x i8] c"server is in invalid state\00"
@.str.49 = [27 x i8] c"AdsTransMode not supported\00"
@.str.50 = [31 x i8] c"Notification handle is invalid\00"
@.str.51 = [35 x i8] c"Notification client not registered\00"
@.str.52 = [29 x i8] c"No more notification handles\00"
@.str.53 = [23 x i8] c"Size for watch too big\00"
@.str.54 = [23 x i8] c"device not initialized\00"
@.str.55 = [21 x i8] c"device has a timeout\00"
@.str.56 = [29 x i8] c"error class <client error>??\00"
@.str.57 = [29 x i8] c"invalid parameter at service\00"
@.str.58 = [22 x i8] c"polling list is empty\00"
@.str.59 = [30 x i8] c"var connection already in use\00"
@.str.60 = [17 x i8] c"invoke ID in use\00"
@.str.61 = [16 x i8] c"timeout elapsed\00"
@.str.62 = [25 x i8] c"error in win32 subsystem\00"
@.str.63 = [20 x i8] c"ads port not opened\00"
@.str.64 = [27 x i8] c"internal error in ads sync\00"
@.str.65 = [20 x i8] c"Hash table overflow\00"
@.str.66 = [22 x i8] c"key not found in hash\00"
@.str.67 = [25 x i8] c"no more symbols in cache\00"
@.str.68 = [26 x i8] c"invalid response received\00"
@.str.69 = [17 x i8] c"Sync port locked\00"
@.str.70 = [56 x i8] c"A socket operation was attempted to an unreachable host\00"
@.str.71 = [28 x i8] c"A connection attempt failed\00"
@.str.72 = [19 x i8] c"Unknown error code\00"
define i8* @ADSerrorText(i32 %0) {
switch i32 %0, label %74 [
i32 0, label %75
i32 1, label %2
i32 2, label %3
i32 3, label %4
i32 4, label %5
i32 5, label %6
i32 6, label %7
i32 7, label %8
i32 8, label %9
i32 9, label %10
i32 10, label %11
i32 11, label %12
i32 12, label %13
i32 13, label %14
i32 14, label %15
i32 15, label %16
i32 16, 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 25, label %26
i32 26, label %27
i32 27, label %28
i32 1280, label %29
i32 1282, label %30
i32 1290, label %31
i32 1792, label %32
i32 1793, label %33
i32 1794, label %34
i32 1795, label %35
i32 1796, label %36
i32 1797, label %37
i32 1798, label %38
i32 1799, label %39
i32 1800, label %40
i32 1801, label %41
i32 1802, label %42
i32 1803, label %43
i32 1804, label %44
i32 1805, label %45
i32 1806, label %46
i32 1807, label %47
i32 1808, label %48
i32 1809, label %49
i32 1810, label %50
i32 1811, label %51
i32 1812, label %52
i32 1813, label %53
i32 1814, label %54
i32 1815, label %55
i32 1816, label %56
i32 1817, label %57
i32 1856, label %58
i32 1857, label %59
i32 1858, label %60
i32 1859, label %61
i32 1860, label %62
i32 1861, label %63
i32 1862, label %64
i32 1864, label %65
i32 1872, label %66
i32 1873, label %67
i32 1874, label %68
i32 1875, label %69
i32 1876, label %70
i32 1877, label %71
i32 10060, label %72
i32 10061, label %73
]
2: ; preds = %1
br label %75
3: ; preds = %1
br label %75
4: ; preds = %1
br label %75
5: ; preds = %1
br label %75
6: ; preds = %1
br label %75
7: ; preds = %1
br label %75
8: ; preds = %1
br label %75
9: ; preds = %1
br label %75
10: ; preds = %1
br label %75
11: ; preds = %1
br label %75
12: ; preds = %1
br label %75
13: ; preds = %1
br label %75
14: ; preds = %1
br label %75
15: ; preds = %1
br label %75
16: ; preds = %1
br label %75
17: ; preds = %1
br label %75
18: ; preds = %1
br label %75
19: ; preds = %1
br label %75
20: ; preds = %1
br label %75
21: ; preds = %1
br label %75
22: ; preds = %1
br label %75
23: ; preds = %1
br label %75
24: ; preds = %1
br label %75
25: ; preds = %1
br label %75
26: ; preds = %1
br label %75
27: ; preds = %1
br label %75
28: ; preds = %1
br label %75
29: ; preds = %1
br label %75
30: ; preds = %1
br label %75
31: ; preds = %1
br label %75
32: ; preds = %1
br label %75
33: ; preds = %1
br label %75
34: ; preds = %1
br label %75
35: ; preds = %1
br label %75
36: ; preds = %1
br label %75
37: ; preds = %1
br label %75
38: ; preds = %1
br label %75
39: ; preds = %1
br label %75
40: ; preds = %1
br label %75
41: ; preds = %1
br label %75
42: ; preds = %1
br label %75
43: ; preds = %1
br label %75
44: ; preds = %1
br label %75
45: ; preds = %1
br label %75
46: ; preds = %1
br label %75
47: ; preds = %1
br label %75
48: ; preds = %1
br label %75
49: ; preds = %1
br label %75
50: ; preds = %1
br label %75
51: ; preds = %1
br label %75
52: ; preds = %1
br label %75
53: ; preds = %1
br label %75
54: ; preds = %1
br label %75
55: ; preds = %1
br label %75
56: ; preds = %1
br label %75
57: ; preds = %1
br label %75
58: ; preds = %1
br label %75
59: ; preds = %1
br label %75
60: ; preds = %1
br label %75
61: ; preds = %1
br label %75
62: ; preds = %1
br label %75
63: ; preds = %1
br label %75
64: ; preds = %1
br label %75
65: ; preds = %1
br label %75
66: ; preds = %1
br label %75
67: ; preds = %1
br label %75
68: ; preds = %1
br label %75
69: ; preds = %1
br label %75
70: ; preds = %1
br label %75
71: ; preds = %1
br label %75
72: ; preds = %1
br label %75
73: ; preds = %1
br label %75
74: ; preds = %1
br label %75
75: ; preds = %1, %74, %73, %72, %71, %70, %69, %68, %67, %66, %65, %64, %63, %62, %61, %60, %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, %7, %6, %5, %4, %3, %2
%76 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.72, i64 0, i64 0), %74 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.71, i64 0, i64 0), %73 ], [ getelementptr inbounds ([56 x i8], [56 x i8]* @.str.70, i64 0, i64 0), %72 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.69, i64 0, i64 0), %71 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.68, i64 0, i64 0), %70 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.67, i64 0, i64 0), %69 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.66, i64 0, i64 0), %68 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.65, i64 0, i64 0), %67 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.64, i64 0, i64 0), %66 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.63, i64 0, i64 0), %65 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.62, i64 0, i64 0), %64 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.61, i64 0, i64 0), %63 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.60, i64 0, i64 0), %62 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.59, i64 0, i64 0), %61 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.58, i64 0, i64 0), %60 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.57, i64 0, i64 0), %59 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.56, i64 0, i64 0), %58 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.55, i64 0, i64 0), %57 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.54, i64 0, i64 0), %56 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.53, i64 0, i64 0), %55 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.52, i64 0, i64 0), %54 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.51, i64 0, i64 0), %53 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.50, i64 0, i64 0), %52 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.49, i64 0, i64 0), %51 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.48, i64 0, i64 0), %50 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.47, i64 0, i64 0), %49 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.46, i64 0, i64 0), %48 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.45, i64 0, i64 0), %47 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.44, i64 0, i64 0), %46 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.43, i64 0, i64 0), %45 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.42, i64 0, i64 0), %44 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.37, i64 0, i64 0), %43 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.41, i64 0, i64 0), %42 ], [ getelementptr inbounds ([40 x i8], [40 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 ([31 x i8], [31 x i8]* @.str.38, i64 0, i64 0), %39 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.37, i64 0, i64 0), %38 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.36, i64 0, i64 0), %37 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.35, i64 0, i64 0), %36 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.34, i64 0, i64 0), %35 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.33, i64 0, i64 0), %34 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.32, i64 0, i64 0), %33 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.31, i64 0, i64 0), %32 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), %31 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0), %30 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.28, i64 0, i64 0), %29 ], [ getelementptr inbounds ([17 x i8], [17 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 ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), %26 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.24, i64 0, i64 0), %25 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %76
}