#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 /*<<< orphan*/ errors;
typedef unsigned int cl_int;

/* Variables and functions */
const char *clu_ErrorString(cl_int err_code) {
  static const char *errors[] = {
      "CL_SUCCESS",
      "CL_DEVICE_NOT_FOUND",
      "CL_DEVICE_NOT_AVAILABLE",
      "CL_COMPILER_NOT_AVAILABLE",
      "CL_MEM_OBJECT_ALLOCATION_FAILURE",
      "CL_OUT_OF_RESOURCES",
      "CL_OUT_OF_HOST_MEMORY",
      "CL_PROFILING_INFO_NOT_AVAILABLE",
      "CL_MEM_COPY_OVERLAP",
      "CL_IMAGE_FORMAT_MISMATCH",
      "CL_IMAGE_FORMAT_NOT_SUPPORTED",
      "CL_BUILD_PROGRAM_FAILURE",
      "CL_MAP_FAILURE",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "CL_INVALID_VALUE",
      "CL_INVALID_DEVICE_TYPE",
      "CL_INVALID_PLATFORM",
      "CL_INVALID_DEVICE",
      "CL_INVALID_CONTEXT",
      "CL_INVALID_QUEUE_PROPERTIES",
      "CL_INVALID_COMMAND_QUEUE",
      "CL_INVALID_HOST_PTR",
      "CL_INVALID_MEM_OBJECT",
      "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR",
      "CL_INVALID_IMAGE_SIZE",
      "CL_INVALID_SAMPLER",
      "CL_INVALID_BINARY",
      "CL_INVALID_BUILD_OPTIONS",
      "CL_INVALID_PROGRAM",
      "CL_INVALID_PROGRAM_EXECUTABLE",
      "CL_INVALID_KERNEL_NAME",
      "CL_INVALID_KERNEL_DEFINITION",
      "CL_INVALID_KERNEL",
      "CL_INVALID_ARG_INDEX",
      "CL_INVALID_ARG_VALUE",
      "CL_INVALID_ARG_SIZE",
      "CL_INVALID_KERNEL_ARGS",
      "CL_INVALID_WORK_DIMENSION",
      "CL_INVALID_WORK_GROUP_SIZE",
      "CL_INVALID_WORK_ITEM_SIZE",
      "CL_INVALID_GLOBAL_OFFSET",
      "CL_INVALID_EVENT_WAIT_LIST",
      "CL_INVALID_EVENT",
      "CL_INVALID_OPERATION",
      "CL_INVALID_GL_OBJECT",
      "CL_INVALID_BUFFER_SIZE",
      "CL_INVALID_MIP_LEVEL",
      "CL_INVALID_GLOBAL_WORK_SIZE",
  };
  unsigned idx = (err_code < 0) ? -err_code : err_code;
  unsigned errorCount = sizeof(errors) / sizeof(errors[0]);
  return (idx < errorCount) ? errors[idx] : "Unknown Error";
}


