const char *getErrorString(int error) {
  switch (error) {
  case 0:
    return "CL_SUCCESS";
  case -1:
    return "CL_DEVICE_NOT_FOUND";
  case -2:
    return "CL_DEVICE_NOT_AVAILABLE";
  case -3:
    return "CL_COMPILER_NOT_AVAILABLE";
  case -4:
    return "CL_MEM_OBJECT_ALLOCATION_FAILURE";
  case -5:
    return "CL_OUT_OF_RESOURCES";
  case -6:
    return "CL_OUT_OF_HOST_MEMORY";
  case -7:
    return "CL_PROFILING_INFO_NOT_AVAILABLE";
  case -8:
    return "CL_MEM_COPY_OVERLAP";
  case -9:
    return "CL_IMAGE_FORMAT_MISMATCH";
  case -10:
    return "CL_IMAGE_FORMAT_NOT_SUPPORTED";
  case -11:
    return "CL_BUILD_PROGRAM_FAILURE";
  case -12:
    return "CL_MAP_FAILURE";
  case -13:
    return "CL_MISALIGNED_SUB_BUFFER_OFFSET";
  case -14:
    return "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST";
  case -15:
    return "CL_COMPILE_PROGRAM_FAILURE";
  case -16:
    return "CL_LINKER_NOT_AVAILABLE";
  case -17:
    return "CL_LINK_PROGRAM_FAILURE";
  case -18:
    return "CL_DEVICE_PARTITION_FAILED";
  case -19:
    return "CL_KERNEL_ARG_INFO_NOT_AVAILABLE";
  case -30:
    return "CL_INVALID_VALUE";
  case -31:
    return "CL_INVALID_DEVICE_TYPE";
  case -32:
    return "CL_INVALID_PLATFORM";
  case -33:
    return "CL_INVALID_DEVICE";
  case -34:
    return "CL_INVALID_CONTEXT";
  case -35:
    return "CL_INVALID_QUEUE_PROPERTIES";
  case -36:
    return "CL_INVALID_COMMAND_QUEUE";
  case -37:
    return "CL_INVALID_HOST_PTR";
  case -38:
    return "CL_INVALID_MEM_OBJECT";
  case -39:
    return "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR";
  case -40:
    return "CL_INVALID_IMAGE_SIZE";
  case -41:
    return "CL_INVALID_SAMPLER";
  case -42:
    return "CL_INVALID_BINARY";
  case -43:
    return "CL_INVALID_BUILD_OPTIONS";
  case -44:
    return "CL_INVALID_PROGRAM";
  case -45:
    return "CL_INVALID_PROGRAM_EXECUTABLE";
  case -46:
    return "CL_INVALID_KERNEL_NAME";
  case -47:
    return "CL_INVALID_KERNEL_DEFINITION";
  case -48:
    return "CL_INVALID_KERNEL";
  case -49:
    return "CL_INVALID_ARG_INDEX";
  case -50:
    return "CL_INVALID_ARG_VALUE";
  case -51:
    return "CL_INVALID_ARG_SIZE";
  case -52:
    return "CL_INVALID_KERNEL_ARGS";
  case -53:
    return "CL_INVALID_WORK_DIMENSION";
  case -54:
    return "CL_INVALID_WORK_GROUP_SIZE";
  case -55:
    return "CL_INVALID_WORK_ITEM_SIZE";
  case -56:
    return "CL_INVALID_GLOBAL_OFFSET";
  case -57:
    return "CL_INVALID_EVENT_WAIT_LIST";
  case -58:
    return "CL_INVALID_EVENT";
  case -59:
    return "CL_INVALID_OPERATION";
  case -60:
    return "CL_INVALID_GL_OBJECT";
  case -61:
    return "CL_INVALID_BUFFER_SIZE";
  case -62:
    return "CL_INVALID_MIP_LEVEL";
  case -63:
    return "CL_INVALID_GLOBAL_WORK_SIZE";
  case -64:
    return "CL_INVALID_PROPERTY";
  case -65:
    return "CL_INVALID_IMAGE_DESCRIPTOR";
  case -66:
    return "CL_INVALID_COMPILER_OPTIONS";
  case -67:
    return "CL_INVALID_LINKER_OPTIONS";
  case -68:
    return "CL_INVALID_DEVICE_PARTITION_COUNT";
  case -1000:
    return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
  case -1001:
    return "CL_PLATFORM_NOT_FOUND_KHR";
  case -1002:
    return "CL_INVALID_D3D10_DEVICE_KHR";
  case -1003:
    return "CL_INVALID_D3D10_RESOURCE_KHR";
  case -1004:
    return "CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR";
  case -1005:
    return "CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR";
  default:
    return "Unknown OpenCL error";
  }
}


