#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 scalar_t__ cl_int;

/* Variables and functions */
scalar_t__ CL_INVALID_COMMAND_QUEUE;
scalar_t__ CL_INVALID_CONTEXT;
scalar_t__ CL_INVALID_EVENT_WAIT_LIST;
scalar_t__ CL_INVALID_GLOBAL_OFFSET;
scalar_t__ CL_INVALID_GLOBAL_WORK_SIZE;
scalar_t__ CL_INVALID_IMAGE_SIZE;
scalar_t__ CL_INVALID_KERNEL;
scalar_t__ CL_INVALID_KERNEL_ARGS;
scalar_t__ CL_INVALID_PROGRAM_EXECUTABLE;
scalar_t__ CL_INVALID_WORK_DIMENSION;
scalar_t__ CL_INVALID_WORK_GROUP_SIZE;
scalar_t__ CL_INVALID_WORK_ITEM_SIZE;
scalar_t__ CL_MEM_OBJECT_ALLOCATION_FAILURE;
scalar_t__ CL_MISALIGNED_SUB_BUFFER_OFFSET;
scalar_t__ CL_OUT_OF_HOST_MEMORY;
scalar_t__ CL_OUT_OF_RESOURCES;
scalar_t__ CL_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void clEnqueueNDRangeChecker(cl_int *err) {
  if (*err == CL_INVALID_PROGRAM_EXECUTABLE)
    fprintf(stderr, "Err (clEnqueueNDRange): No successfully built program "
                    "executable available\n");
  else if (*err == CL_INVALID_COMMAND_QUEUE)
    fprintf(stderr,
            "Err (clEnqueueNDRange): Okay so the command queue is not right\n");
  else if (*err == CL_INVALID_KERNEL)
    fprintf(stderr, "Err (clEnqueueNDRange): Invalid Kernel Object\n");
  else if (*err == CL_INVALID_CONTEXT)
    fprintf(stderr, "Err (clEnqueueNDRange): Invalid Context\n");
  else if (*err == CL_INVALID_KERNEL_ARGS)
    fprintf(stderr, "Err (clEnqueueNDRange): Invalid Kernel Arguments\n");
  else if (*err == CL_INVALID_WORK_DIMENSION)
    fprintf(stderr, "Err (clEnqueueNDRange): IF WORK DIMENSIONS IS NOT VALID "
                    "VALUE THAT IS BETWEEN 1 AND 3\n");
  else if (*err == CL_INVALID_GLOBAL_WORK_SIZE)
    fprintf(stderr, "Err (clEnqueueNDRange): Invalid Global Work Size. Check "
                    "for 0 or NULL\n");
  else if (*err == CL_INVALID_GLOBAL_OFFSET)
    fprintf(stderr, "Err (clEnqueueNDRange): Offset greater or invalid\n");
  else if (*err == CL_INVALID_WORK_GROUP_SIZE) {
    fprintf(stderr, "Err (clEnqueueNDRange): IF WORK GROUP SIZE IS NOT EVENLY "
                    "DIVISIABLE BY LOCAL WORK SIZE\n");
    exit(0);
  } else if (*err == CL_INVALID_WORK_ITEM_SIZE)
    fprintf(stderr, "Err (clEnqueueNDRange): IF NUMBER OF ITEMS IS GREATER "
                    "THAN CL_DEVICE_MAX_WORK_ITEM_SIZES\n");
  else if (*err == CL_MISALIGNED_SUB_BUFFER_OFFSET)
    fprintf(stderr,
            "Err (clEnqueueNDRange): Sub Buffer Offset error or misaligned\n");
  else if (*err == CL_INVALID_IMAGE_SIZE)
    fprintf(stderr, "Err (clEnqueueNDRange): Invalid Image Size\n");
  else if (*err == CL_OUT_OF_RESOURCES)
    fprintf(stderr, "Err (clEnqueueNDRange): Insufficient resources\n");
  else if (*err == CL_MEM_OBJECT_ALLOCATION_FAILURE)
    fprintf(stderr, "Err (clEnqueueNDRange): Failure to allocate data storage "
                    "mem associated with image or buffer objects\n");
  else if (*err == CL_INVALID_EVENT_WAIT_LIST)
    fprintf(stderr, "Err (clEnqueueNDRange): Event list is NULL but number in "
                    "event list is > 0\n");
  else if (*err == CL_OUT_OF_HOST_MEMORY)
    fprintf(stderr,
            "Err (clEnqueueNDRange): Failure to allocate resources on host\n");
  else {
    if (*err != CL_SUCCESS)
      fprintf(stderr, "Err (clEnqueueNDRange): Unknown Error\n");
  }
}


