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


x86 assembly (clang, -O0):
<reportOCLError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x2c,%eax
ja     14f9 <reportOCLError+0x3e9>
mov    -0x18(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
lea    0xf61(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf5e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf5e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf60(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf68(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf66(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf75(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf74(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf75(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf7b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf7c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf73(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf67(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf61(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf5c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf60(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf61(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf61(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf62(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf66(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf60(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf61(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf5c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf62(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf61(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf66(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf60(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf62(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf64(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf65(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf69(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf70(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf71(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf74(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1509 <reportOCLError+0x3f9>
mov    -0x10(%rbp),%rdi
lea    0xf6b(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reportOCLError>:
mov    %rsi,%rax
add    $0xffffff80,%edi
cmp    $0x2c,%edi
ja     1134 <reportOCLError+0x24>
movslq %edi,%rcx
lea    0x129f(%rip),%rdx
movslq (%rdx,%rcx,4),%rsi
add    %rdx,%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0x1280(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Device not found.\00"
@.str.1 = [21 x i8] c"Device not available\00"
@.str.2 = [23 x i8] c"Compiler not available\00"
@.str.3 = [33 x i8] c"Memory object allocation failure\00"
@.str.4 = [17 x i8] c"Out of resources\00"
@.str.5 = [19 x i8] c"Out of host memory\00"
@.str.6 = [36 x i8] c"Profiling information not available\00"
@.str.7 = [20 x i8] c"Memory copy overlap\00"
@.str.8 = [22 x i8] c"Image format mismatch\00"
@.str.9 = [27 x i8] c"Image format not supported\00"
@.str.10 = [22 x i8] c"Program build failure\00"
@.str.11 = [12 x i8] c"Map failure\00"
@.str.12 = [14 x i8] c"Invalid value\00"
@.str.13 = [20 x i8] c"Invalid device type\00"
@.str.14 = [17 x i8] c"Invalid platform\00"
@.str.15 = [15 x i8] c"Invalid device\00"
@.str.16 = [16 x i8] c"Invalid context\00"
@.str.17 = [25 x i8] c"Invalid queue properties\00"
@.str.18 = [22 x i8] c"Invalid command queue\00"
@.str.19 = [21 x i8] c"Invalid host pointer\00"
@.str.20 = [22 x i8] c"Invalid memory object\00"
@.str.21 = [32 x i8] c"Invalid image format descriptor\00"
@.str.22 = [19 x i8] c"Invalid image size\00"
@.str.23 = [16 x i8] c"Invalid sampler\00"
@.str.24 = [15 x i8] c"Invalid binary\00"
@.str.25 = [22 x i8] c"Invalid build options\00"
@.str.26 = [16 x i8] c"Invalid program\00"
@.str.27 = [27 x i8] c"Invalid program executable\00"
@.str.28 = [20 x i8] c"Invalid kernel name\00"
@.str.29 = [26 x i8] c"Invalid kernel definition\00"
@.str.30 = [15 x i8] c"Invalid kernel\00"
@.str.31 = [23 x i8] c"Invalid argument index\00"
@.str.32 = [23 x i8] c"Invalid argument value\00"
@.str.33 = [22 x i8] c"Invalid argument size\00"
@.str.34 = [25 x i8] c"Invalid kernel arguments\00"
@.str.35 = [23 x i8] c"Invalid work dimension\00"
@.str.36 = [24 x i8] c"Invalid work group size\00"
@.str.37 = [23 x i8] c"Invalid work item size\00"
@.str.38 = [22 x i8] c"Invalid global offset\00"
@.str.39 = [24 x i8] c"Invalid event wait list\00"
@.str.40 = [14 x i8] c"Invalid event\00"
@.str.41 = [18 x i8] c"Invalid operation\00"
@.str.42 = [22 x i8] c"Invalid OpenGL object\00"
@.str.43 = [20 x i8] c"Invalid buffer size\00"
@.str.44 = [22 x i8] c"Invalid mip-map level\00"
@.str.45 = [8 x i8] c"Unknown\00"
define void @reportOCLError(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
switch i32 %5, label %141 [
i32 169, label %6
i32 170, label %9
i32 171, label %12
i32 131, label %15
i32 129, label %18
i32 130, label %21
i32 128, label %24
i32 132, label %27
i32 168, label %30
i32 167, label %33
i32 172, label %36
i32 133, label %39
i32 137, label %42
i32 157, label %45
i32 142, label %48
i32 158, label %51
i32 159, label %54
i32 139, label %57
i32 160, label %60
i32 152, label %63
i32 145, label %66
i32 151, label %69
i32 150, label %72
i32 138, label %75
i32 163, label %78
i32 161, label %81
i32 141, label %84
i32 140, label %87
i32 146, label %90
i32 147, label %93
i32 149, label %96
i32 166, label %99
i32 164, label %102
i32 165, label %105
i32 148, label %108
i32 136, label %111
i32 135, label %114
i32 134, label %117
i32 154, label %120
i32 155, label %123
i32 156, label %126
i32 143, label %129
i32 153, label %132
i32 162, label %135
i32 144, label %138
]
6: ; preds = %2
%7 = load i8*, i8** %4
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %144
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %144
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %144
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %144
18: ; preds = %2
%19 = load i8*, i8** %4
%20 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %144
21: ; preds = %2
%22 = load i8*, i8** %4
%23 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %144
24: ; preds = %2
%25 = load i8*, i8** %4
%26 = call i32 @strcpy(i8* %25, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %144
27: ; preds = %2
%28 = load i8*, i8** %4
%29 = call i32 @strcpy(i8* %28, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
br label %144
30: ; preds = %2
%31 = load i8*, i8** %4
%32 = call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
br label %144
33: ; preds = %2
%34 = load i8*, i8** %4
%35 = call i32 @strcpy(i8* %34, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
br label %144
36: ; preds = %2
%37 = load i8*, i8** %4
%38 = call i32 @strcpy(i8* %37, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %144
39: ; preds = %2
%40 = load i8*, i8** %4
%41 = call i32 @strcpy(i8* %40, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
br label %144
42: ; preds = %2
%43 = load i8*, i8** %4
%44 = call i32 @strcpy(i8* %43, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
br label %144
45: ; preds = %2
%46 = load i8*, i8** %4
%47 = call i32 @strcpy(i8* %46, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
br label %144
48: ; preds = %2
%49 = load i8*, i8** %4
%50 = call i32 @strcpy(i8* %49, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
br label %144
51: ; preds = %2
%52 = load i8*, i8** %4
%53 = call i32 @strcpy(i8* %52, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0))
br label %144
54: ; preds = %2
%55 = load i8*, i8** %4
%56 = call i32 @strcpy(i8* %55, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
br label %144
57: ; preds = %2
%58 = load i8*, i8** %4
%59 = call i32 @strcpy(i8* %58, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0))
br label %144
60: ; preds = %2
%61 = load i8*, i8** %4
%62 = call i32 @strcpy(i8* %61, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0))
br label %144
63: ; preds = %2
%64 = load i8*, i8** %4
%65 = call i32 @strcpy(i8* %64, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.19, i64 0, i64 0))
br label %144
66: ; preds = %2
%67 = load i8*, i8** %4
%68 = call i32 @strcpy(i8* %67, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.20, i64 0, i64 0))
br label %144
69: ; preds = %2
%70 = load i8*, i8** %4
%71 = call i32 @strcpy(i8* %70, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.21, i64 0, i64 0))
br label %144
72: ; preds = %2
%73 = load i8*, i8** %4
%74 = call i32 @strcpy(i8* %73, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0))
br label %144
75: ; preds = %2
%76 = load i8*, i8** %4
%77 = call i32 @strcpy(i8* %76, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0))
br label %144
78: ; preds = %2
%79 = load i8*, i8** %4
%80 = call i32 @strcpy(i8* %79, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.24, i64 0, i64 0))
br label %144
81: ; preds = %2
%82 = load i8*, i8** %4
%83 = call i32 @strcpy(i8* %82, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.25, i64 0, i64 0))
br label %144
84: ; preds = %2
%85 = load i8*, i8** %4
%86 = call i32 @strcpy(i8* %85, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.26, i64 0, i64 0))
br label %144
87: ; preds = %2
%88 = load i8*, i8** %4
%89 = call i32 @strcpy(i8* %88, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.27, i64 0, i64 0))
br label %144
90: ; preds = %2
%91 = load i8*, i8** %4
%92 = call i32 @strcpy(i8* %91, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.28, i64 0, i64 0))
br label %144
93: ; preds = %2
%94 = load i8*, i8** %4
%95 = call i32 @strcpy(i8* %94, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.29, i64 0, i64 0))
br label %144
96: ; preds = %2
%97 = load i8*, i8** %4
%98 = call i32 @strcpy(i8* %97, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.30, i64 0, i64 0))
br label %144
99: ; preds = %2
%100 = load i8*, i8** %4
%101 = call i32 @strcpy(i8* %100, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.31, i64 0, i64 0))
br label %144
102: ; preds = %2
%103 = load i8*, i8** %4
%104 = call i32 @strcpy(i8* %103, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.32, i64 0, i64 0))
br label %144
105: ; preds = %2
%106 = load i8*, i8** %4
%107 = call i32 @strcpy(i8* %106, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.33, i64 0, i64 0))
br label %144
108: ; preds = %2
%109 = load i8*, i8** %4
%110 = call i32 @strcpy(i8* %109, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.34, i64 0, i64 0))
br label %144
111: ; preds = %2
%112 = load i8*, i8** %4
%113 = call i32 @strcpy(i8* %112, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.35, i64 0, i64 0))
br label %144
114: ; preds = %2
%115 = load i8*, i8** %4
%116 = call i32 @strcpy(i8* %115, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.36, i64 0, i64 0))
br label %144
117: ; preds = %2
%118 = load i8*, i8** %4
%119 = call i32 @strcpy(i8* %118, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.37, i64 0, i64 0))
br label %144
120: ; preds = %2
%121 = load i8*, i8** %4
%122 = call i32 @strcpy(i8* %121, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.38, i64 0, i64 0))
br label %144
123: ; preds = %2
%124 = load i8*, i8** %4
%125 = call i32 @strcpy(i8* %124, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.39, i64 0, i64 0))
br label %144
126: ; preds = %2
%127 = load i8*, i8** %4
%128 = call i32 @strcpy(i8* %127, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.40, i64 0, i64 0))
br label %144
129: ; preds = %2
%130 = load i8*, i8** %4
%131 = call i32 @strcpy(i8* %130, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.41, i64 0, i64 0))
br label %144
132: ; preds = %2
%133 = load i8*, i8** %4
%134 = call i32 @strcpy(i8* %133, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.42, i64 0, i64 0))
br label %144
135: ; preds = %2
%136 = load i8*, i8** %4
%137 = call i32 @strcpy(i8* %136, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.43, i64 0, i64 0))
br label %144
138: ; preds = %2
%139 = load i8*, i8** %4
%140 = call i32 @strcpy(i8* %139, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.44, i64 0, i64 0))
br label %144
141: ; preds = %2
%142 = load i8*, i8** %4
%143 = call i32 @strcpy(i8* %142, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.45, i64 0, i64 0))
br label %144
144: ; preds = %141, %138, %135, %132, %129, %126, %123, %120, %117, %114, %111, %108, %105, %102, %99, %96, %93, %90, %87, %84, %81, %78, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
ret void
}

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