x86 assembly (clang, -O0):
<getErrorString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xfffffc13,%eax
je     1966 <getErrorString+0x866>
jmp    111d <getErrorString+0x1d>
mov    -0x10(%rbp),%eax
sub    $0xfffffc14,%eax
je     1956 <getErrorString+0x856>
jmp    1130 <getErrorString+0x30>
mov    -0x10(%rbp),%eax
sub    $0xfffffc15,%eax
je     1946 <getErrorString+0x846>
jmp    1143 <getErrorString+0x43>
mov    -0x10(%rbp),%eax
sub    $0xfffffc16,%eax
je     1936 <getErrorString+0x836>
jmp    1156 <getErrorString+0x56>
mov    -0x10(%rbp),%eax
sub    $0xfffffc17,%eax
je     1926 <getErrorString+0x826>
jmp    1169 <getErrorString+0x69>
mov    -0x10(%rbp),%eax
sub    $0xfffffc18,%eax
je     1916 <getErrorString+0x816>
jmp    117c <getErrorString+0x7c>
mov    -0x10(%rbp),%eax
sub    $0xffffffbc,%eax
je     1906 <getErrorString+0x806>
jmp    118d <getErrorString+0x8d>
mov    -0x10(%rbp),%eax
sub    $0xffffffbd,%eax
je     18f6 <getErrorString+0x7f6>
jmp    119e <getErrorString+0x9e>
mov    -0x10(%rbp),%eax
sub    $0xffffffbe,%eax
je     18e6 <getErrorString+0x7e6>
jmp    11af <getErrorString+0xaf>
mov    -0x10(%rbp),%eax
sub    $0xffffffbf,%eax
je     18d6 <getErrorString+0x7d6>
jmp    11c0 <getErrorString+0xc0>
mov    -0x10(%rbp),%eax
sub    $0xffffffc0,%eax
je     18c6 <getErrorString+0x7c6>
jmp    11d1 <getErrorString+0xd1>
mov    -0x10(%rbp),%eax
sub    $0xffffffc1,%eax
je     18b6 <getErrorString+0x7b6>
jmp    11e2 <getErrorString+0xe2>
mov    -0x10(%rbp),%eax
sub    $0xffffffc2,%eax
je     18a6 <getErrorString+0x7a6>
jmp    11f3 <getErrorString+0xf3>
mov    -0x10(%rbp),%eax
sub    $0xffffffc3,%eax
je     1896 <getErrorString+0x796>
jmp    1204 <getErrorString+0x104>
mov    -0x10(%rbp),%eax
sub    $0xffffffc4,%eax
je     1886 <getErrorString+0x786>
jmp    1215 <getErrorString+0x115>
mov    -0x10(%rbp),%eax
sub    $0xffffffc5,%eax
je     1876 <getErrorString+0x776>
jmp    1226 <getErrorString+0x126>
mov    -0x10(%rbp),%eax
sub    $0xffffffc6,%eax
je     1866 <getErrorString+0x766>
jmp    1237 <getErrorString+0x137>
mov    -0x10(%rbp),%eax
sub    $0xffffffc7,%eax
je     1856 <getErrorString+0x756>
jmp    1248 <getErrorString+0x148>
mov    -0x10(%rbp),%eax
sub    $0xffffffc8,%eax
je     1846 <getErrorString+0x746>
jmp    1259 <getErrorString+0x159>
mov    -0x10(%rbp),%eax
sub    $0xffffffc9,%eax
je     1836 <getErrorString+0x736>
jmp    126a <getErrorString+0x16a>
mov    -0x10(%rbp),%eax
sub    $0xffffffca,%eax
je     1826 <getErrorString+0x726>
jmp    127b <getErrorString+0x17b>
mov    -0x10(%rbp),%eax
sub    $0xffffffcb,%eax
je     1816 <getErrorString+0x716>
jmp    128c <getErrorString+0x18c>
mov    -0x10(%rbp),%eax
sub    $0xffffffcc,%eax
je     1806 <getErrorString+0x706>
jmp    129d <getErrorString+0x19d>
mov    -0x10(%rbp),%eax
sub    $0xffffffcd,%eax
je     17f6 <getErrorString+0x6f6>
jmp    12ae <getErrorString+0x1ae>
mov    -0x10(%rbp),%eax
sub    $0xffffffce,%eax
je     17e6 <getErrorString+0x6e6>
jmp    12bf <getErrorString+0x1bf>
mov    -0x10(%rbp),%eax
sub    $0xffffffcf,%eax
je     17d6 <getErrorString+0x6d6>
jmp    12d0 <getErrorString+0x1d0>
mov    -0x10(%rbp),%eax
sub    $0xffffffd0,%eax
je     17c6 <getErrorString+0x6c6>
jmp    12e1 <getErrorString+0x1e1>
mov    -0x10(%rbp),%eax
sub    $0xffffffd1,%eax
je     17b6 <getErrorString+0x6b6>
jmp    12f2 <getErrorString+0x1f2>
mov    -0x10(%rbp),%eax
sub    $0xffffffd2,%eax
je     17a6 <getErrorString+0x6a6>
jmp    1303 <getErrorString+0x203>
mov    -0x10(%rbp),%eax
sub    $0xffffffd3,%eax
je     1796 <getErrorString+0x696>
jmp    1314 <getErrorString+0x214>
mov    -0x10(%rbp),%eax
sub    $0xffffffd4,%eax
je     1786 <getErrorString+0x686>
jmp    1325 <getErrorString+0x225>
mov    -0x10(%rbp),%eax
sub    $0xffffffd5,%eax
je     1776 <getErrorString+0x676>
jmp    1336 <getErrorString+0x236>
mov    -0x10(%rbp),%eax
sub    $0xffffffd6,%eax
je     1766 <getErrorString+0x666>
jmp    1347 <getErrorString+0x247>
mov    -0x10(%rbp),%eax
sub    $0xffffffd7,%eax
je     1756 <getErrorString+0x656>
jmp    1358 <getErrorString+0x258>
mov    -0x10(%rbp),%eax
sub    $0xffffffd8,%eax
je     1746 <getErrorString+0x646>
jmp    1369 <getErrorString+0x269>
mov    -0x10(%rbp),%eax
sub    $0xffffffd9,%eax
je     1736 <getErrorString+0x636>
jmp    137a <getErrorString+0x27a>
mov    -0x10(%rbp),%eax
sub    $0xffffffda,%eax
je     1726 <getErrorString+0x626>
jmp    138b <getErrorString+0x28b>
mov    -0x10(%rbp),%eax
sub    $0xffffffdb,%eax
je     1716 <getErrorString+0x616>
jmp    139c <getErrorString+0x29c>
mov    -0x10(%rbp),%eax
sub    $0xffffffdc,%eax
je     1706 <getErrorString+0x606>
jmp    13ad <getErrorString+0x2ad>
mov    -0x10(%rbp),%eax
sub    $0xffffffdd,%eax
je     16f6 <getErrorString+0x5f6>
jmp    13be <getErrorString+0x2be>
mov    -0x10(%rbp),%eax
sub    $0xffffffde,%eax
je     16e6 <getErrorString+0x5e6>
jmp    13cf <getErrorString+0x2cf>
mov    -0x10(%rbp),%eax
sub    $0xffffffdf,%eax
je     16d6 <getErrorString+0x5d6>
jmp    13e0 <getErrorString+0x2e0>
mov    -0x10(%rbp),%eax
sub    $0xffffffe0,%eax
je     16c6 <getErrorString+0x5c6>
jmp    13f1 <getErrorString+0x2f1>
mov    -0x10(%rbp),%eax
sub    $0xffffffe1,%eax
je     16b6 <getErrorString+0x5b6>
jmp    1402 <getErrorString+0x302>
mov    -0x10(%rbp),%eax
sub    $0xffffffe2,%eax
je     16a6 <getErrorString+0x5a6>
jmp    1413 <getErrorString+0x313>
mov    -0x10(%rbp),%eax
sub    $0xffffffed,%eax
je     1696 <getErrorString+0x596>
jmp    1424 <getErrorString+0x324>
mov    -0x10(%rbp),%eax
sub    $0xffffffee,%eax
je     1686 <getErrorString+0x586>
jmp    1435 <getErrorString+0x335>
mov    -0x10(%rbp),%eax
sub    $0xffffffef,%eax
je     1676 <getErrorString+0x576>
jmp    1446 <getErrorString+0x346>
mov    -0x10(%rbp),%eax
sub    $0xfffffff0,%eax
je     1666 <getErrorString+0x566>
jmp    1457 <getErrorString+0x357>
mov    -0x10(%rbp),%eax
sub    $0xfffffff1,%eax
je     1656 <getErrorString+0x556>
jmp    1468 <getErrorString+0x368>
mov    -0x10(%rbp),%eax
sub    $0xfffffff2,%eax
je     1646 <getErrorString+0x546>
jmp    1479 <getErrorString+0x379>
mov    -0x10(%rbp),%eax
sub    $0xfffffff3,%eax
je     1636 <getErrorString+0x536>
jmp    148a <getErrorString+0x38a>
mov    -0x10(%rbp),%eax
sub    $0xfffffff4,%eax
je     1626 <getErrorString+0x526>
jmp    149b <getErrorString+0x39b>
mov    -0x10(%rbp),%eax
sub    $0xfffffff5,%eax
je     1616 <getErrorString+0x516>
jmp    14ac <getErrorString+0x3ac>
mov    -0x10(%rbp),%eax
sub    $0xfffffff6,%eax
je     1606 <getErrorString+0x506>
jmp    14bd <getErrorString+0x3bd>
mov    -0x10(%rbp),%eax
sub    $0xfffffff7,%eax
je     15f6 <getErrorString+0x4f6>
jmp    14ce <getErrorString+0x3ce>
mov    -0x10(%rbp),%eax
sub    $0xfffffff8,%eax
je     15e6 <getErrorString+0x4e6>
jmp    14df <getErrorString+0x3df>
mov    -0x10(%rbp),%eax
sub    $0xfffffff9,%eax
je     15d6 <getErrorString+0x4d6>
jmp    14f0 <getErrorString+0x3f0>
mov    -0x10(%rbp),%eax
sub    $0xfffffffa,%eax
je     15c6 <getErrorString+0x4c6>
jmp    1501 <getErrorString+0x401>
mov    -0x10(%rbp),%eax
sub    $0xfffffffb,%eax
je     15b6 <getErrorString+0x4b6>
jmp    1512 <getErrorString+0x412>
mov    -0x10(%rbp),%eax
sub    $0xfffffffc,%eax
je     15a6 <getErrorString+0x4a6>
jmp    1523 <getErrorString+0x423>
mov    -0x10(%rbp),%eax
sub    $0xfffffffd,%eax
je     1596 <getErrorString+0x496>
jmp    1534 <getErrorString+0x434>
mov    -0x10(%rbp),%eax
sub    $0xfffffffe,%eax
je     1586 <getErrorString+0x486>
jmp    1545 <getErrorString+0x445>
mov    -0x10(%rbp),%eax
sub    $0xffffffff,%eax
je     1576 <getErrorString+0x476>
jmp    1556 <getErrorString+0x456>
mov    -0x10(%rbp),%eax
test   %eax,%eax
jne    1976 <getErrorString+0x876>
jmp    1566 <getErrorString+0x466>
lea    0xa93(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xa8e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xa92(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xa9a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xaa4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xab5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xab9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xabf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xacf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xad3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xadc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xaea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xaf3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xaf2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb02(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb1f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb2a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb32(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb3a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb45(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb56(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb57(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb5e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb62(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb67(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb73(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb7c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb80(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb86(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb99(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xb9f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xba2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xba4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbad(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbbe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbc5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbd2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbd4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbd9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbde(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbe2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbe9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbf3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xbfe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc08(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc11(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc1c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc1d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc22(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc27(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc2e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc33(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc3f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc4f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc5b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc65(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc77(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc8e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xc98(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xca4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xcb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xcc9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1981 <getErrorString+0x881>
lea    0xcdc(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getErrorString>:
lea    0x44(%rdi),%ecx
cmp    $0x44,%ecx
ja     1127 <getErrorString+0x27>
lea    0x101d(%rip),%rax
lea    0xf02(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x1578(%rip),%rax
ret
add    $0x3ed,%edi
cmp    $0x5,%edi
ja     114a <getErrorString+0x4a>
lea    0xec7(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x1619(%rip),%rax
ret
lea    0x1634(%rip),%rax
ret
lea    0x152b(%rip),%rax
ret
lea    0x1507(%rip),%rax
ret
lea    0x14e3(%rip),%rax
ret
lea    0x14c7(%rip),%rax
ret
lea    0x14a3(%rip),%rax
ret
lea    0x1486(%rip),%rax
ret
lea    0x1467(%rip),%rax
ret
lea    0x144a(%rip),%rax
ret
lea    0x142d(%rip),%rax
ret
lea    0x1414(%rip),%rax
ret
lea    0x13f1(%rip),%rax
ret
lea    0x13d0(%rip),%rax
ret
lea    0x13ae(%rip),%rax
ret
lea    0x138b(%rip),%rax
ret
lea    0x1369(%rip),%rax
ret
lea    0x134a(%rip),%rax
ret
lea    0x132e(%rip),%rax
ret
lea    0x1311(%rip),%rax
ret
lea    0x12f4(%rip),%rax
ret
lea    0x12da(%rip),%rax
ret
lea    0x12b5(%rip),%rax
ret
lea    0x1296(%rip),%rax
ret
lea    0x1270(%rip),%rax
ret
lea    0x1255(%rip),%rax
ret
lea    0x1234(%rip),%rax
ret
lea    0x121a(%rip),%rax
ret
lea    0x11ff(%rip),%rax
ret
lea    0x11e1(%rip),%rax
ret
lea    0x11b6(%rip),%rax
ret
lea    0x1198(%rip),%rax
ret
lea    0x117c(%rip),%rax
ret
lea    0x115b(%rip),%rax
ret
lea    0x1137(%rip),%rax
ret
lea    0x111c(%rip),%rax
ret
lea    0x1102(%rip),%rax
ret
lea    0x10e6(%rip),%rax
ret
lea    0x10c7(%rip),%rax
ret
lea    0x10ae(%rip),%rax
ret
lea    0x1085(%rip),%rax
ret
lea    0x1062(%rip),%rax
ret
lea    0x1042(%rip),%rax
ret
lea    0x1022(%rip),%rax
ret
lea    0xfff(%rip),%rax
ret
lea    0xfca(%rip),%rax
ret
lea    0xfa2(%rip),%rax
ret
lea    0xf8b(%rip),%rax
ret
lea    0xf6a(%rip),%rax
ret
lea    0xf44(%rip),%rax
ret
lea    0xf23(%rip),%rax
ret
lea    0xf07(%rip),%rax
ret
lea    0xedf(%rip),%rax
ret
lea    0xec1(%rip),%rax
ret
lea    0xea5(%rip),%rax
ret
lea    0xe7c(%rip),%rax
ret
lea    0xe5a(%rip),%rax
ret
lea    0xe3a(%rip),%rax
ret
lea    0xe1e(%rip),%rax
ret
lea    0x141a(%rip),%rax
ret
lea    0x13f4(%rip),%rax
ret
lea    0x13d0(%rip),%rax
ret
lea    0x13ae(%rip),%rax
ret
lea    0x137f(%rip),%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"CL_SUCCESS\00"
@.str.1 = [20 x i8] c"CL_DEVICE_NOT_FOUND\00"
@.str.2 = [24 x i8] c"CL_DEVICE_NOT_AVAILABLE\00"
@.str.3 = [26 x i8] c"CL_COMPILER_NOT_AVAILABLE\00"
@.str.4 = [33 x i8] c"CL_MEM_OBJECT_ALLOCATION_FAILURE\00"
@.str.5 = [20 x i8] c"CL_OUT_OF_RESOURCES\00"
@.str.6 = [22 x i8] c"CL_OUT_OF_HOST_MEMORY\00"
@.str.7 = [32 x i8] c"CL_PROFILING_INFO_NOT_AVAILABLE\00"
@.str.8 = [20 x i8] c"CL_MEM_COPY_OVERLAP\00"
@.str.9 = [25 x i8] c"CL_IMAGE_FORMAT_MISMATCH\00"
@.str.10 = [30 x i8] c"CL_IMAGE_FORMAT_NOT_SUPPORTED\00"
@.str.11 = [25 x i8] c"CL_BUILD_PROGRAM_FAILURE\00"
@.str.12 = [15 x i8] c"CL_MAP_FAILURE\00"
@.str.13 = [32 x i8] c"CL_MISALIGNED_SUB_BUFFER_OFFSET\00"
@.str.14 = [45 x i8] c"CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST\00"
@.str.15 = [27 x i8] c"CL_COMPILE_PROGRAM_FAILURE\00"
@.str.16 = [24 x i8] c"CL_LINKER_NOT_AVAILABLE\00"
@.str.17 = [24 x i8] c"CL_LINK_PROGRAM_FAILURE\00"
@.str.18 = [27 x i8] c"CL_DEVICE_PARTITION_FAILED\00"
@.str.19 = [33 x i8] c"CL_KERNEL_ARG_INFO_NOT_AVAILABLE\00"
@.str.20 = [17 x i8] c"CL_INVALID_VALUE\00"
@.str.21 = [23 x i8] c"CL_INVALID_DEVICE_TYPE\00"
@.str.22 = [20 x i8] c"CL_INVALID_PLATFORM\00"
@.str.23 = [18 x i8] c"CL_INVALID_DEVICE\00"
@.str.24 = [19 x i8] c"CL_INVALID_CONTEXT\00"
@.str.25 = [28 x i8] c"CL_INVALID_QUEUE_PROPERTIES\00"
@.str.26 = [25 x i8] c"CL_INVALID_COMMAND_QUEUE\00"
@.str.27 = [20 x i8] c"CL_INVALID_HOST_PTR\00"
@.str.28 = [22 x i8] c"CL_INVALID_MEM_OBJECT\00"
@.str.29 = [35 x i8] c"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR\00"
@.str.30 = [22 x i8] c"CL_INVALID_IMAGE_SIZE\00"
@.str.31 = [19 x i8] c"CL_INVALID_SAMPLER\00"
@.str.32 = [18 x i8] c"CL_INVALID_BINARY\00"
@.str.33 = [25 x i8] c"CL_INVALID_BUILD_OPTIONS\00"
@.str.34 = [19 x i8] c"CL_INVALID_PROGRAM\00"
@.str.35 = [30 x i8] c"CL_INVALID_PROGRAM_EXECUTABLE\00"
@.str.36 = [23 x i8] c"CL_INVALID_KERNEL_NAME\00"
@.str.37 = [29 x i8] c"CL_INVALID_KERNEL_DEFINITION\00"
@.str.38 = [18 x i8] c"CL_INVALID_KERNEL\00"
@.str.39 = [21 x i8] c"CL_INVALID_ARG_INDEX\00"
@.str.40 = [21 x i8] c"CL_INVALID_ARG_VALUE\00"
@.str.41 = [20 x i8] c"CL_INVALID_ARG_SIZE\00"
@.str.42 = [23 x i8] c"CL_INVALID_KERNEL_ARGS\00"
@.str.43 = [26 x i8] c"CL_INVALID_WORK_DIMENSION\00"
@.str.44 = [27 x i8] c"CL_INVALID_WORK_GROUP_SIZE\00"
@.str.45 = [26 x i8] c"CL_INVALID_WORK_ITEM_SIZE\00"
@.str.46 = [25 x i8] c"CL_INVALID_GLOBAL_OFFSET\00"
@.str.47 = [27 x i8] c"CL_INVALID_EVENT_WAIT_LIST\00"
@.str.48 = [17 x i8] c"CL_INVALID_EVENT\00"
@.str.49 = [21 x i8] c"CL_INVALID_OPERATION\00"
@.str.50 = [21 x i8] c"CL_INVALID_GL_OBJECT\00"
@.str.51 = [23 x i8] c"CL_INVALID_BUFFER_SIZE\00"
@.str.52 = [21 x i8] c"CL_INVALID_MIP_LEVEL\00"
@.str.53 = [28 x i8] c"CL_INVALID_GLOBAL_WORK_SIZE\00"
@.str.54 = [20 x i8] c"CL_INVALID_PROPERTY\00"
@.str.55 = [28 x i8] c"CL_INVALID_IMAGE_DESCRIPTOR\00"
@.str.56 = [28 x i8] c"CL_INVALID_COMPILER_OPTIONS\00"
@.str.57 = [26 x i8] c"CL_INVALID_LINKER_OPTIONS\00"
@.str.58 = [34 x i8] c"CL_INVALID_DEVICE_PARTITION_COUNT\00"
@.str.59 = [39 x i8] c"CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR\00"
@.str.60 = [26 x i8] c"CL_PLATFORM_NOT_FOUND_KHR\00"
@.str.61 = [28 x i8] c"CL_INVALID_D3D10_DEVICE_KHR\00"
@.str.62 = [30 x i8] c"CL_INVALID_D3D10_RESOURCE_KHR\00"
@.str.63 = [39 x i8] c"CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR\00"
@.str.64 = [35 x i8] c"CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR\00"
@.str.65 = [21 x i8] c"Unknown OpenCL error\00"
define i8* @getErrorString(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %70 [
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 -30, label %25
i32 -31, label %26
i32 -32, label %27
i32 -33, label %28
i32 -34, label %29
i32 -35, label %30
i32 -36, label %31
i32 -37, label %32
i32 -38, label %33
i32 -39, label %34
i32 -40, label %35
i32 -41, label %36
i32 -42, label %37
i32 -43, label %38
i32 -44, label %39
i32 -45, label %40
i32 -46, label %41
i32 -47, label %42
i32 -48, label %43
i32 -49, label %44
i32 -50, label %45
i32 -51, label %46
i32 -52, label %47
i32 -53, label %48
i32 -54, label %49
i32 -55, label %50
i32 -56, label %51
i32 -57, label %52
i32 -58, label %53
i32 -59, label %54
i32 -60, label %55
i32 -61, label %56
i32 -62, label %57
i32 -63, label %58
i32 -64, label %59
i32 -65, label %60
i32 -66, label %61
i32 -67, label %62
i32 -68, label %63
i32 -1000, label %64
i32 -1001, label %65
i32 -1002, label %66
i32 -1003, label %67
i32 -1004, label %68
i32 -1005, label %69
]
5: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %2
br label %71
6: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %71
7: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %71
8: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %71
9: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %71
10: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %71
11: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %71
12: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %71
13: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %71
14: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %71
15: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %71
16: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %71
17: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %71
18: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %71
19: ; preds = %1
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %71
20: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %71
21: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %71
22: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %71
23: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %71
24: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %71
25: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %71
26: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %71
27: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %71
28: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %71
29: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %71
30: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %71
31: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.26, i64 0, i64 0), i8** %2
br label %71
32: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0), i8** %2
br label %71
33: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.28, i64 0, i64 0), i8** %2
br label %71
34: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.29, i64 0, i64 0), i8** %2
br label %71
35: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.30, i64 0, i64 0), i8** %2
br label %71
36: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.31, i64 0, i64 0), i8** %2
br label %71
37: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i64 0, i64 0), i8** %2
br label %71
38: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.33, i64 0, i64 0), i8** %2
br label %71
39: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.34, i64 0, i64 0), i8** %2
br label %71
40: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.35, i64 0, i64 0), i8** %2
br label %71
41: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.36, i64 0, i64 0), i8** %2
br label %71
42: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.37, i64 0, i64 0), i8** %2
br label %71
43: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.38, i64 0, i64 0), i8** %2
br label %71
44: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.39, i64 0, i64 0), i8** %2
br label %71
45: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.40, i64 0, i64 0), i8** %2
br label %71
46: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.41, i64 0, i64 0), i8** %2
br label %71
47: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.42, i64 0, i64 0), i8** %2
br label %71
48: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.43, i64 0, i64 0), i8** %2
br label %71
49: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.44, i64 0, i64 0), i8** %2
br label %71
50: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.45, i64 0, i64 0), i8** %2
br label %71
51: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.46, i64 0, i64 0), i8** %2
br label %71
52: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0), i8** %2
br label %71
53: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.48, i64 0, i64 0), i8** %2
br label %71
54: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.49, i64 0, i64 0), i8** %2
br label %71
55: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.50, i64 0, i64 0), i8** %2
br label %71
56: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.51, i64 0, i64 0), i8** %2
br label %71
57: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.52, i64 0, i64 0), i8** %2
br label %71
58: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.53, i64 0, i64 0), i8** %2
br label %71
59: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.54, i64 0, i64 0), i8** %2
br label %71
60: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.55, i64 0, i64 0), i8** %2
br label %71
61: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.56, i64 0, i64 0), i8** %2
br label %71
62: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.57, i64 0, i64 0), i8** %2
br label %71
63: ; preds = %1
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.58, i64 0, i64 0), i8** %2
br label %71
64: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.59, i64 0, i64 0), i8** %2
br label %71
65: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.60, i64 0, i64 0), i8** %2
br label %71
66: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.61, i64 0, i64 0), i8** %2
br label %71
67: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.62, i64 0, i64 0), i8** %2
br label %71
68: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.63, i64 0, i64 0), i8** %2
br label %71
69: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.64, i64 0, i64 0), i8** %2
br label %71
70: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.65, i64 0, i64 0), i8** %2
br label %71
71: ; preds = %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
%72 = load i8*, i8** %2
ret i8* %72
}