x86 assembly (clang, -O0):
<clEnqueueNDRangeChecker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
jne    115d <clEnqueueNDRangeChecker+0x3d>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
jmp    14ba <clEnqueueNDRangeChecker+0x39a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2e75(%rip),%rcx
cmp    (%rcx),%rax
jne    118e <clEnqueueNDRangeChecker+0x6e>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
jmp    14b5 <clEnqueueNDRangeChecker+0x395>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2e2c(%rip),%rcx
cmp    (%rcx),%rax
jne    11bf <clEnqueueNDRangeChecker+0x9f>
mov    0x2dcc(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
call   1030 <fprintf@plt>
jmp    14b0 <clEnqueueNDRangeChecker+0x390>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2de3(%rip),%rcx
cmp    (%rcx),%rax
jne    11f0 <clEnqueueNDRangeChecker+0xd0>
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
jmp    14ab <clEnqueueNDRangeChecker+0x38b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2dd2(%rip),%rcx
cmp    (%rcx),%rax
jne    1221 <clEnqueueNDRangeChecker+0x101>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
jmp    14a6 <clEnqueueNDRangeChecker+0x386>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2d91(%rip),%rcx
cmp    (%rcx),%rax
jne    1252 <clEnqueueNDRangeChecker+0x132>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
jmp    14a1 <clEnqueueNDRangeChecker+0x381>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2d90(%rip),%rcx
cmp    (%rcx),%rax
jne    1283 <clEnqueueNDRangeChecker+0x163>
mov    0x2d08(%rip),%rax
mov    (%rax),%edi
lea    0xef4(%rip),%rsi
call   1030 <fprintf@plt>
jmp    149c <clEnqueueNDRangeChecker+0x37c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2d07(%rip),%rcx
cmp    (%rcx),%rax
jne    12b4 <clEnqueueNDRangeChecker+0x194>
mov    0x2cd7(%rip),%rax
mov    (%rax),%edi
lea    0xf0a(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1497 <clEnqueueNDRangeChecker+0x377>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2cae(%rip),%rcx
cmp    (%rcx),%rax
jne    12e7 <clEnqueueNDRangeChecker+0x1c7>
mov    0x2ca6(%rip),%rax
mov    (%rax),%edi
lea    0xf0c(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2c9b(%rip),%rcx
cmp    (%rcx),%rax
jne    1318 <clEnqueueNDRangeChecker+0x1f8>
mov    0x2c73(%rip),%rax
mov    (%rax),%edi
lea    0xf31(%rip),%rsi
call   1030 <fprintf@plt>
jmp    148d <clEnqueueNDRangeChecker+0x36d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2c32(%rip),%rcx
cmp    (%rcx),%rax
jne    1349 <clEnqueueNDRangeChecker+0x229>
mov    0x2c42(%rip),%rax
mov    (%rax),%edi
lea    0xf5a(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1488 <clEnqueueNDRangeChecker+0x368>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2c49(%rip),%rcx
cmp    (%rcx),%rax
jne    137a <clEnqueueNDRangeChecker+0x25a>
mov    0x2c11(%rip),%rax
mov    (%rax),%edi
lea    0xf68(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1483 <clEnqueueNDRangeChecker+0x363>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2c30(%rip),%rcx
cmp    (%rcx),%rax
jne    13ab <clEnqueueNDRangeChecker+0x28b>
mov    0x2be0(%rip),%rax
mov    (%rax),%edi
lea    0xf63(%rip),%rsi
call   1030 <fprintf@plt>
jmp    147e <clEnqueueNDRangeChecker+0x35e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2b97(%rip),%rcx
cmp    (%rcx),%rax
jne    13dc <clEnqueueNDRangeChecker+0x2bc>
mov    0x2baf(%rip),%rax
mov    (%rax),%edi
lea    0xf62(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1479 <clEnqueueNDRangeChecker+0x359>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2bbe(%rip),%rcx
cmp    (%rcx),%rax
jne    140d <clEnqueueNDRangeChecker+0x2ed>
mov    0x2b7e(%rip),%rax
mov    (%rax),%edi
lea    0xf97(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1474 <clEnqueueNDRangeChecker+0x354>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2b65(%rip),%rcx
cmp    (%rcx),%rax
jne    143e <clEnqueueNDRangeChecker+0x31e>
mov    0x2b4d(%rip),%rax
mov    (%rax),%edi
lea    0xfb2(%rip),%rsi
call   1030 <fprintf@plt>
jmp    146f <clEnqueueNDRangeChecker+0x34f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2b1c(%rip),%rcx
cmp    (%rcx),%rax
je     146a <clEnqueueNDRangeChecker+0x34a>
mov    0x2b1c(%rip),%rax
mov    (%rax),%edi
lea    0xfc0(%rip),%rsi
call   1030 <fprintf@plt>
jmp    146f <clEnqueueNDRangeChecker+0x34f>
jmp    1474 <clEnqueueNDRangeChecker+0x354>
jmp    1479 <clEnqueueNDRangeChecker+0x359>
jmp    147e <clEnqueueNDRangeChecker+0x35e>
jmp    1483 <clEnqueueNDRangeChecker+0x363>
jmp    1488 <clEnqueueNDRangeChecker+0x368>
jmp    148d <clEnqueueNDRangeChecker+0x36d>
jmp    1492 <clEnqueueNDRangeChecker+0x372>
jmp    1497 <clEnqueueNDRangeChecker+0x377>
jmp    149c <clEnqueueNDRangeChecker+0x37c>
jmp    14a1 <clEnqueueNDRangeChecker+0x381>
jmp    14a6 <clEnqueueNDRangeChecker+0x386>
jmp    14ab <clEnqueueNDRangeChecker+0x38b>
jmp    14b0 <clEnqueueNDRangeChecker+0x390>
jmp    14b5 <clEnqueueNDRangeChecker+0x395>
jmp    14ba <clEnqueueNDRangeChecker+0x39a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clEnqueueNDRangeChecker>:
push   %rax
mov    (%rdi),%rax
mov    0x2ead(%rip),%rcx
cmp    (%rcx),%rax
jne    113c <clEnqueueNDRangeChecker+0x1c>
lea    0xec9(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%rax
jne    1154 <clEnqueueNDRangeChecker+0x34>
lea    0xefd(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2e6d(%rip),%rcx
cmp    (%rcx),%rax
jne    116c <clEnqueueNDRangeChecker+0x4c>
lea    0xf25(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2e3d(%rip),%rcx
cmp    (%rcx),%rax
jne    1184 <clEnqueueNDRangeChecker+0x64>
lea    0xf3c(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2e45(%rip),%rcx
cmp    (%rcx),%rax
jne    119c <clEnqueueNDRangeChecker+0x7c>
lea    0xf4d(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2e1d(%rip),%rcx
cmp    (%rcx),%rax
jne    11b4 <clEnqueueNDRangeChecker+0x94>
lea    0xf67(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2e35(%rip),%rcx
cmp    (%rcx),%rax
jne    11cc <clEnqueueNDRangeChecker+0xac>
lea    0xfa6(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2dc5(%rip),%rcx
cmp    (%rcx),%rax
jne    11e4 <clEnqueueNDRangeChecker+0xc4>
lea    0xfd5(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2d85(%rip),%rcx
cmp    (%rcx),%rax
je     12ae <clEnqueueNDRangeChecker+0x18e>
mov    0x2d95(%rip),%rcx
cmp    (%rcx),%rax
jne    120c <clEnqueueNDRangeChecker+0xec>
lea    0x1038(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2d45(%rip),%rcx
cmp    (%rcx),%rax
jne    1221 <clEnqueueNDRangeChecker+0x101>
lea    0x107a(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2d78(%rip),%rcx
cmp    (%rcx),%rax
jne    1236 <clEnqueueNDRangeChecker+0x116>
lea    0x10a4(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2d7b(%rip),%rcx
cmp    (%rcx),%rax
jne    124b <clEnqueueNDRangeChecker+0x12b>
lea    0x10bb(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2cfe(%rip),%rcx
cmp    (%rcx),%rax
jne    1260 <clEnqueueNDRangeChecker+0x140>
lea    0x10d6(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2d41(%rip),%rcx
cmp    (%rcx),%rax
jne    1275 <clEnqueueNDRangeChecker+0x155>
lea    0x1127(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2d04(%rip),%rcx
cmp    (%rcx),%rax
jne    128a <clEnqueueNDRangeChecker+0x16a>
lea    0x115e(%rip),%rsi
jmp    129f <clEnqueueNDRangeChecker+0x17f>
mov    0x2cd7(%rip),%rcx
cmp    (%rcx),%rax
jne    1298 <clEnqueueNDRangeChecker+0x178>
pop    %rax
ret
lea    0x1186(%rip),%rsi
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <fprintf@plt>
mov    0x2cc3(%rip),%rax
mov    (%rax),%edi
lea    0xf29(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@CL_INVALID_PROGRAM_EXECUTABLE = global i64 0
@stderr = global i32 0
@.str = [76 x i8] c"Err (clEnqueueNDRange): No successfully built program executable available\0A\00"
@CL_INVALID_COMMAND_QUEUE = global i64 0
@.str.1 = [64 x i8] c"Err (clEnqueueNDRange): Okay so the command queue is not right\0A\00"
@CL_INVALID_KERNEL = global i64 0
@.str.2 = [47 x i8] c"Err (clEnqueueNDRange): Invalid Kernel Object\0A\00"
@CL_INVALID_CONTEXT = global i64 0
@.str.3 = [41 x i8] c"Err (clEnqueueNDRange): Invalid Context\0A\00"
@CL_INVALID_KERNEL_ARGS = global i64 0
@.str.4 = [50 x i8] c"Err (clEnqueueNDRange): Invalid Kernel Arguments\0A\00"
@CL_INVALID_WORK_DIMENSION = global i64 0
@.str.5 = [87 x i8] c"Err (clEnqueueNDRange): IF WORK DIMENSIONS IS NOT VALID VALUE THAT IS BETWEEN 1 AND 3\0A\00"
@CL_INVALID_GLOBAL_WORK_SIZE = global i64 0
@.str.6 = [71 x i8] c"Err (clEnqueueNDRange): Invalid Global Work Size. Check for 0 or NULL\0A\00"
@CL_INVALID_GLOBAL_OFFSET = global i64 0
@.str.7 = [51 x i8] c"Err (clEnqueueNDRange): Offset greater or invalid\0A\00"
@CL_INVALID_WORK_GROUP_SIZE = global i64 0
@.str.8 = [88 x i8] c"Err (clEnqueueNDRange): IF WORK GROUP SIZE IS NOT EVENLY DIVISIABLE BY LOCAL WORK SIZE\0A\00"
@CL_INVALID_WORK_ITEM_SIZE = global i64 0
@.str.9 = [90 x i8] c"Err (clEnqueueNDRange): IF NUMBER OF ITEMS IS GREATER THAN CL_DEVICE_MAX_WORK_ITEM_SIZES\0A\00"
@CL_MISALIGNED_SUB_BUFFER_OFFSET = global i64 0
@.str.10 = [63 x i8] c"Err (clEnqueueNDRange): Sub Buffer Offset error or misaligned\0A\00"
@CL_INVALID_IMAGE_SIZE = global i64 0
@.str.11 = [44 x i8] c"Err (clEnqueueNDRange): Invalid Image Size\0A\00"
@CL_OUT_OF_RESOURCES = global i64 0
@.str.12 = [48 x i8] c"Err (clEnqueueNDRange): Insufficient resources\0A\00"
@CL_MEM_OBJECT_ALLOCATION_FAILURE = global i64 0
@.str.13 = [102 x i8] c"Err (clEnqueueNDRange): Failure to allocate data storage mem associated with image or buffer objects\0A\00"
@CL_INVALID_EVENT_WAIT_LIST = global i64 0
@.str.14 = [76 x i8] c"Err (clEnqueueNDRange): Event list is NULL but number in event list is > 0\0A\00"
@CL_OUT_OF_HOST_MEMORY = global i64 0
@.str.15 = [63 x i8] c"Err (clEnqueueNDRange): Failure to allocate resources on host\0A\00"
@CL_SUCCESS = global i64 0
@.str.16 = [39 x i8] c"Err (clEnqueueNDRange): Unknown Error\0A\00"
define void @clEnqueueNDRangeChecker(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = load i64, i64* @CL_INVALID_PROGRAM_EXECUTABLE
%6 = icmp eq i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
br label %155
10: ; preds = %1
%11 = load i64*, i64** %2
%12 = load i64, i64* %11
%13 = load i64, i64* @CL_INVALID_COMMAND_QUEUE
%14 = icmp eq i64 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
br label %154
18: ; preds = %10
%19 = load i64*, i64** %2
%20 = load i64, i64* %19
%21 = load i64, i64* @CL_INVALID_KERNEL
%22 = icmp eq i64 %20, %21
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = load i32, i32* @stderr
%25 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
br label %153
26: ; preds = %18
%27 = load i64*, i64** %2
%28 = load i64, i64* %27
%29 = load i64, i64* @CL_INVALID_CONTEXT
%30 = icmp eq i64 %28, %29
br i1 %30, label %31, label %34
31: ; preds = %26
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
br label %152
34: ; preds = %26
%35 = load i64*, i64** %2
%36 = load i64, i64* %35
%37 = load i64, i64* @CL_INVALID_KERNEL_ARGS
%38 = icmp eq i64 %36, %37
br i1 %38, label %39, label %42
39: ; preds = %34
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
br label %151
42: ; preds = %34
%43 = load i64*, i64** %2
%44 = load i64, i64* %43
%45 = load i64, i64* @CL_INVALID_WORK_DIMENSION
%46 = icmp eq i64 %44, %45
br i1 %46, label %47, label %50
47: ; preds = %42
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.5, i64 0, i64 0))
br label %150
50: ; preds = %42
%51 = load i64*, i64** %2
%52 = load i64, i64* %51
%53 = load i64, i64* @CL_INVALID_GLOBAL_WORK_SIZE
%54 = icmp eq i64 %52, %53
br i1 %54, label %55, label %58
55: ; preds = %50
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0))
br label %149
58: ; preds = %50
%59 = load i64*, i64** %2
%60 = load i64, i64* %59
%61 = load i64, i64* @CL_INVALID_GLOBAL_OFFSET
%62 = icmp eq i64 %60, %61
br i1 %62, label %63, label %66
63: ; preds = %58
%64 = load i32, i32* @stderr
%65 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
br label %148
66: ; preds = %58
%67 = load i64*, i64** %2
%68 = load i64, i64* %67
%69 = load i64, i64* @CL_INVALID_WORK_GROUP_SIZE
%70 = icmp eq i64 %68, %69
br i1 %70, label %71, label %75
71: ; preds = %66
%72 = load i32, i32* @stderr
%73 = call i32 @fprintf(i32 %72, i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.8, i64 0, i64 0))
%74 = call i32 @exit(i32 0)
unreachable
75: ; preds = %66
%76 = load i64*, i64** %2
%77 = load i64, i64* %76
%78 = load i64, i64* @CL_INVALID_WORK_ITEM_SIZE
%79 = icmp eq i64 %77, %78
br i1 %79, label %80, label %83
80: ; preds = %75
%81 = load i32, i32* @stderr
%82 = call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.9, i64 0, i64 0))
br label %146
83: ; preds = %75
%84 = load i64*, i64** %2
%85 = load i64, i64* %84
%86 = load i64, i64* @CL_MISALIGNED_SUB_BUFFER_OFFSET
%87 = icmp eq i64 %85, %86
br i1 %87, label %88, label %91
88: ; preds = %83
%89 = load i32, i32* @stderr
%90 = call i32 @fprintf(i32 %89, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0))
br label %145
91: ; preds = %83
%92 = load i64*, i64** %2
%93 = load i64, i64* %92
%94 = load i64, i64* @CL_INVALID_IMAGE_SIZE
%95 = icmp eq i64 %93, %94
br i1 %95, label %96, label %99
96: ; preds = %91
%97 = load i32, i32* @stderr
%98 = call i32 @fprintf(i32 %97, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.11, i64 0, i64 0))
br label %144
99: ; preds = %91
%100 = load i64*, i64** %2
%101 = load i64, i64* %100
%102 = load i64, i64* @CL_OUT_OF_RESOURCES
%103 = icmp eq i64 %101, %102
br i1 %103, label %104, label %107
104: ; preds = %99
%105 = load i32, i32* @stderr
%106 = call i32 @fprintf(i32 %105, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
br label %143
107: ; preds = %99
%108 = load i64*, i64** %2
%109 = load i64, i64* %108
%110 = load i64, i64* @CL_MEM_OBJECT_ALLOCATION_FAILURE
%111 = icmp eq i64 %109, %110
br i1 %111, label %112, label %115
112: ; preds = %107
%113 = load i32, i32* @stderr
%114 = call i32 @fprintf(i32 %113, i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.13, i64 0, i64 0))
br label %142
115: ; preds = %107
%116 = load i64*, i64** %2
%117 = load i64, i64* %116
%118 = load i64, i64* @CL_INVALID_EVENT_WAIT_LIST
%119 = icmp eq i64 %117, %118
br i1 %119, label %120, label %123
120: ; preds = %115
%121 = load i32, i32* @stderr
%122 = call i32 @fprintf(i32 %121, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.14, i64 0, i64 0))
br label %141
123: ; preds = %115
%124 = load i64*, i64** %2
%125 = load i64, i64* %124
%126 = load i64, i64* @CL_OUT_OF_HOST_MEMORY
%127 = icmp eq i64 %125, %126
br i1 %127, label %128, label %131
128: ; preds = %123
%129 = load i32, i32* @stderr
%130 = call i32 @fprintf(i32 %129, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.15, i64 0, i64 0))
br label %140
131: ; preds = %123
%132 = load i64*, i64** %2
%133 = load i64, i64* %132
%134 = load i64, i64* @CL_SUCCESS
%135 = icmp ne i64 %133, %134
br i1 %135, label %136, label %139
136: ; preds = %131
%137 = load i32, i32* @stderr
%138 = call i32 @fprintf(i32 %137, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0))
br label %139
139: ; preds = %136, %131
br label %140
140: ; preds = %139, %128
br label %141
141: ; preds = %140, %120
br label %142
142: ; preds = %141, %112
br label %143
143: ; preds = %142, %104
br label %144
144: ; preds = %143, %96
br label %145
145: ; preds = %144, %88
br label %146
146: ; preds = %145, %80
br label %147
147: ; preds = %146
br label %148
148: ; preds = %147, %63
br label %149
149: ; preds = %148, %55
br label %150
150: ; preds = %149, %47
br label %151
151: ; preds = %150, %39
br label %152
152: ; preds = %151, %31
br label %153
153: ; preds = %152, %23
br label %154
154: ; preds = %153, %15
br label %155
155: ; preds = %154, %7
ret void
}

LLVM IR (-O2):
@CL_INVALID_PROGRAM_EXECUTABLE = global i64 0
@stderr = global i32 0
@.str = [76 x i8] c"Err (clEnqueueNDRange): No successfully built program executable available\0A\00"
@CL_INVALID_COMMAND_QUEUE = global i64 0
@.str.1 = [64 x i8] c"Err (clEnqueueNDRange): Okay so the command queue is not right\0A\00"
@CL_INVALID_KERNEL = global i64 0
@.str.2 = [47 x i8] c"Err (clEnqueueNDRange): Invalid Kernel Object\0A\00"
@CL_INVALID_CONTEXT = global i64 0
@.str.3 = [41 x i8] c"Err (clEnqueueNDRange): Invalid Context\0A\00"
@CL_INVALID_KERNEL_ARGS = global i64 0
@.str.4 = [50 x i8] c"Err (clEnqueueNDRange): Invalid Kernel Arguments\0A\00"
@CL_INVALID_WORK_DIMENSION = global i64 0
@.str.5 = [87 x i8] c"Err (clEnqueueNDRange): IF WORK DIMENSIONS IS NOT VALID VALUE THAT IS BETWEEN 1 AND 3\0A\00"
@CL_INVALID_GLOBAL_WORK_SIZE = global i64 0
@.str.6 = [71 x i8] c"Err (clEnqueueNDRange): Invalid Global Work Size. Check for 0 or NULL\0A\00"
@CL_INVALID_GLOBAL_OFFSET = global i64 0
@.str.7 = [51 x i8] c"Err (clEnqueueNDRange): Offset greater or invalid\0A\00"
@CL_INVALID_WORK_GROUP_SIZE = global i64 0
@.str.8 = [88 x i8] c"Err (clEnqueueNDRange): IF WORK GROUP SIZE IS NOT EVENLY DIVISIABLE BY LOCAL WORK SIZE\0A\00"
@CL_INVALID_WORK_ITEM_SIZE = global i64 0
@.str.9 = [90 x i8] c"Err (clEnqueueNDRange): IF NUMBER OF ITEMS IS GREATER THAN CL_DEVICE_MAX_WORK_ITEM_SIZES\0A\00"
@CL_MISALIGNED_SUB_BUFFER_OFFSET = global i64 0
@.str.10 = [63 x i8] c"Err (clEnqueueNDRange): Sub Buffer Offset error or misaligned\0A\00"
@CL_INVALID_IMAGE_SIZE = global i64 0
@.str.11 = [44 x i8] c"Err (clEnqueueNDRange): Invalid Image Size\0A\00"
@CL_OUT_OF_RESOURCES = global i64 0
@.str.12 = [48 x i8] c"Err (clEnqueueNDRange): Insufficient resources\0A\00"
@CL_MEM_OBJECT_ALLOCATION_FAILURE = global i64 0
@.str.13 = [102 x i8] c"Err (clEnqueueNDRange): Failure to allocate data storage mem associated with image or buffer objects\0A\00"
@CL_INVALID_EVENT_WAIT_LIST = global i64 0
@.str.14 = [76 x i8] c"Err (clEnqueueNDRange): Event list is NULL but number in event list is > 0\0A\00"
@CL_OUT_OF_HOST_MEMORY = global i64 0
@.str.15 = [63 x i8] c"Err (clEnqueueNDRange): Failure to allocate resources on host\0A\00"
@CL_SUCCESS = global i64 0
@.str.16 = [39 x i8] c"Err (clEnqueueNDRange): Unknown Error\0A\00"
define void @clEnqueueNDRangeChecker(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = load i64, i64* @CL_INVALID_PROGRAM_EXECUTABLE
%4 = icmp eq i64 %2, %3
br i1 %4, label %57, label %5
5: ; preds = %1
%6 = load i64, i64* @CL_INVALID_COMMAND_QUEUE
%7 = icmp eq i64 %2, %6
br i1 %7, label %57, label %8
8: ; preds = %5
%9 = load i64, i64* @CL_INVALID_KERNEL
%10 = icmp eq i64 %2, %9
br i1 %10, label %57, label %11
11: ; preds = %8
%12 = load i64, i64* @CL_INVALID_CONTEXT
%13 = icmp eq i64 %2, %12
br i1 %13, label %57, label %14
14: ; preds = %11
%15 = load i64, i64* @CL_INVALID_KERNEL_ARGS
%16 = icmp eq i64 %2, %15
br i1 %16, label %57, label %17
17: ; preds = %14
%18 = load i64, i64* @CL_INVALID_WORK_DIMENSION
%19 = icmp eq i64 %2, %18
br i1 %19, label %57, label %20
20: ; preds = %17
%21 = load i64, i64* @CL_INVALID_GLOBAL_WORK_SIZE
%22 = icmp eq i64 %2, %21
br i1 %22, label %57, label %23
23: ; preds = %20
%24 = load i64, i64* @CL_INVALID_GLOBAL_OFFSET
%25 = icmp eq i64 %2, %24
br i1 %25, label %57, label %26
26: ; preds = %23
%27 = load i64, i64* @CL_INVALID_WORK_GROUP_SIZE
%28 = icmp eq i64 %2, %27
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = load i32, i32* @stderr
%31 = tail call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.8, i64 0, i64 0))
%32 = tail call i32 @exit(i32 0)
unreachable
33: ; preds = %26
%34 = load i64, i64* @CL_INVALID_WORK_ITEM_SIZE
%35 = icmp eq i64 %2, %34
br i1 %35, label %57, label %36
36: ; preds = %33
%37 = load i64, i64* @CL_MISALIGNED_SUB_BUFFER_OFFSET
%38 = icmp eq i64 %2, %37
br i1 %38, label %57, label %39
39: ; preds = %36
%40 = load i64, i64* @CL_INVALID_IMAGE_SIZE
%41 = icmp eq i64 %2, %40
br i1 %41, label %57, label %42
42: ; preds = %39
%43 = load i64, i64* @CL_OUT_OF_RESOURCES
%44 = icmp eq i64 %2, %43
br i1 %44, label %57, label %45
45: ; preds = %42
%46 = load i64, i64* @CL_MEM_OBJECT_ALLOCATION_FAILURE
%47 = icmp eq i64 %2, %46
br i1 %47, label %57, label %48
48: ; preds = %45
%49 = load i64, i64* @CL_INVALID_EVENT_WAIT_LIST
%50 = icmp eq i64 %2, %49
br i1 %50, label %57, label %51
51: ; preds = %48
%52 = load i64, i64* @CL_OUT_OF_HOST_MEMORY
%53 = icmp eq i64 %2, %52
br i1 %53, label %57, label %54
54: ; preds = %51
%55 = load i64, i64* @CL_SUCCESS
%56 = icmp eq i64 %2, %55
br i1 %56, label %61, label %57
57: ; preds = %54, %51, %48, %45, %42, %39, %36, %33, %23, %20, %17, %14, %11, %8, %5, %1
%58 = phi i8* [ getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), %5 ], [ getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), %8 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), %11 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), %14 ], [ getelementptr inbounds ([87 x i8], [87 x i8]* @.str.5, i64 0, i64 0), %17 ], [ getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0), %20 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), %23 ], [ getelementptr inbounds ([90 x i8], [90 x i8]* @.str.9, i64 0, i64 0), %33 ], [ getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0), %36 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.11, i64 0, i64 0), %39 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0), %42 ], [ getelementptr inbounds ([102 x i8], [102 x i8]* @.str.13, i64 0, i64 0), %45 ], [ getelementptr inbounds ([76 x i8], [76 x i8]* @.str.14, i64 0, i64 0), %48 ], [ getelementptr inbounds ([63 x i8], [63 x i8]* @.str.15, i64 0, i64 0), %51 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0), %54 ]
%59 = load i32, i32* @stderr
%60 = tail call i32 @fprintf(i32 %59, i8* %58)
br label %61
61: ; preds = %57, %54
ret void
}