#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 176
#define CL_COMPILER_NOT_AVAILABLE 175
#define CL_DEVICE_NOT_AVAILABLE 174
#define CL_DEVICE_NOT_FOUND 173
#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST 172
#define CL_IMAGE_FORMAT_MISMATCH 171
#define CL_IMAGE_FORMAT_NOT_SUPPORTED 170
#define CL_INVALID_ARG_INDEX 169
#define CL_INVALID_ARG_SIZE 168
#define CL_INVALID_ARG_VALUE 167
#define CL_INVALID_BINARY 166
#define CL_INVALID_BUFFER_SIZE 165
#define CL_INVALID_BUILD_OPTIONS 164
#define CL_INVALID_COMMAND_QUEUE 163
#define CL_INVALID_CONTEXT 162
#define CL_INVALID_DEVICE 161
#define CL_INVALID_DEVICE_TYPE 160
#define CL_INVALID_EVENT 159
#define CL_INVALID_EVENT_WAIT_LIST 158
#define CL_INVALID_GLOBAL_OFFSET 157
#define CL_INVALID_GLOBAL_WORK_SIZE 156
#define CL_INVALID_GL_OBJECT 155
#define CL_INVALID_HOST_PTR 154
#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR 153
#define CL_INVALID_IMAGE_SIZE 152
#define CL_INVALID_KERNEL 151
#define CL_INVALID_KERNEL_ARGS 150
#define CL_INVALID_KERNEL_DEFINITION 149
#define CL_INVALID_KERNEL_NAME 148
#define CL_INVALID_MEM_OBJECT 147
#define CL_INVALID_MIP_LEVEL 146
#define CL_INVALID_OPERATION 145
#define CL_INVALID_PLATFORM 144
#define CL_INVALID_PROGRAM 143
#define CL_INVALID_PROGRAM_EXECUTABLE 142
#define CL_INVALID_PROPERTY 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_MISALIGNED_SUB_BUFFER_OFFSET 131
#define CL_OUT_OF_HOST_MEMORY 130
#define CL_OUT_OF_RESOURCES 129
#define CL_PROFILING_INFO_NOT_AVAILABLE 128
int CL_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int check_cl_err(cl_int err, const char *msg) {
  if (err == CL_SUCCESS) {
    return 0;
  }
  fprintf(stderr, "--------\nMessage: %s\nError: ", msg);
  switch (err) {
  case CL_DEVICE_NOT_FOUND:
    fprintf(stderr, "CL_DEVICE_NOT_FOUND\n");
    break;
  case CL_DEVICE_NOT_AVAILABLE:
    fprintf(stderr, "CL_DEVICE_NOT_AVAILABLE\n");
    break;
  case CL_COMPILER_NOT_AVAILABLE:
    fprintf(stderr, "CL_COMPILER_NOT_AVAILABLE\n");
    break;
  case CL_MEM_OBJECT_ALLOCATION_FAILURE:
    fprintf(stderr, "CL_MEM_OBJECT_ALLOCATION_FAILURE\n");
    break;
  case CL_OUT_OF_RESOURCES:
    fprintf(stderr, "CL_OUT_OF_RESOURCES\n");
    break;
  case CL_OUT_OF_HOST_MEMORY:
    fprintf(stderr, "CL_OUT_OF_HOST_MEMORY\n");
    break;
  case CL_PROFILING_INFO_NOT_AVAILABLE:
    fprintf(stderr, "CL_PROFILING_INFO_NOT_AVAILABLE\n");
    break;
  case CL_MEM_COPY_OVERLAP:
    fprintf(stderr, "CL_MEM_COPY_OVERLAP\n");
    break;
  case CL_IMAGE_FORMAT_MISMATCH:
    fprintf(stderr, "CL_IMAGE_FORMAT_MISMATCH\n");
    break;
  case CL_IMAGE_FORMAT_NOT_SUPPORTED:
    fprintf(stderr, "CL_IMAGE_FORMAT_NOT_SUPPORTED\n");
    break;
  case CL_BUILD_PROGRAM_FAILURE:
    fprintf(stderr, "CL_BUILD_PROGRAM_FAILURE\n");
    break;
  case CL_MAP_FAILURE:
    fprintf(stderr, "CL_MAP_FAILURE\n");
    break;
  case CL_MISALIGNED_SUB_BUFFER_OFFSET:
    fprintf(stderr, "CL_MISALIGNED_SUB_BUFFER_OFFSET\n");
    break;
  case CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST:
    fprintf(stderr, "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST\n");
    break;
  case CL_INVALID_VALUE:
    fprintf(stderr, "CL_INVALID_VALUE\n");
    break;
  case CL_INVALID_DEVICE_TYPE:
    fprintf(stderr, "CL_INVALID_DEVICE_TYPE\n");
    break;
  case CL_INVALID_PLATFORM:
    fprintf(stderr, "CL_INVALID_PLATFORM\n");
    break;
  case CL_INVALID_DEVICE:
    fprintf(stderr, "CL_INVALID_DEVICE\n");
    break;
  case CL_INVALID_CONTEXT:
    fprintf(stderr, "CL_INVALID_CONTEXT\n");
    break;
  case CL_INVALID_QUEUE_PROPERTIES:
    fprintf(stderr, "CL_INVALID_QUEUE_PROPERTIES\n");
    break;
  case CL_INVALID_COMMAND_QUEUE:
    fprintf(stderr, "CL_INVALID_COMMAND_QUEUE\n");
    break;
  case CL_INVALID_HOST_PTR:
    fprintf(stderr, "CL_INVALID_HOST_PTR\n");
    break;
  case CL_INVALID_MEM_OBJECT:
    fprintf(stderr, "CL_INVALID_MEM_OBJECT\n");
    break;
  case CL_INVALID_IMAGE_FORMAT_DESCRIPTOR:
    fprintf(stderr, "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR\n");
    break;
  case CL_INVALID_IMAGE_SIZE:
    fprintf(stderr, "CL_INVALID_IMAGE_SIZE\n");
    break;
  case CL_INVALID_SAMPLER:
    fprintf(stderr, "CL_INVALID_SAMPLER\n");
    break;
  case CL_INVALID_BINARY:
    fprintf(stderr, "CL_INVALID_BINARY\n");
    break;
  case CL_INVALID_BUILD_OPTIONS:
    fprintf(stderr, "CL_INVALID_BUILD_OPTIONS\n");
    break;
  case CL_INVALID_PROGRAM:
    fprintf(stderr, "CL_INVALID_PROGRAM\n");
    break;
  case CL_INVALID_PROGRAM_EXECUTABLE:
    fprintf(stderr, "CL_INVALID_PROGRAM_EXECUTABLE\n");
    break;
  case CL_INVALID_KERNEL_NAME:
    fprintf(stderr, "CL_INVALID_KERNEL_NAME\n");
    break;
  case CL_INVALID_KERNEL_DEFINITION:
    fprintf(stderr, "CL_INVALID_KERNEL_DEFINITION\n");
    break;
  case CL_INVALID_KERNEL:
    fprintf(stderr, "CL_INVALID_KERNEL\n");
    break;
  case CL_INVALID_ARG_INDEX:
    fprintf(stderr, "CL_INVALID_ARG_INDEX\n");
    break;
  case CL_INVALID_ARG_VALUE:
    fprintf(stderr, "CL_INVALID_ARG_VALUE\n");
    break;
  case CL_INVALID_ARG_SIZE:
    fprintf(stderr, "CL_INVALID_ARG_SIZE\n");
    break;
  case CL_INVALID_KERNEL_ARGS:
    fprintf(stderr, "CL_INVALID_KERNEL_ARGS\n");
    break;
  case CL_INVALID_WORK_DIMENSION:
    fprintf(stderr, "CL_INVALID_WORK_DIMENSION\n");
    break;
  case CL_INVALID_WORK_GROUP_SIZE:
    fprintf(stderr, "CL_INVALID_WORK_GROUP_SIZE\n");
    break;
  case CL_INVALID_WORK_ITEM_SIZE:
    fprintf(stderr, "CL_INVALID_WORK_ITEM_SIZE\n");
    break;
  case CL_INVALID_GLOBAL_OFFSET:
    fprintf(stderr, "CL_INVALID_GLOBAL_OFFSET\n");
    break;
  case CL_INVALID_EVENT_WAIT_LIST:
    fprintf(stderr, "CL_INVALID_EVENT_WAIT_LIST\n");
    break;
  case CL_INVALID_EVENT:
    fprintf(stderr, "CL_INVALID_EVENT\n");
    break;
  case CL_INVALID_OPERATION:
    fprintf(stderr, "CL_INVALID_OPERATION\n");
    break;
  case CL_INVALID_GL_OBJECT:
    fprintf(stderr, "CL_INVALID_GL_OBJECT\n");
    break;
  case CL_INVALID_BUFFER_SIZE:
    fprintf(stderr, "CL_INVALID_BUFFER_SIZE\n");
    break;
  case CL_INVALID_MIP_LEVEL:
    fprintf(stderr, "CL_INVALID_MIP_LEVEL\n");
    break;
  case CL_INVALID_GLOBAL_WORK_SIZE:
    fprintf(stderr, "CL_INVALID_GLOBAL_WORK_SIZE\n");
    break;
  case CL_INVALID_PROPERTY:
    fprintf(stderr, "CL_INVALID_PROPERTY\n");
    break;
  default:
    fprintf(stderr, "UNRECOGNIZED ERROR\n");
    break;
  }
  fprintf(stderr, "--------\n");
  return 1;
}


