#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int cl_int;

/* Variables and functions */
#define CL_BUILD_PROGRAM_FAILURE 173
#define CL_COMPILER_NOT_AVAILABLE 172
#define CL_DEVICE_NOT_AVAILABLE 171
#define CL_DEVICE_NOT_FOUND 170
#define CL_IMAGE_FORMAT_MISMATCH 169
#define CL_IMAGE_FORMAT_NOT_SUPPORTED 168
#define CL_INVALID_ARG_INDEX 167
#define CL_INVALID_ARG_SIZE 166
#define CL_INVALID_ARG_VALUE 165
#define CL_INVALID_BINARY 164
#define CL_INVALID_BUFFER_SIZE 163
#define CL_INVALID_BUILD_OPTIONS 162
#define CL_INVALID_COMMAND_QUEUE 161
#define CL_INVALID_CONTEXT 160
#define CL_INVALID_DEVICE 159
#define CL_INVALID_DEVICE_TYPE 158
#define CL_INVALID_EVENT 157
#define CL_INVALID_EVENT_WAIT_LIST 156
#define CL_INVALID_GLOBAL_OFFSET 155
#define CL_INVALID_GL_OBJECT 154
#define CL_INVALID_HOST_PTR 153
#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR 152
#define CL_INVALID_IMAGE_SIZE 151
#define CL_INVALID_KERNEL 150
#define CL_INVALID_KERNEL_ARGS 149
#define CL_INVALID_KERNEL_DEFINITION 148
#define CL_INVALID_KERNEL_NAME 147
#define CL_INVALID_MEM_OBJECT 146
#define CL_INVALID_MIP_LEVEL 145
#define CL_INVALID_OPERATION 144
#define CL_INVALID_PLATFORM 143
#define CL_INVALID_PROGRAM 142
#define CL_INVALID_PROGRAM_EXECUTABLE 141
#define CL_INVALID_QUEUE_PROPERTIES 140
#define CL_INVALID_SAMPLER 139
#define CL_INVALID_VALUE 138
#define CL_INVALID_WORK_DIMENSION 137
#define CL_INVALID_WORK_GROUP_SIZE 136
#define CL_INVALID_WORK_ITEM_SIZE 135
#define CL_MAP_FAILURE 134
#define CL_MEM_COPY_OVERLAP 133
#define CL_MEM_OBJECT_ALLOCATION_FAILURE 132
#define CL_OUT_OF_HOST_MEMORY 131
#define CL_OUT_OF_RESOURCES 130
#define CL_PROFILING_INFO_NOT_AVAILABLE 129
#define CL_SUCCESS 128
const char *clErrorStr(cl_int err) {
  switch (err) {
  case CL_SUCCESS:
    return "Success!";
  case CL_DEVICE_NOT_FOUND:
    return "Device not found.";
  case CL_DEVICE_NOT_AVAILABLE:
    return "Device not available";
  case CL_COMPILER_NOT_AVAILABLE:
    return "Compiler not available";
  case CL_MEM_OBJECT_ALLOCATION_FAILURE:
    return "Memory object allocation failure";
  case CL_OUT_OF_RESOURCES:
    return "Out of resources";
  case CL_OUT_OF_HOST_MEMORY:
    return "Out of host memory";
  case CL_PROFILING_INFO_NOT_AVAILABLE:
    return "Profiling information not available";
  case CL_MEM_COPY_OVERLAP:
    return "Memory copy overlap";
  case CL_IMAGE_FORMAT_MISMATCH:
    return "Image format mismatch";
  case CL_IMAGE_FORMAT_NOT_SUPPORTED:
    return "Image format not supported";
  case CL_BUILD_PROGRAM_FAILURE:
    return "Program build failure";
  case CL_MAP_FAILURE:
    return "Map failure";
  case CL_INVALID_VALUE:
    return "Invalid value";
  case CL_INVALID_DEVICE_TYPE:
    return "Invalid device type";
  case CL_INVALID_PLATFORM:
    return "Invalid platform";
  case CL_INVALID_DEVICE:
    return "Invalid device";
  case CL_INVALID_CONTEXT:
    return "Invalid context";
  case CL_INVALID_QUEUE_PROPERTIES:
    return "Invalid queue properties";
  case CL_INVALID_COMMAND_QUEUE:
    return "Invalid command queue";
  case CL_INVALID_HOST_PTR:
    return "Invalid host pointer";
  case CL_INVALID_MEM_OBJECT:
    return "Invalid memory object";
  case CL_INVALID_IMAGE_SIZE:
    return "Invalid image size";
  case CL_INVALID_IMAGE_FORMAT_DESCRIPTOR:
    return "Invalid image format descriptor";
  case CL_INVALID_SAMPLER:
    return "Invalid sampler";
  case CL_INVALID_BINARY:
    return "Invalid binary";
  case CL_INVALID_BUILD_OPTIONS:
    return "Invalid build options";
  case CL_INVALID_PROGRAM:
    return "Invalid program";
  case CL_INVALID_PROGRAM_EXECUTABLE:
    return "Invalid program executable";
  case CL_INVALID_KERNEL_NAME:
    return "Invalid kernel name";
  case CL_INVALID_KERNEL_DEFINITION:
    return "Invalid kernel definition";
  case CL_INVALID_KERNEL:
    return "Invalid kernel";
  case CL_INVALID_ARG_INDEX:
    return "Invalid argument index";
  case CL_INVALID_ARG_VALUE:
    return "Invalid argument value";
  case CL_INVALID_ARG_SIZE:
    return "Invalid argument size";
  case CL_INVALID_KERNEL_ARGS:
    return "Invalid kernel arguments";
  case CL_INVALID_WORK_DIMENSION:
    return "Invalid work dimension";
  case CL_INVALID_WORK_GROUP_SIZE:
    return "Invalid work group size";
  case CL_INVALID_WORK_ITEM_SIZE:
    return "Invalid work item size";
  case CL_INVALID_GLOBAL_OFFSET:
    return "Invalid global offset";
  case CL_INVALID_EVENT_WAIT_LIST:
    return "Invalid event wait list";
  case CL_INVALID_EVENT:
    return "Invalid event";
  case CL_INVALID_OPERATION:
    return "Invalid operation";
  case CL_INVALID_GL_OBJECT:
    return "Invalid OpenGL object";
  case CL_INVALID_BUFFER_SIZE:
    return "Invalid buffer size";
  case CL_INVALID_MIP_LEVEL:
    return "Invalid mip-map level";
  default:
    return "Unknown";
  }
}


