#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_KERNEL;
scalar_t__ CL_INVALID_KERNEL_ARGS;
scalar_t__ CL_INVALID_PROGRAM_EXECUTABLE;
scalar_t__ CL_MEM_OBJECT_ALLOCATION_FAILURE;
scalar_t__ CL_OUT_OF_RESOURCES;
scalar_t__ CL_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void clEnqueueTaskChecker(cl_int *err) {
  if (*err == CL_INVALID_PROGRAM_EXECUTABLE)
    fprintf(stderr, "Err (clEnqueueTask): No successfully built program "
                    "executable available\n");
  else if (*err == CL_INVALID_COMMAND_QUEUE)
    fprintf(stderr,
            "Err (clEnqueueTask): Okay so the command queue is not right\n");
  else if (*err == CL_INVALID_KERNEL)
    fprintf(stderr, "Err (clEnqueueTask): Invalid Kernel Object\n");
  else if (*err == CL_INVALID_KERNEL_ARGS)
    fprintf(stderr, "Err (clEnqueueTask): Invalid Kernel Arguments\n");
  else if (*err == CL_OUT_OF_RESOURCES)
    fprintf(stderr, "Err (clEnqueueTask): Insufficient resources\n");
  else if (*err == CL_MEM_OBJECT_ALLOCATION_FAILURE)
    fprintf(stderr, "Err (clEnqueueTask): Failure to allocate memory for data "
                    "storage associated with image or buffer objects\n");
  else {
    if (*err != CL_SUCCESS)
      fprintf(stderr, "Err (clEnqueueTask): Unknown Error\n");
  }
}