LLVM IR (-O2):
@.str = [11 x i8] c"CL_SUCCESS\00"
@.str.1 = [20 x i8] c"CL_DEVICE_NOT_FOUND\00"
@.str.2 = [24 x i8] c"CL_DEVICE_NOT_AVAILABLE\00"
@.str.3 = [26 x i8] c"CL_COMPILER_NOT_AVAILABLE\00"
@.str.4 = [33 x i8] c"CL_MEM_OBJECT_ALLOCATION_FAILURE\00"
@.str.5 = [20 x i8] c"CL_OUT_OF_RESOURCES\00"
@.str.6 = [22 x i8] c"CL_OUT_OF_HOST_MEMORY\00"
@.str.7 = [32 x i8] c"CL_PROFILING_INFO_NOT_AVAILABLE\00"
@.str.8 = [20 x i8] c"CL_MEM_COPY_OVERLAP\00"
@.str.9 = [25 x i8] c"CL_IMAGE_FORMAT_MISMATCH\00"
@.str.10 = [30 x i8] c"CL_IMAGE_FORMAT_NOT_SUPPORTED\00"
@.str.11 = [25 x i8] c"CL_BUILD_PROGRAM_FAILURE\00"
@.str.12 = [15 x i8] c"CL_MAP_FAILURE\00"
@.str.13 = [32 x i8] c"CL_MISALIGNED_SUB_BUFFER_OFFSET\00"
@.str.14 = [45 x i8] c"CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST\00"
@.str.15 = [27 x i8] c"CL_COMPILE_PROGRAM_FAILURE\00"
@.str.16 = [24 x i8] c"CL_LINKER_NOT_AVAILABLE\00"
@.str.17 = [24 x i8] c"CL_LINK_PROGRAM_FAILURE\00"
@.str.18 = [27 x i8] c"CL_DEVICE_PARTITION_FAILED\00"
@.str.19 = [33 x i8] c"CL_KERNEL_ARG_INFO_NOT_AVAILABLE\00"
@.str.20 = [17 x i8] c"CL_INVALID_VALUE\00"
@.str.21 = [23 x i8] c"CL_INVALID_DEVICE_TYPE\00"
@.str.22 = [20 x i8] c"CL_INVALID_PLATFORM\00"
@.str.23 = [18 x i8] c"CL_INVALID_DEVICE\00"
@.str.24 = [19 x i8] c"CL_INVALID_CONTEXT\00"
@.str.25 = [28 x i8] c"CL_INVALID_QUEUE_PROPERTIES\00"
@.str.26 = [25 x i8] c"CL_INVALID_COMMAND_QUEUE\00"
@.str.27 = [20 x i8] c"CL_INVALID_HOST_PTR\00"
@.str.28 = [22 x i8] c"CL_INVALID_MEM_OBJECT\00"
@.str.29 = [35 x i8] c"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR\00"
@.str.30 = [22 x i8] c"CL_INVALID_IMAGE_SIZE\00"
@.str.31 = [19 x i8] c"CL_INVALID_SAMPLER\00"
@.str.32 = [18 x i8] c"CL_INVALID_BINARY\00"
@.str.33 = [25 x i8] c"CL_INVALID_BUILD_OPTIONS\00"
@.str.34 = [19 x i8] c"CL_INVALID_PROGRAM\00"
@.str.35 = [30 x i8] c"CL_INVALID_PROGRAM_EXECUTABLE\00"
@.str.36 = [23 x i8] c"CL_INVALID_KERNEL_NAME\00"
@.str.37 = [29 x i8] c"CL_INVALID_KERNEL_DEFINITION\00"
@.str.38 = [18 x i8] c"CL_INVALID_KERNEL\00"
@.str.39 = [21 x i8] c"CL_INVALID_ARG_INDEX\00"
@.str.40 = [21 x i8] c"CL_INVALID_ARG_VALUE\00"
@.str.41 = [20 x i8] c"CL_INVALID_ARG_SIZE\00"
@.str.42 = [23 x i8] c"CL_INVALID_KERNEL_ARGS\00"
@.str.43 = [26 x i8] c"CL_INVALID_WORK_DIMENSION\00"
@.str.44 = [27 x i8] c"CL_INVALID_WORK_GROUP_SIZE\00"
@.str.45 = [26 x i8] c"CL_INVALID_WORK_ITEM_SIZE\00"
@.str.46 = [25 x i8] c"CL_INVALID_GLOBAL_OFFSET\00"
@.str.47 = [27 x i8] c"CL_INVALID_EVENT_WAIT_LIST\00"
@.str.48 = [17 x i8] c"CL_INVALID_EVENT\00"
@.str.49 = [21 x i8] c"CL_INVALID_OPERATION\00"
@.str.50 = [21 x i8] c"CL_INVALID_GL_OBJECT\00"
@.str.51 = [23 x i8] c"CL_INVALID_BUFFER_SIZE\00"
@.str.52 = [21 x i8] c"CL_INVALID_MIP_LEVEL\00"
@.str.53 = [28 x i8] c"CL_INVALID_GLOBAL_WORK_SIZE\00"
@.str.54 = [20 x i8] c"CL_INVALID_PROPERTY\00"
@.str.55 = [28 x i8] c"CL_INVALID_IMAGE_DESCRIPTOR\00"
@.str.56 = [28 x i8] c"CL_INVALID_COMPILER_OPTIONS\00"
@.str.57 = [26 x i8] c"CL_INVALID_LINKER_OPTIONS\00"
@.str.58 = [34 x i8] c"CL_INVALID_DEVICE_PARTITION_COUNT\00"
@.str.59 = [39 x i8] c"CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR\00"
@.str.60 = [26 x i8] c"CL_PLATFORM_NOT_FOUND_KHR\00"
@.str.61 = [28 x i8] c"CL_INVALID_D3D10_DEVICE_KHR\00"
@.str.62 = [30 x i8] c"CL_INVALID_D3D10_RESOURCE_KHR\00"
@.str.63 = [39 x i8] c"CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR\00"
@.str.64 = [35 x i8] c"CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR\00"
@.str.65 = [21 x i8] c"Unknown OpenCL error\00"
define i8* @getErrorString(i32 %0) {
switch i32 %0, label %66 [
i32 0, label %67
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 -30, label %21
i32 -31, label %22
i32 -32, label %23
i32 -33, label %24
i32 -34, label %25
i32 -35, label %26
i32 -36, label %27
i32 -37, label %28
i32 -38, label %29
i32 -39, label %30
i32 -40, label %31
i32 -41, label %32
i32 -42, label %33
i32 -43, label %34
i32 -44, label %35
i32 -45, label %36
i32 -46, label %37
i32 -47, label %38
i32 -48, label %39
i32 -49, label %40
i32 -50, label %41
i32 -51, label %42
i32 -52, label %43
i32 -53, label %44
i32 -54, label %45
i32 -55, label %46
i32 -56, label %47
i32 -57, label %48
i32 -58, label %49
i32 -59, label %50
i32 -60, label %51
i32 -61, label %52
i32 -62, label %53
i32 -63, label %54
i32 -64, label %55
i32 -65, label %56
i32 -66, label %57
i32 -67, label %58
i32 -68, label %59
i32 -1000, label %60
i32 -1001, label %61
i32 -1002, label %62
i32 -1003, label %63
i32 -1004, label %64
i32 -1005, label %65
]
2: ; preds = %1
br label %67
3: ; preds = %1
br label %67
4: ; preds = %1
br label %67
5: ; preds = %1
br label %67
6: ; preds = %1
br label %67
7: ; preds = %1
br label %67
8: ; preds = %1
br label %67
9: ; preds = %1
br label %67
10: ; preds = %1
br label %67
11: ; preds = %1
br label %67
12: ; preds = %1
br label %67
13: ; preds = %1
br label %67
14: ; preds = %1
br label %67
15: ; preds = %1
br label %67
16: ; preds = %1
br label %67
17: ; preds = %1
br label %67
18: ; preds = %1
br label %67
19: ; preds = %1
br label %67
20: ; preds = %1
br label %67
21: ; preds = %1
br label %67
22: ; preds = %1
br label %67
23: ; preds = %1
br label %67
24: ; preds = %1
br label %67
25: ; preds = %1
br label %67
26: ; preds = %1
br label %67
27: ; preds = %1
br label %67
28: ; preds = %1
br label %67
29: ; preds = %1
br label %67
30: ; preds = %1
br label %67
31: ; preds = %1
br label %67
32: ; preds = %1
br label %67
33: ; preds = %1
br label %67
34: ; preds = %1
br label %67
35: ; preds = %1
br label %67
36: ; preds = %1
br label %67
37: ; preds = %1
br label %67
38: ; preds = %1
br label %67
39: ; preds = %1
br label %67
40: ; preds = %1
br label %67
41: ; preds = %1
br label %67
42: ; preds = %1
br label %67
43: ; preds = %1
br label %67
44: ; preds = %1
br label %67
45: ; preds = %1
br label %67
46: ; preds = %1
br label %67
47: ; preds = %1
br label %67
48: ; preds = %1
br label %67
49: ; preds = %1
br label %67
50: ; preds = %1
br label %67
51: ; preds = %1
br label %67
52: ; preds = %1
br label %67
53: ; preds = %1
br label %67
54: ; preds = %1
br label %67
55: ; preds = %1
br label %67
56: ; preds = %1
br label %67
57: ; preds = %1
br label %67
58: ; preds = %1
br label %67
59: ; preds = %1
br label %67
60: ; preds = %1
br label %67
61: ; preds = %1
br label %67
62: ; preds = %1
br label %67
63: ; preds = %1
br label %67
64: ; preds = %1
br label %67
65: ; preds = %1
br label %67
66: ; preds = %1
br label %67
67: ; preds = %1, %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
%68 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.65, i64 0, i64 0), %66 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.64, i64 0, i64 0), %65 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.63, i64 0, i64 0), %64 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.62, i64 0, i64 0), %63 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.61, i64 0, i64 0), %62 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.60, i64 0, i64 0), %61 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.59, i64 0, i64 0), %60 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.58, i64 0, i64 0), %59 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.57, i64 0, i64 0), %58 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.56, i64 0, i64 0), %57 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.55, i64 0, i64 0), %56 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.54, i64 0, i64 0), %55 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.53, i64 0, i64 0), %54 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.52, i64 0, i64 0), %53 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.51, i64 0, i64 0), %52 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.50, i64 0, i64 0), %51 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.49, i64 0, i64 0), %50 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.48, i64 0, i64 0), %49 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0), %48 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.46, i64 0, i64 0), %47 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.45, i64 0, i64 0), %46 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.44, i64 0, i64 0), %45 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.43, i64 0, i64 0), %44 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.42, i64 0, i64 0), %43 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.41, i64 0, i64 0), %42 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.40, i64 0, i64 0), %41 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.39, i64 0, i64 0), %40 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.38, i64 0, i64 0), %39 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.37, i64 0, i64 0), %38 ], [ getelementptr inbounds ([23 x i8], [23 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 ([19 x i8], [19 x i8]* @.str.34, i64 0, i64 0), %35 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.33, i64 0, i64 0), %34 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i64 0, i64 0), %33 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.31, i64 0, i64 0), %32 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.30, i64 0, i64 0), %31 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.29, i64 0, i64 0), %30 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.28, i64 0, i64 0), %29 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0), %28 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.26, i64 0, i64 0), %27 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.25, i64 0, i64 0), %26 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.24, i64 0, i64 0), %25 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([45 x i8], [45 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([32 x i8], [32 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 ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([32 x i8], [32 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 ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %68
}