x86 assembly (clang, -O0):
<clErrorStr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x2d,%eax
ja     1410 <clErrorStr+0x310>
mov    -0x18(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf81(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xf7a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xf7c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xf81(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xf88(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xf99(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xf9a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xf9d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfb5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfbb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfc6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfcc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfc8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfc6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfca(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfcb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfca(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfca(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfd3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfd9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfde(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfe4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xfe7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xff7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xff7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xff6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xffc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0xffc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1007(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x100b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1015(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1014(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x101b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1022(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1028(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1031(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1038(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1040(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1047(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x104d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1055(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1053(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1055(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x105b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x105f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    141b <clErrorStr+0x31b>
lea    0x1065(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clErrorStr>:
add    $0xffffff80,%edi
cmp    $0x2d,%edi
ja     111a <clErrorStr+0x1a>
movslq %edi,%rax
lea    0x12ba(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0x12a3(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Success!\00"
@.str.1 = [18 x i8] c"Device not found.\00"
@.str.2 = [21 x i8] c"Device not available\00"
@.str.3 = [23 x i8] c"Compiler not available\00"
@.str.4 = [33 x i8] c"Memory object allocation failure\00"
@.str.5 = [17 x i8] c"Out of resources\00"
@.str.6 = [19 x i8] c"Out of host memory\00"
@.str.7 = [36 x i8] c"Profiling information not available\00"
@.str.8 = [20 x i8] c"Memory copy overlap\00"
@.str.9 = [22 x i8] c"Image format mismatch\00"
@.str.10 = [27 x i8] c"Image format not supported\00"
@.str.11 = [22 x i8] c"Program build failure\00"
@.str.12 = [12 x i8] c"Map failure\00"
@.str.13 = [14 x i8] c"Invalid value\00"
@.str.14 = [20 x i8] c"Invalid device type\00"
@.str.15 = [17 x i8] c"Invalid platform\00"
@.str.16 = [15 x i8] c"Invalid device\00"
@.str.17 = [16 x i8] c"Invalid context\00"
@.str.18 = [25 x i8] c"Invalid queue properties\00"
@.str.19 = [22 x i8] c"Invalid command queue\00"
@.str.20 = [21 x i8] c"Invalid host pointer\00"
@.str.21 = [22 x i8] c"Invalid memory object\00"
@.str.22 = [19 x i8] c"Invalid image size\00"
@.str.23 = [32 x i8] c"Invalid image format descriptor\00"
@.str.24 = [16 x i8] c"Invalid sampler\00"
@.str.25 = [15 x i8] c"Invalid binary\00"
@.str.26 = [22 x i8] c"Invalid build options\00"
@.str.27 = [16 x i8] c"Invalid program\00"
@.str.28 = [27 x i8] c"Invalid program executable\00"
@.str.29 = [20 x i8] c"Invalid kernel name\00"
@.str.30 = [26 x i8] c"Invalid kernel definition\00"
@.str.31 = [15 x i8] c"Invalid kernel\00"
@.str.32 = [23 x i8] c"Invalid argument index\00"
@.str.33 = [23 x i8] c"Invalid argument value\00"
@.str.34 = [22 x i8] c"Invalid argument size\00"
@.str.35 = [25 x i8] c"Invalid kernel arguments\00"
@.str.36 = [23 x i8] c"Invalid work dimension\00"
@.str.37 = [24 x i8] c"Invalid work group size\00"
@.str.38 = [23 x i8] c"Invalid work item size\00"
@.str.39 = [22 x i8] c"Invalid global offset\00"
@.str.40 = [24 x i8] c"Invalid event wait list\00"
@.str.41 = [14 x i8] c"Invalid event\00"
@.str.42 = [18 x i8] c"Invalid operation\00"
@.str.43 = [22 x i8] c"Invalid OpenGL object\00"
@.str.44 = [20 x i8] c"Invalid buffer size\00"
@.str.45 = [22 x i8] c"Invalid mip-map level\00"
@.str.46 = [8 x i8] c"Unknown\00"
define i8* @clErrorStr(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %51 [
i32 128, label %5
i32 170, label %6
i32 171, label %7
i32 172, label %8
i32 132, label %9
i32 130, label %10
i32 131, label %11
i32 129, label %12
i32 133, label %13
i32 169, label %14
i32 168, label %15
i32 173, label %16
i32 134, label %17
i32 138, label %18
i32 158, label %19
i32 143, label %20
i32 159, label %21
i32 160, label %22
i32 140, label %23
i32 161, label %24
i32 153, label %25
i32 146, label %26
i32 151, label %27
i32 152, label %28
i32 139, label %29
i32 164, label %30
i32 162, label %31
i32 142, label %32
i32 141, label %33
i32 147, label %34
i32 148, label %35
i32 150, label %36
i32 167, label %37
i32 165, label %38
i32 166, label %39
i32 149, label %40
i32 137, label %41
i32 136, label %42
i32 135, label %43
i32 155, label %44
i32 156, label %45
i32 157, label %46
i32 144, label %47
i32 154, label %48
i32 163, label %49
i32 145, label %50
]
5: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %2
br label %52
6: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %52
7: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %52
8: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %52
9: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %52
10: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %52
11: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %52
12: ; preds = %1
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %52
13: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %52
14: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %52
15: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %52
16: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %52
17: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %52
18: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %52
19: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %52
20: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %52
21: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %52
22: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %52
23: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %52
24: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %52
25: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %52
26: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %52
27: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %52
28: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %52
29: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %52
30: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %52
31: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.26, i64 0, i64 0), i8** %2
br label %52
32: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.27, i64 0, i64 0), i8** %2
br label %52
33: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.28, i64 0, i64 0), i8** %2
br label %52
34: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.29, i64 0, i64 0), i8** %2
br label %52
35: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.30, i64 0, i64 0), i8** %2
br label %52
36: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.31, i64 0, i64 0), i8** %2
br label %52
37: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.32, i64 0, i64 0), i8** %2
br label %52
38: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.33, i64 0, i64 0), i8** %2
br label %52
39: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.34, i64 0, i64 0), i8** %2
br label %52
40: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.35, i64 0, i64 0), i8** %2
br label %52
41: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.36, i64 0, i64 0), i8** %2
br label %52
42: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.37, i64 0, i64 0), i8** %2
br label %52
43: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.38, i64 0, i64 0), i8** %2
br label %52
44: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.39, i64 0, i64 0), i8** %2
br label %52
45: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.40, i64 0, i64 0), i8** %2
br label %52
46: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.41, i64 0, i64 0), i8** %2
br label %52
47: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.42, i64 0, i64 0), i8** %2
br label %52
48: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.43, i64 0, i64 0), i8** %2
br label %52
49: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.44, i64 0, i64 0), i8** %2
br label %52
50: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.45, i64 0, i64 0), i8** %2
br label %52
51: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.46, i64 0, i64 0), i8** %2
br label %52
52: ; preds = %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
%53 = load i8*, i8** %2
ret i8* %53
}

LLVM IR (-O2):
@.str = [9 x i8] c"Success!\00"
@.str.1 = [18 x i8] c"Device not found.\00"
@.str.2 = [21 x i8] c"Device not available\00"
@.str.3 = [23 x i8] c"Compiler not available\00"
@.str.4 = [33 x i8] c"Memory object allocation failure\00"
@.str.5 = [17 x i8] c"Out of resources\00"
@.str.6 = [19 x i8] c"Out of host memory\00"
@.str.7 = [36 x i8] c"Profiling information not available\00"
@.str.8 = [20 x i8] c"Memory copy overlap\00"
@.str.9 = [22 x i8] c"Image format mismatch\00"
@.str.10 = [27 x i8] c"Image format not supported\00"
@.str.11 = [22 x i8] c"Program build failure\00"
@.str.12 = [12 x i8] c"Map failure\00"
@.str.13 = [14 x i8] c"Invalid value\00"
@.str.14 = [20 x i8] c"Invalid device type\00"
@.str.15 = [17 x i8] c"Invalid platform\00"
@.str.16 = [15 x i8] c"Invalid device\00"
@.str.17 = [16 x i8] c"Invalid context\00"
@.str.18 = [25 x i8] c"Invalid queue properties\00"
@.str.19 = [22 x i8] c"Invalid command queue\00"
@.str.20 = [21 x i8] c"Invalid host pointer\00"
@.str.21 = [22 x i8] c"Invalid memory object\00"
@.str.22 = [19 x i8] c"Invalid image size\00"
@.str.23 = [32 x i8] c"Invalid image format descriptor\00"
@.str.24 = [16 x i8] c"Invalid sampler\00"
@.str.25 = [15 x i8] c"Invalid binary\00"
@.str.26 = [22 x i8] c"Invalid build options\00"
@.str.27 = [16 x i8] c"Invalid program\00"
@.str.28 = [27 x i8] c"Invalid program executable\00"
@.str.29 = [20 x i8] c"Invalid kernel name\00"
@.str.30 = [26 x i8] c"Invalid kernel definition\00"
@.str.31 = [15 x i8] c"Invalid kernel\00"
@.str.32 = [23 x i8] c"Invalid argument index\00"
@.str.33 = [23 x i8] c"Invalid argument value\00"
@.str.34 = [22 x i8] c"Invalid argument size\00"
@.str.35 = [25 x i8] c"Invalid kernel arguments\00"
@.str.36 = [23 x i8] c"Invalid work dimension\00"
@.str.37 = [24 x i8] c"Invalid work group size\00"
@.str.38 = [23 x i8] c"Invalid work item size\00"
@.str.39 = [22 x i8] c"Invalid global offset\00"
@.str.40 = [24 x i8] c"Invalid event wait list\00"
@.str.41 = [14 x i8] c"Invalid event\00"
@.str.42 = [18 x i8] c"Invalid operation\00"
@.str.43 = [22 x i8] c"Invalid OpenGL object\00"
@.str.44 = [20 x i8] c"Invalid buffer size\00"
@.str.45 = [22 x i8] c"Invalid mip-map level\00"
@.str.46 = [8 x i8] c"Unknown\00"
@reltable.clErrorStr = [46 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.7 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.5 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.6 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.4 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.8 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.12 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.38 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.37 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.36 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.13 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.24 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str.18 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.28 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.27 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.15 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.42 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.45 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.21 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.29 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.30 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str.35 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.31 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.22 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([32 x i8]* @.str.23 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.20 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.43 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.39 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.40 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.41 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.14 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.16 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.17 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.19 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.26 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.44 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.25 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.33 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.34 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.32 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.10 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.9 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.1 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.2 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.3 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.11 to i64), i64 ptrtoint ([46 x i32]* @reltable.clErrorStr to i64)) to i32)]
define i8* @clErrorStr(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, 46
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([46 x i32]* @reltable.clErrorStr to i8*), i64 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.46, i64 0, i64 0), %1 ]
ret i8* %9
}