x86 assembly (clang, -O0):
<clEnqueueTaskChecker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%rax
jne    114d <clEnqueueTaskChecker+0x3d>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
jmp    128c <clEnqueueTaskChecker+0x17c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
jne    117e <clEnqueueTaskChecker+0x6e>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1287 <clEnqueueTaskChecker+0x177>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2e44(%rip),%rcx
cmp    (%rcx),%rax
jne    11af <clEnqueueTaskChecker+0x9f>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
lea    0xee1(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1282 <clEnqueueTaskChecker+0x172>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2e1b(%rip),%rcx
cmp    (%rcx),%rax
jne    11e0 <clEnqueueTaskChecker+0xd0>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
jmp    127d <clEnqueueTaskChecker+0x16d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2dda(%rip),%rcx
cmp    (%rcx),%rax
jne    1211 <clEnqueueTaskChecker+0x101>
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1278 <clEnqueueTaskChecker+0x168>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2d81(%rip),%rcx
cmp    (%rcx),%rax
jne    1242 <clEnqueueTaskChecker+0x132>
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
lea    0xed6(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1273 <clEnqueueTaskChecker+0x163>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2d60(%rip),%rcx
cmp    (%rcx),%rax
je     126e <clEnqueueTaskChecker+0x15e>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
lea    0xf0f(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1273 <clEnqueueTaskChecker+0x163>
jmp    1278 <clEnqueueTaskChecker+0x168>
jmp    127d <clEnqueueTaskChecker+0x16d>
jmp    1282 <clEnqueueTaskChecker+0x172>
jmp    1287 <clEnqueueTaskChecker+0x177>
jmp    128c <clEnqueueTaskChecker+0x17c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clEnqueueTaskChecker>:
mov    (%rdi),%rax
mov    0x2ec6(%rip),%rcx
cmp    (%rcx),%rax
jne    1128 <clEnqueueTaskChecker+0x18>
lea    0xeda(%rip),%rsi
jmp    11a5 <clEnqueueTaskChecker+0x95>
mov    0x2eb9(%rip),%rcx
cmp    (%rcx),%rax
jne    113d <clEnqueueTaskChecker+0x2d>
lea    0xf0e(%rip),%rsi
jmp    11a5 <clEnqueueTaskChecker+0x95>
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%rax
jne    1152 <clEnqueueTaskChecker+0x42>
lea    0xf36(%rip),%rsi
jmp    11a5 <clEnqueueTaskChecker+0x95>
mov    0x2e7f(%rip),%rcx
cmp    (%rcx),%rax
jne    1167 <clEnqueueTaskChecker+0x57>
lea    0xf4d(%rip),%rsi
jmp    11a5 <clEnqueueTaskChecker+0x95>
mov    0x2e5a(%rip),%rcx
cmp    (%rcx),%rax
jne    117c <clEnqueueTaskChecker+0x6c>
lea    0xf67(%rip),%rsi
jmp    11a5 <clEnqueueTaskChecker+0x95>
mov    0x2e1d(%rip),%rcx
cmp    (%rcx),%rax
jne    1191 <clEnqueueTaskChecker+0x81>
lea    0xf7f(%rip),%rsi
jmp    11a5 <clEnqueueTaskChecker+0x95>
mov    0x2e18(%rip),%rcx
cmp    (%rcx),%rax
jne    119e <clEnqueueTaskChecker+0x8e>
ret
lea    0xfd3(%rip),%rsi
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@CL_INVALID_PROGRAM_EXECUTABLE = global i64 0
@stderr = global i32 0
@.str = [73 x i8] c"Err (clEnqueueTask): No successfully built program executable available\0A\00"
@CL_INVALID_COMMAND_QUEUE = global i64 0
@.str.1 = [61 x i8] c"Err (clEnqueueTask): Okay so the command queue is not right\0A\00"
@CL_INVALID_KERNEL = global i64 0
@.str.2 = [44 x i8] c"Err (clEnqueueTask): Invalid Kernel Object\0A\00"
@CL_INVALID_KERNEL_ARGS = global i64 0
@.str.3 = [47 x i8] c"Err (clEnqueueTask): Invalid Kernel Arguments\0A\00"
@CL_OUT_OF_RESOURCES = global i64 0
@.str.4 = [45 x i8] c"Err (clEnqueueTask): Insufficient resources\0A\00"
@CL_MEM_OBJECT_ALLOCATION_FAILURE = global i64 0
@.str.5 = [106 x i8] c"Err (clEnqueueTask): Failure to allocate memory for data storage associated with image or buffer objects\0A\00"
@CL_SUCCESS = global i64 0
@.str.6 = [36 x i8] c"Err (clEnqueueTask): Unknown Error\0A\00"
define void @clEnqueueTaskChecker(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 ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
br label %64
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 ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
br label %63
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 ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
br label %62
26: ; preds = %18
%27 = load i64*, i64** %2
%28 = load i64, i64* %27
%29 = load i64, i64* @CL_INVALID_KERNEL_ARGS
%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 ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
br label %61
34: ; preds = %26
%35 = load i64*, i64** %2
%36 = load i64, i64* %35
%37 = load i64, i64* @CL_OUT_OF_RESOURCES
%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 ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
br label %60
42: ; preds = %34
%43 = load i64*, i64** %2
%44 = load i64, i64* %43
%45 = load i64, i64* @CL_MEM_OBJECT_ALLOCATION_FAILURE
%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 ([106 x i8], [106 x i8]* @.str.5, i64 0, i64 0))
br label %59
50: ; preds = %42
%51 = load i64*, i64** %2
%52 = load i64, i64* %51
%53 = load i64, i64* @CL_SUCCESS
%54 = icmp ne 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 ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %58
58: ; preds = %55, %50
br label %59
59: ; preds = %58, %47
br label %60
60: ; preds = %59, %39
br label %61
61: ; preds = %60, %31
br label %62
62: ; preds = %61, %23
br label %63
63: ; preds = %62, %15
br label %64
64: ; preds = %63, %7
ret void
}

LLVM IR (-O2):
@CL_INVALID_PROGRAM_EXECUTABLE = global i64 0
@stderr = global i32 0
@.str = [73 x i8] c"Err (clEnqueueTask): No successfully built program executable available\0A\00"
@CL_INVALID_COMMAND_QUEUE = global i64 0
@.str.1 = [61 x i8] c"Err (clEnqueueTask): Okay so the command queue is not right\0A\00"
@CL_INVALID_KERNEL = global i64 0
@.str.2 = [44 x i8] c"Err (clEnqueueTask): Invalid Kernel Object\0A\00"
@CL_INVALID_KERNEL_ARGS = global i64 0
@.str.3 = [47 x i8] c"Err (clEnqueueTask): Invalid Kernel Arguments\0A\00"
@CL_OUT_OF_RESOURCES = global i64 0
@.str.4 = [45 x i8] c"Err (clEnqueueTask): Insufficient resources\0A\00"
@CL_MEM_OBJECT_ALLOCATION_FAILURE = global i64 0
@.str.5 = [106 x i8] c"Err (clEnqueueTask): Failure to allocate memory for data storage associated with image or buffer objects\0A\00"
@CL_SUCCESS = global i64 0
@.str.6 = [36 x i8] c"Err (clEnqueueTask): Unknown Error\0A\00"
define void @clEnqueueTaskChecker(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 %23, label %5
5: ; preds = %1
%6 = load i64, i64* @CL_INVALID_COMMAND_QUEUE
%7 = icmp eq i64 %2, %6
br i1 %7, label %23, label %8
8: ; preds = %5
%9 = load i64, i64* @CL_INVALID_KERNEL
%10 = icmp eq i64 %2, %9
br i1 %10, label %23, label %11
11: ; preds = %8
%12 = load i64, i64* @CL_INVALID_KERNEL_ARGS
%13 = icmp eq i64 %2, %12
br i1 %13, label %23, label %14
14: ; preds = %11
%15 = load i64, i64* @CL_OUT_OF_RESOURCES
%16 = icmp eq i64 %2, %15
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = load i64, i64* @CL_MEM_OBJECT_ALLOCATION_FAILURE
%19 = icmp eq i64 %2, %18
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i64, i64* @CL_SUCCESS
%22 = icmp eq i64 %2, %21
br i1 %22, label %27, label %23
23: ; preds = %20, %17, %14, %11, %8, %5, %1
%24 = phi i8* [ getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), %5 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), %8 ], [ getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), %11 ], [ getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), %14 ], [ getelementptr inbounds ([106 x i8], [106 x i8]* @.str.5, i64 0, i64 0), %17 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), %20 ]
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* %24)
br label %27
27: ; preds = %23, %20
ret void
}