x86 assembly (clang, -O0):
<check_cl_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
jne    113d <check_cl_err+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1712 <check_cl_err+0x602>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xf73(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x30,%eax
ja     16dd <check_cl_err+0x5cd>
mov    -0x18(%rbp),%rax
lea    0xe88(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
lea    0xf50(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
lea    0xf49(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
lea    0xf46(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2e04(%rip),%rax
mov    (%rax),%edi
lea    0xf45(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
lea    0xf4b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2dcc(%rip),%rax
mov    (%rax),%edi
lea    0xf44(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
lea    0xf3f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
lea    0xf44(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
lea    0xf3d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
lea    0xf3b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2d40(%rip),%rax
mov    (%rax),%edi
lea    0xf3e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2d24(%rip),%rax
mov    (%rax),%edi
lea    0xf3c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2d08(%rip),%rax
mov    (%rax),%edi
lea    0xf30(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
lea    0xf35(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2cd0(%rip),%rax
mov    (%rax),%edi
lea    0xf47(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
lea    0xf3d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2c98(%rip),%rax
mov    (%rax),%edi
lea    0xf39(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2c7c(%rip),%rax
mov    (%rax),%edi
lea    0xf32(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2c60(%rip),%rax
mov    (%rax),%edi
lea    0xf29(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2c44(%rip),%rax
mov    (%rax),%edi
lea    0xf21(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
lea    0xf22(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2c0c(%rip),%rax
mov    (%rax),%edi
lea    0xf20(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2bf0(%rip),%rax
mov    (%rax),%edi
lea    0xf19(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2bd4(%rip),%rax
mov    (%rax),%edi
lea    0xf14(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2bb8(%rip),%rax
mov    (%rax),%edi
lea    0xf1c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2b9c(%rip),%rax
mov    (%rax),%edi
lea    0xf17(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2b80(%rip),%rax
mov    (%rax),%edi
lea    0xf0f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2b64(%rip),%rax
mov    (%rax),%edi
lea    0xf06(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2b48(%rip),%rax
mov    (%rax),%edi
lea    0xf04(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2b2c(%rip),%rax
mov    (%rax),%edi
lea    0xefc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2b10(%rip),%rax
mov    (%rax),%edi
lea    0xeff(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2af4(%rip),%rax
mov    (%rax),%edi
lea    0xefb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2ad8(%rip),%rax
mov    (%rax),%edi
lea    0xefd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2abc(%rip),%rax
mov    (%rax),%edi
lea    0xef4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2aa0(%rip),%rax
mov    (%rax),%edi
lea    0xeee(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2a84(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2a68(%rip),%rax
mov    (%rax),%edi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2a4c(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2a30(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2a14(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x29f8(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x29dc(%rip),%rax
mov    (%rax),%edi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x29c0(%rip),%rax
mov    (%rax),%edi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x29a4(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2988(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x296c(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2950(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2934(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x2918(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    16f4 <check_cl_err+0x5e4>
mov    0x28fc(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x28e5(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_cl_err>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%rcx
xor    %eax,%eax
cmp    %edi,(%rcx)
je     1180 <check_cl_err+0x70>
mov    %rsi,%rdx
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xec9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0xffffff80,%ebx
cmp    $0x30,%ebx
ja     1159 <check_cl_err+0x49>
movslq %ebx,%rax
lea    0x13ac(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
jmp    1160 <check_cl_err+0x50>
lea    0x137c(%rip),%rsi
mov    (%r14),%edi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x137c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@CL_SUCCESS = global i32 0
@stderr = global i32 0
@.str = [29 x i8] c"--------\0AMessage: %s\0AError: \00"
@.str.1 = [21 x i8] c"CL_DEVICE_NOT_FOUND\0A\00"
@.str.2 = [25 x i8] c"CL_DEVICE_NOT_AVAILABLE\0A\00"
@.str.3 = [27 x i8] c"CL_COMPILER_NOT_AVAILABLE\0A\00"
@.str.4 = [34 x i8] c"CL_MEM_OBJECT_ALLOCATION_FAILURE\0A\00"
@.str.5 = [21 x i8] c"CL_OUT_OF_RESOURCES\0A\00"
@.str.6 = [23 x i8] c"CL_OUT_OF_HOST_MEMORY\0A\00"
@.str.7 = [33 x i8] c"CL_PROFILING_INFO_NOT_AVAILABLE\0A\00"
@.str.8 = [21 x i8] c"CL_MEM_COPY_OVERLAP\0A\00"
@.str.9 = [26 x i8] c"CL_IMAGE_FORMAT_MISMATCH\0A\00"
@.str.10 = [31 x i8] c"CL_IMAGE_FORMAT_NOT_SUPPORTED\0A\00"
@.str.11 = [26 x i8] c"CL_BUILD_PROGRAM_FAILURE\0A\00"
@.str.12 = [16 x i8] c"CL_MAP_FAILURE\0A\00"
@.str.13 = [33 x i8] c"CL_MISALIGNED_SUB_BUFFER_OFFSET\0A\00"
@.str.14 = [46 x i8] c"CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST\0A\00"
@.str.15 = [18 x i8] c"CL_INVALID_VALUE\0A\00"
@.str.16 = [24 x i8] c"CL_INVALID_DEVICE_TYPE\0A\00"
@.str.17 = [21 x i8] c"CL_INVALID_PLATFORM\0A\00"
@.str.18 = [19 x i8] c"CL_INVALID_DEVICE\0A\00"
@.str.19 = [20 x i8] c"CL_INVALID_CONTEXT\0A\00"
@.str.20 = [29 x i8] c"CL_INVALID_QUEUE_PROPERTIES\0A\00"
@.str.21 = [26 x i8] c"CL_INVALID_COMMAND_QUEUE\0A\00"
@.str.22 = [21 x i8] c"CL_INVALID_HOST_PTR\0A\00"
@.str.23 = [23 x i8] c"CL_INVALID_MEM_OBJECT\0A\00"
@.str.24 = [36 x i8] c"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR\0A\00"
@.str.25 = [23 x i8] c"CL_INVALID_IMAGE_SIZE\0A\00"
@.str.26 = [20 x i8] c"CL_INVALID_SAMPLER\0A\00"
@.str.27 = [19 x i8] c"CL_INVALID_BINARY\0A\00"
@.str.28 = [26 x i8] c"CL_INVALID_BUILD_OPTIONS\0A\00"
@.str.29 = [20 x i8] c"CL_INVALID_PROGRAM\0A\00"
@.str.30 = [31 x i8] c"CL_INVALID_PROGRAM_EXECUTABLE\0A\00"
@.str.31 = [24 x i8] c"CL_INVALID_KERNEL_NAME\0A\00"
@.str.32 = [30 x i8] c"CL_INVALID_KERNEL_DEFINITION\0A\00"
@.str.33 = [19 x i8] c"CL_INVALID_KERNEL\0A\00"
@.str.34 = [22 x i8] c"CL_INVALID_ARG_INDEX\0A\00"
@.str.35 = [22 x i8] c"CL_INVALID_ARG_VALUE\0A\00"
@.str.36 = [21 x i8] c"CL_INVALID_ARG_SIZE\0A\00"
@.str.37 = [24 x i8] c"CL_INVALID_KERNEL_ARGS\0A\00"
@.str.38 = [27 x i8] c"CL_INVALID_WORK_DIMENSION\0A\00"
@.str.39 = [28 x i8] c"CL_INVALID_WORK_GROUP_SIZE\0A\00"
@.str.40 = [27 x i8] c"CL_INVALID_WORK_ITEM_SIZE\0A\00"
@.str.41 = [26 x i8] c"CL_INVALID_GLOBAL_OFFSET\0A\00"
@.str.42 = [28 x i8] c"CL_INVALID_EVENT_WAIT_LIST\0A\00"
@.str.43 = [18 x i8] c"CL_INVALID_EVENT\0A\00"
@.str.44 = [22 x i8] c"CL_INVALID_OPERATION\0A\00"
@.str.45 = [22 x i8] c"CL_INVALID_GL_OBJECT\0A\00"
@.str.46 = [24 x i8] c"CL_INVALID_BUFFER_SIZE\0A\00"
@.str.47 = [22 x i8] c"CL_INVALID_MIP_LEVEL\0A\00"
@.str.48 = [29 x i8] c"CL_INVALID_GLOBAL_WORK_SIZE\0A\00"
@.str.49 = [21 x i8] c"CL_INVALID_PROPERTY\0A\00"
@.str.50 = [20 x i8] c"UNRECOGNIZED ERROR\0A\00"
@.str.51 = [10 x i8] c"--------\0A\00"
define i32 @check_cl_err(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = load i32, i32* @CL_SUCCESS
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %168
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %5
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i32, i32* %4
switch i32 %14, label %162 [
i32 173, label %15
i32 174, label %18
i32 175, label %21
i32 132, label %24
i32 129, label %27
i32 130, label %30
i32 128, label %33
i32 133, label %36
i32 171, label %39
i32 170, label %42
i32 176, label %45
i32 134, label %48
i32 131, label %51
i32 172, label %54
i32 138, label %57
i32 160, label %60
i32 144, label %63
i32 161, label %66
i32 162, label %69
i32 140, label %72
i32 163, label %75
i32 154, label %78
i32 147, label %81
i32 153, label %84
i32 152, label %87
i32 139, label %90
i32 166, label %93
i32 164, label %96
i32 143, label %99
i32 142, label %102
i32 148, label %105
i32 149, label %108
i32 151, label %111
i32 169, label %114
i32 167, label %117
i32 168, label %120
i32 150, label %123
i32 137, label %126
i32 136, label %129
i32 135, label %132
i32 157, label %135
i32 158, label %138
i32 159, label %141
i32 145, label %144
i32 155, label %147
i32 165, label %150
i32 146, label %153
i32 156, label %156
i32 141, label %159
]
15: ; preds = %10
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %165
18: ; preds = %10
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
br label %165
21: ; preds = %10
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %165
24: ; preds = %10
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %165
27: ; preds = %10
%28 = load i32, i32* @stderr
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %165
30: ; preds = %10
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %165
33: ; preds = %10
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %165
36: ; preds = %10
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %165
39: ; preds = %10
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
br label %165
42: ; preds = %10
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
br label %165
45: ; preds = %10
%46 = load i32, i32* @stderr
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
br label %165
48: ; preds = %10
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
br label %165
51: ; preds = %10
%52 = load i32, i32* @stderr
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0))
br label %165
54: ; preds = %10
%55 = load i32, i32* @stderr
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.14, i64 0, i64 0))
br label %165
57: ; preds = %10
%58 = load i32, i32* @stderr
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
br label %165
60: ; preds = %10
%61 = load i32, i32* @stderr
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0))
br label %165
63: ; preds = %10
%64 = load i32, i32* @stderr
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
br label %165
66: ; preds = %10
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0))
br label %165
69: ; preds = %10
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
br label %165
72: ; preds = %10
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0))
br label %165
75: ; preds = %10
%76 = load i32, i32* @stderr
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.21, i64 0, i64 0))
br label %165
78: ; preds = %10
%79 = load i32, i32* @stderr
%80 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.22, i64 0, i64 0))
br label %165
81: ; preds = %10
%82 = load i32, i32* @stderr
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.23, i64 0, i64 0))
br label %165
84: ; preds = %10
%85 = load i32, i32* @stderr
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0))
br label %165
87: ; preds = %10
%88 = load i32, i32* @stderr
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0))
br label %165
90: ; preds = %10
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.26, i64 0, i64 0))
br label %165
93: ; preds = %10
%94 = load i32, i32* @stderr
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0))
br label %165
96: ; preds = %10
%97 = load i32, i32* @stderr
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.28, i64 0, i64 0))
br label %165
99: ; preds = %10
%100 = load i32, i32* @stderr
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.29, i64 0, i64 0))
br label %165
102: ; preds = %10
%103 = load i32, i32* @stderr
%104 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.30, i64 0, i64 0))
br label %165
105: ; preds = %10
%106 = load i32, i32* @stderr
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.31, i64 0, i64 0))
br label %165
108: ; preds = %10
%109 = load i32, i32* @stderr
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.32, i64 0, i64 0))
br label %165
111: ; preds = %10
%112 = load i32, i32* @stderr
%113 = call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.33, i64 0, i64 0))
br label %165
114: ; preds = %10
%115 = load i32, i32* @stderr
%116 = call i32 (i32, i8*, ...) @fprintf(i32 %115, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.34, i64 0, i64 0))
br label %165
117: ; preds = %10
%118 = load i32, i32* @stderr
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %118, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.35, i64 0, i64 0))
br label %165
120: ; preds = %10
%121 = load i32, i32* @stderr
%122 = call i32 (i32, i8*, ...) @fprintf(i32 %121, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.36, i64 0, i64 0))
br label %165
123: ; preds = %10
%124 = load i32, i32* @stderr
%125 = call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.37, i64 0, i64 0))
br label %165
126: ; preds = %10
%127 = load i32, i32* @stderr
%128 = call i32 (i32, i8*, ...) @fprintf(i32 %127, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.38, i64 0, i64 0))
br label %165
129: ; preds = %10
%130 = load i32, i32* @stderr
%131 = call i32 (i32, i8*, ...) @fprintf(i32 %130, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.39, i64 0, i64 0))
br label %165
132: ; preds = %10
%133 = load i32, i32* @stderr
%134 = call i32 (i32, i8*, ...) @fprintf(i32 %133, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.40, i64 0, i64 0))
br label %165
135: ; preds = %10
%136 = load i32, i32* @stderr
%137 = call i32 (i32, i8*, ...) @fprintf(i32 %136, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.41, i64 0, i64 0))
br label %165
138: ; preds = %10
%139 = load i32, i32* @stderr
%140 = call i32 (i32, i8*, ...) @fprintf(i32 %139, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.42, i64 0, i64 0))
br label %165
141: ; preds = %10
%142 = load i32, i32* @stderr
%143 = call i32 (i32, i8*, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.43, i64 0, i64 0))
br label %165
144: ; preds = %10
%145 = load i32, i32* @stderr
%146 = call i32 (i32, i8*, ...) @fprintf(i32 %145, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.44, i64 0, i64 0))
br label %165
147: ; preds = %10
%148 = load i32, i32* @stderr
%149 = call i32 (i32, i8*, ...) @fprintf(i32 %148, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.45, i64 0, i64 0))
br label %165
150: ; preds = %10
%151 = load i32, i32* @stderr
%152 = call i32 (i32, i8*, ...) @fprintf(i32 %151, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.46, i64 0, i64 0))
br label %165
153: ; preds = %10
%154 = load i32, i32* @stderr
%155 = call i32 (i32, i8*, ...) @fprintf(i32 %154, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.47, i64 0, i64 0))
br label %165
156: ; preds = %10
%157 = load i32, i32* @stderr
%158 = call i32 (i32, i8*, ...) @fprintf(i32 %157, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.48, i64 0, i64 0))
br label %165
159: ; preds = %10
%160 = load i32, i32* @stderr
%161 = call i32 (i32, i8*, ...) @fprintf(i32 %160, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.49, i64 0, i64 0))
br label %165
162: ; preds = %10
%163 = load i32, i32* @stderr
%164 = call i32 (i32, i8*, ...) @fprintf(i32 %163, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.50, i64 0, i64 0))
br label %165
165: ; preds = %162, %159, %156, %153, %150, %147, %144, %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
%166 = load i32, i32* @stderr
%167 = call i32 (i32, i8*, ...) @fprintf(i32 %166, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.51, i64 0, i64 0))
store i32 1, i32* %3
br label %168
168: ; preds = %165, %9
%169 = load i32, i32* %3
ret i32 %169
}