x86 assembly (clang, -O0):
<clu_ErrorString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jae    111e <clu_ErrorString+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <clu_ErrorString+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x40,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1156 <clu_ErrorString+0x56>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
lea    0x2ee7(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
jmp    1166 <clu_ErrorString+0x66>
lea    0x12db(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1166 <clu_ErrorString+0x66>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clu_ErrorString>:
cmp    $0x3f,%edi
ja     1116 <clu_ErrorString+0x16>
mov    %edi,%eax
lea    0xef2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0x141b(%rip),%rax
ret

LLVM IR (-O0):
@clu_ErrorString.errors = internal global [64 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.33, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.35, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.39, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.40, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.41, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.42, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.43, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.44, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.45, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.46, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.47, i32 0, i32 0)]
@.str = [11 x i8] c"CL_SUCCESS\00"
@.str.1 = [20 x i8] c"CL_DEVICE_NOT_FOUND\00"
@.str.2 = [24 x i8] c"CL_DEVICE_NOT_AVAILABLE\00"
@.str.3 = [26 x i8] c"CL_COMPILER_NOT_AVAILABLE\00"
@.str.4 = [33 x i8] c"CL_MEM_OBJECT_ALLOCATION_FAILURE\00"
@.str.5 = [20 x i8] c"CL_OUT_OF_RESOURCES\00"
@.str.6 = [22 x i8] c"CL_OUT_OF_HOST_MEMORY\00"
@.str.7 = [32 x i8] c"CL_PROFILING_INFO_NOT_AVAILABLE\00"
@.str.8 = [20 x i8] c"CL_MEM_COPY_OVERLAP\00"
@.str.9 = [25 x i8] c"CL_IMAGE_FORMAT_MISMATCH\00"
@.str.10 = [30 x i8] c"CL_IMAGE_FORMAT_NOT_SUPPORTED\00"
@.str.11 = [25 x i8] c"CL_BUILD_PROGRAM_FAILURE\00"
@.str.12 = [15 x i8] c"CL_MAP_FAILURE\00"
@.str.13 = [1 x i8] zeroinitializer
@.str.14 = [17 x i8] c"CL_INVALID_VALUE\00"
@.str.15 = [23 x i8] c"CL_INVALID_DEVICE_TYPE\00"
@.str.16 = [20 x i8] c"CL_INVALID_PLATFORM\00"
@.str.17 = [18 x i8] c"CL_INVALID_DEVICE\00"
@.str.18 = [19 x i8] c"CL_INVALID_CONTEXT\00"
@.str.19 = [28 x i8] c"CL_INVALID_QUEUE_PROPERTIES\00"
@.str.20 = [25 x i8] c"CL_INVALID_COMMAND_QUEUE\00"
@.str.21 = [20 x i8] c"CL_INVALID_HOST_PTR\00"
@.str.22 = [22 x i8] c"CL_INVALID_MEM_OBJECT\00"
@.str.23 = [35 x i8] c"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR\00"
@.str.24 = [22 x i8] c"CL_INVALID_IMAGE_SIZE\00"
@.str.25 = [19 x i8] c"CL_INVALID_SAMPLER\00"
@.str.26 = [18 x i8] c"CL_INVALID_BINARY\00"
@.str.27 = [25 x i8] c"CL_INVALID_BUILD_OPTIONS\00"
@.str.28 = [19 x i8] c"CL_INVALID_PROGRAM\00"
@.str.29 = [30 x i8] c"CL_INVALID_PROGRAM_EXECUTABLE\00"
@.str.30 = [23 x i8] c"CL_INVALID_KERNEL_NAME\00"
@.str.31 = [29 x i8] c"CL_INVALID_KERNEL_DEFINITION\00"
@.str.32 = [18 x i8] c"CL_INVALID_KERNEL\00"
@.str.33 = [21 x i8] c"CL_INVALID_ARG_INDEX\00"
@.str.34 = [21 x i8] c"CL_INVALID_ARG_VALUE\00"
@.str.35 = [20 x i8] c"CL_INVALID_ARG_SIZE\00"
@.str.36 = [23 x i8] c"CL_INVALID_KERNEL_ARGS\00"
@.str.37 = [26 x i8] c"CL_INVALID_WORK_DIMENSION\00"
@.str.38 = [27 x i8] c"CL_INVALID_WORK_GROUP_SIZE\00"
@.str.39 = [26 x i8] c"CL_INVALID_WORK_ITEM_SIZE\00"
@.str.40 = [25 x i8] c"CL_INVALID_GLOBAL_OFFSET\00"
@.str.41 = [27 x i8] c"CL_INVALID_EVENT_WAIT_LIST\00"
@.str.42 = [17 x i8] c"CL_INVALID_EVENT\00"
@.str.43 = [21 x i8] c"CL_INVALID_OPERATION\00"
@.str.44 = [21 x i8] c"CL_INVALID_GL_OBJECT\00"
@.str.45 = [23 x i8] c"CL_INVALID_BUFFER_SIZE\00"
@.str.46 = [21 x i8] c"CL_INVALID_MIP_LEVEL\00"
@.str.47 = [28 x i8] c"CL_INVALID_GLOBAL_WORK_SIZE\00"
@.str.48 = [14 x i8] c"Unknown Error\00"
define i8* @clu_ErrorString(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub i32 0, %8
br label %12
10: ; preds = %1
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %9, %7 ], [ %11, %10 ]
store i32 %13, i32* %3
store i32 64, i32* %4
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = icmp ult i32 %14, %15
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i32, i32* %3
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds [64 x i8*], [64 x i8*]* @clu_ErrorString.errors, i64 0, i64 %19
%21 = load i8*, i8** %20
br label %23
22: ; preds = %12
br label %23
23: ; preds = %22, %17
%24 = phi i8* [ %21, %17 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.48, i64 0, i64 0), %22 ]
ret i8* %24
}

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