LLVM IR (-O2):
@CL_SUCCESS = global i32 0
@stderr = global i32 0
@.str = [29 x i8] c"--------\0AMessage: %s\0AError: \00"
@.str.1 = [21 x i8] c"CL_DEVICE_NOT_FOUND\0A\00"
@.str.2 = [25 x i8] c"CL_DEVICE_NOT_AVAILABLE\0A\00"
@.str.3 = [27 x i8] c"CL_COMPILER_NOT_AVAILABLE\0A\00"
@.str.4 = [34 x i8] c"CL_MEM_OBJECT_ALLOCATION_FAILURE\0A\00"
@.str.5 = [21 x i8] c"CL_OUT_OF_RESOURCES\0A\00"
@.str.6 = [23 x i8] c"CL_OUT_OF_HOST_MEMORY\0A\00"
@.str.7 = [33 x i8] c"CL_PROFILING_INFO_NOT_AVAILABLE\0A\00"
@.str.8 = [21 x i8] c"CL_MEM_COPY_OVERLAP\0A\00"
@.str.9 = [26 x i8] c"CL_IMAGE_FORMAT_MISMATCH\0A\00"
@.str.10 = [31 x i8] c"CL_IMAGE_FORMAT_NOT_SUPPORTED\0A\00"
@.str.11 = [26 x i8] c"CL_BUILD_PROGRAM_FAILURE\0A\00"
@.str.12 = [16 x i8] c"CL_MAP_FAILURE\0A\00"
@.str.13 = [33 x i8] c"CL_MISALIGNED_SUB_BUFFER_OFFSET\0A\00"
@.str.14 = [46 x i8] c"CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST\0A\00"
@.str.15 = [18 x i8] c"CL_INVALID_VALUE\0A\00"
@.str.16 = [24 x i8] c"CL_INVALID_DEVICE_TYPE\0A\00"
@.str.17 = [21 x i8] c"CL_INVALID_PLATFORM\0A\00"
@.str.18 = [19 x i8] c"CL_INVALID_DEVICE\0A\00"
@.str.19 = [20 x i8] c"CL_INVALID_CONTEXT\0A\00"
@.str.20 = [29 x i8] c"CL_INVALID_QUEUE_PROPERTIES\0A\00"
@.str.21 = [26 x i8] c"CL_INVALID_COMMAND_QUEUE\0A\00"
@.str.22 = [21 x i8] c"CL_INVALID_HOST_PTR\0A\00"
@.str.23 = [23 x i8] c"CL_INVALID_MEM_OBJECT\0A\00"
@.str.24 = [36 x i8] c"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR\0A\00"
@.str.25 = [23 x i8] c"CL_INVALID_IMAGE_SIZE\0A\00"
@.str.26 = [20 x i8] c"CL_INVALID_SAMPLER\0A\00"
@.str.27 = [19 x i8] c"CL_INVALID_BINARY\0A\00"
@.str.28 = [26 x i8] c"CL_INVALID_BUILD_OPTIONS\0A\00"
@.str.29 = [20 x i8] c"CL_INVALID_PROGRAM\0A\00"
@.str.30 = [31 x i8] c"CL_INVALID_PROGRAM_EXECUTABLE\0A\00"
@.str.31 = [24 x i8] c"CL_INVALID_KERNEL_NAME\0A\00"
@.str.32 = [30 x i8] c"CL_INVALID_KERNEL_DEFINITION\0A\00"
@.str.33 = [19 x i8] c"CL_INVALID_KERNEL\0A\00"
@.str.34 = [22 x i8] c"CL_INVALID_ARG_INDEX\0A\00"
@.str.35 = [22 x i8] c"CL_INVALID_ARG_VALUE\0A\00"
@.str.36 = [21 x i8] c"CL_INVALID_ARG_SIZE\0A\00"
@.str.37 = [24 x i8] c"CL_INVALID_KERNEL_ARGS\0A\00"
@.str.38 = [27 x i8] c"CL_INVALID_WORK_DIMENSION\0A\00"
@.str.39 = [28 x i8] c"CL_INVALID_WORK_GROUP_SIZE\0A\00"
@.str.40 = [27 x i8] c"CL_INVALID_WORK_ITEM_SIZE\0A\00"
@.str.41 = [26 x i8] c"CL_INVALID_GLOBAL_OFFSET\0A\00"
@.str.42 = [28 x i8] c"CL_INVALID_EVENT_WAIT_LIST\0A\00"
@.str.43 = [18 x i8] c"CL_INVALID_EVENT\0A\00"
@.str.44 = [22 x i8] c"CL_INVALID_OPERATION\0A\00"
@.str.45 = [22 x i8] c"CL_INVALID_GL_OBJECT\0A\00"
@.str.46 = [24 x i8] c"CL_INVALID_BUFFER_SIZE\0A\00"
@.str.47 = [22 x i8] c"CL_INVALID_MIP_LEVEL\0A\00"
@.str.48 = [29 x i8] c"CL_INVALID_GLOBAL_WORK_SIZE\0A\00"
@.str.49 = [21 x i8] c"CL_INVALID_PROPERTY\0A\00"
@.str.50 = [20 x i8] c"UNRECOGNIZED ERROR\0A\00"
@.str.51 = [10 x i8] c"--------\0A\00"
@reltable.check_cl_err = [49 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.7 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.5 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.6 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.13 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.4 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.8 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.12 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.40 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.39 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.38 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.15 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.26 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.20 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.49 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.30 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.29 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.17 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.44 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.47 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.23 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.31 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.32 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.37 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.33 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.25 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.24 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.22 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.45 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.48 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.41 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.42 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.43 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.16 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.18 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.19 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.21 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.28 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.46 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.27 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.35 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.36 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.34 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.10 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.9 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([46 x i8]* @.str.14 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.1 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str.2 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.3 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.11 to i64), i64 ptrtoint ([49 x i32]* @reltable.check_cl_err to i64)) to i32)]
define i32 @check_cl_err(i32 %0, i8* %1) {
%3 = load i32, i32* @CL_SUCCESS
%4 = icmp eq i32 %3, %0
br i1 %4, label %20, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = add i32 %0, -128
%9 = icmp ult i32 %8, 49
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = sext i32 %8 to i64
%12 = shl i64 %11, 2
%13 = call i8* @llvm.load.relative.i64(i8* bitcast ([49 x i32]* @reltable.check_cl_err to i8*), i64 %12)
br label %14
14: ; preds = %5, %10
%15 = phi i8* [ %13, %10 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.50, i64 0, i64 0), %5 ]
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* %15)
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.51, i64 0, i64 0))
br label %20
20: ; preds = %2, %14
%21 = phi i32 [ 1, %14 ], [ 0, %2 ]
ret i32 %21
}