#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*/ dims;
typedef size_t cl_ulong;
typedef int cl_uint;
typedef int /*<<< orphan*/ cl_int;
typedef int /*<<< orphan*/ cl_device_id;

/* Variables and functions */
int /*<<< orphan*/ CL_DEVICE_GLOBAL_MEM_SIZE;
int /*<<< orphan*/ CL_DEVICE_LOCAL_MEM_SIZE;
int /*<<< orphan*/ CL_DEVICE_MAX_CLOCK_FREQUENCY;
int /*<<< orphan*/ CL_DEVICE_MAX_COMPUTE_UNITS;
int /*<<< orphan*/ CL_DEVICE_MAX_MEM_ALLOC_SIZE;
int /*<<< orphan*/ CL_DEVICE_MAX_WORK_GROUP_SIZE;
int /*<<< orphan*/ CL_DEVICE_MAX_WORK_ITEM_SIZES;
int /*<<< orphan*/ CL_DEVICE_MEM_BASE_ADDR_ALIGN;
int /*<<< orphan*/ CL_DEVICE_NAME;
int /*<<< orphan*/ clError(char *, int /*<<< orphan*/);
int /*<<< orphan*/ clGetDeviceInfo(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                   ...);
int /*<<< orphan*/ printf(char *, ...);
void printDeviceInfo(cl_device_id device) {
  cl_int err;
  char paramValueString[100];
  cl_ulong paramValueUlong;
  cl_uint paramValueUint;
  size_t paramValueSizet;
  size_t returnSize;
  printf("==== Device info ====\n");
  err = clGetDeviceInfo(device, CL_DEVICE_NAME, 100, paramValueString,
                        &returnSize);
  printf("Device name:\t\t%s\n", paramValueString);
  err = clGetDeviceInfo(device, CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(cl_ulong),
                        &paramValueUlong, &returnSize);
  printf("Device global memory:\t%lu\n", paramValueUlong);
  err = clGetDeviceInfo(device, CL_DEVICE_MAX_CLOCK_FREQUENCY, sizeof(cl_uint),
                        &paramValueUint, &returnSize);
  printf("Device max frequency:\t%u\n", paramValueUint);
  err = clGetDeviceInfo(device, CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(cl_uint),
                        &paramValueUint, &returnSize);
  printf("Device compute units:\t%u\n", paramValueUint);
  err = clGetDeviceInfo(device, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(cl_ulong),
                        &paramValueUlong, &returnSize);
  printf("Max size of memory allocation:\t%lu\n", paramValueUlong);
  err = clGetDeviceInfo(device, CL_DEVICE_LOCAL_MEM_SIZE, sizeof(cl_ulong),
                        &paramValueUlong, &returnSize);
  printf("Local memory size:\t%lu\n", paramValueUlong);
  err = clGetDeviceInfo(device, CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(cl_uint),
                        &paramValueUint, &returnSize);
  printf("Device memory alignment:\t%u\n", paramValueUint);
  err = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof(size_t),
                        &paramValueSizet, &returnSize);
  printf("Max work group size:\t%zu\n", paramValueSizet);
  size_t dims[3];
  err = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_ITEM_SIZES, sizeof(dims),
                        dims, &returnSize);
  printf("Max work size dimensions:  %zu, %zu, %zu\n", dims[0], dims[1],
         dims[2]);
  clError("Couldn't get device info", err);
  printf("\n\n");
}


x86 assembly (clang, -O0):
<printDeviceInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2e5a(%rip),%rax
mov    (%rax),%esi
lea    -0x70(%rbp),%rcx
mov    $0x64,%edx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2e0a(%rip),%rax
mov    (%rax),%esi
mov    $0x8,%edx
lea    -0x78(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x78(%rbp),%rsi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2e02(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edx
lea    -0x7c(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x7c(%rbp),%esi
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2ddb(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edx
lea    -0x7c(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x7c(%rbp),%esi
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2dbc(%rip),%rax
mov    (%rax),%esi
mov    $0x8,%edx
lea    -0x78(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x78(%rbp),%rsi
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2d3c(%rip),%rax
mov    (%rax),%esi
mov    $0x8,%edx
lea    -0x78(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x78(%rbp),%rsi
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2d3c(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edx
lea    -0x7c(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x7c(%rbp),%esi
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2d1d(%rip),%rax
mov    (%rax),%esi
mov    $0x8,%edx
lea    -0x88(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x88(%rbp),%rsi
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2ca7(%rip),%rax
mov    (%rax),%esi
lea    -0xb0(%rbp),%rcx
mov    $0x18,%edx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1040 <clGetDeviceInfo@plt>
mov    %eax,-0x8(%rbp)
mov    -0xb0(%rbp),%rsi
mov    -0xa8(%rbp),%rdx
mov    -0xa0(%rbp),%rcx
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xdb0(%rip),%rdi
call   1030 <clError@plt>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printDeviceInfo>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %edi,%ebx
lea    0xfc0(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%r15
lea    0x38(%rsp),%r14
mov    %ebx,%edi
mov    $0x64,%edx
mov    %r15,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
lea    0xe76(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%r15
mov    %ebx,%edi
mov    $0x8,%edx
mov    %r15,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    0x10(%rsp),%rsi
lea    0xe50(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%r12
mov    %ebx,%edi
mov    $0x4,%edx
mov    %r12,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    0xc(%rsp),%esi
lea    0xe37(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    $0x4,%edx
mov    %r12,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    0xc(%rsp),%esi
lea    0xe22(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    $0x8,%edx
mov    %r15,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    0x10(%rsp),%rsi
lea    0xe0c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2d45(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    $0x8,%edx
mov    %r15,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    0x10(%rsp),%rsi
lea    0xe00(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2d4d(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    $0x4,%edx
mov    %r12,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    0xc(%rsp),%esi
lea    0xde9(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2d36(%rip),%rax
mov    (%rax),%esi
lea    0x18(%rsp),%rcx
mov    %ebx,%edi
mov    $0x8,%edx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    0x18(%rsp),%rsi
lea    0xdd4(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2ccc(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rcx
mov    %ebx,%edi
mov    $0x18,%edx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <clGetDeviceInfo@plt>
mov    %eax,%ebx
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    0x30(%rsp),%rcx
lea    0xdb0(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdcc(%rip),%rdi
mov    %ebx,%esi
call   1030 <clError@plt>
lea    0xcd0(%rip),%rdi
call   1040 <puts@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"==== Device info ====\0A\00"
@CL_DEVICE_NAME = global i32 0
@.str.1 = [18 x i8] c"Device name:\09\09%s\0A\00"
@CL_DEVICE_GLOBAL_MEM_SIZE = global i32 0
@.str.2 = [27 x i8] c"Device global memory:\09%lu\0A\00"
@CL_DEVICE_MAX_CLOCK_FREQUENCY = global i32 0
@.str.3 = [26 x i8] c"Device max frequency:\09%u\0A\00"
@CL_DEVICE_MAX_COMPUTE_UNITS = global i32 0
@.str.4 = [26 x i8] c"Device compute units:\09%u\0A\00"
@CL_DEVICE_MAX_MEM_ALLOC_SIZE = global i32 0
@.str.5 = [36 x i8] c"Max size of memory allocation:\09%lu\0A\00"
@CL_DEVICE_LOCAL_MEM_SIZE = global i32 0
@.str.6 = [24 x i8] c"Local memory size:\09%lu\0A\00"
@CL_DEVICE_MEM_BASE_ADDR_ALIGN = global i32 0
@.str.7 = [29 x i8] c"Device memory alignment:\09%u\0A\00"
@CL_DEVICE_MAX_WORK_GROUP_SIZE = global i32 0
@.str.8 = [26 x i8] c"Max work group size:\09%zu\0A\00"
@CL_DEVICE_MAX_WORK_ITEM_SIZES = global i32 0
@.str.9 = [42 x i8] c"Max work size dimensions: %zu, %zu, %zu\0A\00"
@.str.10 = [25 x i8] c"Couldn't get device info\00"
@.str.11 = [3 x i8] c"\0A\0A\00"
define void @printDeviceInfo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [100 x i8]
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca [3 x i64]
store i32 %0, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = load i32, i32* @CL_DEVICE_NAME
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%14 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %11, i32 %12, i32 100, i8* %13, i64* %8)
store i32 %14, i32* %3
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i32, i32* %2
%18 = load i32, i32* @CL_DEVICE_GLOBAL_MEM_SIZE
%19 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %17, i32 %18, i32 8, i64* %5, i64* %8)
store i32 %19, i32* %3
%20 = load i64, i64* %5
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i64 %20)
%22 = load i32, i32* %2
%23 = load i32, i32* @CL_DEVICE_MAX_CLOCK_FREQUENCY
%24 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %22, i32 %23, i32 4, i32* %6, i64* %8)
store i32 %24, i32* %3
%25 = load i32, i32* %6
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %2
%28 = load i32, i32* @CL_DEVICE_MAX_COMPUTE_UNITS
%29 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %27, i32 %28, i32 4, i32* %6, i64* %8)
store i32 %29, i32* %3
%30 = load i32, i32* %6
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %2
%33 = load i32, i32* @CL_DEVICE_MAX_MEM_ALLOC_SIZE
%34 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %32, i32 %33, i32 8, i64* %5, i64* %8)
store i32 %34, i32* %3
%35 = load i64, i64* %5
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i64 %35)
%37 = load i32, i32* %2
%38 = load i32, i32* @CL_DEVICE_LOCAL_MEM_SIZE
%39 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %37, i32 %38, i32 8, i64* %5, i64* %8)
store i32 %39, i32* %3
%40 = load i64, i64* %5
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i64 %40)
%42 = load i32, i32* %2
%43 = load i32, i32* @CL_DEVICE_MEM_BASE_ADDR_ALIGN
%44 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %42, i32 %43, i32 4, i32* %6, i64* %8)
store i32 %44, i32* %3
%45 = load i32, i32* %6
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %2
%48 = load i32, i32* @CL_DEVICE_MAX_WORK_GROUP_SIZE
%49 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %47, i32 %48, i32 8, i64* %7, i64* %8)
store i32 %49, i32* %3
%50 = load i64, i64* %7
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i64 %50)
%52 = load i32, i32* %2
%53 = load i32, i32* @CL_DEVICE_MAX_WORK_ITEM_SIZES
%54 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 0
%55 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %52, i32 %53, i32 24, i64* %54, i64* %8)
store i32 %55, i32* %3
%56 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 0
%57 = load i64, i64* %56
%58 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 1
%59 = load i64, i64* %58
%60 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 2
%61 = load i64, i64* %60
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0), i64 %57, i64 %59, i64 %61)
%63 = load i32, i32* %3
%64 = call i32 @clError(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %63)
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@CL_DEVICE_NAME = global i32 0
@.str.1 = [18 x i8] c"Device name:\09\09%s\0A\00"
@CL_DEVICE_GLOBAL_MEM_SIZE = global i32 0
@.str.2 = [27 x i8] c"Device global memory:\09%lu\0A\00"
@CL_DEVICE_MAX_CLOCK_FREQUENCY = global i32 0
@.str.3 = [26 x i8] c"Device max frequency:\09%u\0A\00"
@CL_DEVICE_MAX_COMPUTE_UNITS = global i32 0
@.str.4 = [26 x i8] c"Device compute units:\09%u\0A\00"
@CL_DEVICE_MAX_MEM_ALLOC_SIZE = global i32 0
@.str.5 = [36 x i8] c"Max size of memory allocation:\09%lu\0A\00"
@CL_DEVICE_LOCAL_MEM_SIZE = global i32 0
@.str.6 = [24 x i8] c"Local memory size:\09%lu\0A\00"
@CL_DEVICE_MEM_BASE_ADDR_ALIGN = global i32 0
@.str.7 = [29 x i8] c"Device memory alignment:\09%u\0A\00"
@CL_DEVICE_MAX_WORK_GROUP_SIZE = global i32 0
@.str.8 = [26 x i8] c"Max work group size:\09%zu\0A\00"
@CL_DEVICE_MAX_WORK_ITEM_SIZES = global i32 0
@.str.9 = [42 x i8] c"Max work size dimensions: %zu, %zu, %zu\0A\00"
@.str.10 = [25 x i8] c"Couldn't get device info\00"
@str = [22 x i8] c"==== Device info ====\00"
@str.12 = [2 x i8] c"\0A\00"
define void @printDeviceInfo(i32 %0) {
%2 = alloca [100 x i8]
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca [3 x i64]
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = bitcast i64* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast i64* %5 to i8*
%12 = bitcast i64* %6 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%14 = load i32, i32* @CL_DEVICE_NAME
%15 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %14, i32 100, i8* %8, i64* %6)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%17 = load i32, i32* @CL_DEVICE_GLOBAL_MEM_SIZE
%18 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %17, i32 8, i64* %3, i64* %6)
%19 = load i64, i64* %3
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i64 %19)
%21 = load i32, i32* @CL_DEVICE_MAX_CLOCK_FREQUENCY
%22 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %21, i32 4, i32* %4, i64* %6)
%23 = load i32, i32* %4
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @CL_DEVICE_MAX_COMPUTE_UNITS
%26 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %25, i32 4, i32* %4, i64* %6)
%27 = load i32, i32* %4
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %27)
%29 = load i32, i32* @CL_DEVICE_MAX_MEM_ALLOC_SIZE
%30 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %29, i32 8, i64* %3, i64* %6)
%31 = load i64, i64* %3
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i64 %31)
%33 = load i32, i32* @CL_DEVICE_LOCAL_MEM_SIZE
%34 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %33, i32 8, i64* %3, i64* %6)
%35 = load i64, i64* %3
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i64 %35)
%37 = load i32, i32* @CL_DEVICE_MEM_BASE_ADDR_ALIGN
%38 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %37, i32 4, i32* %4, i64* %6)
%39 = load i32, i32* %4
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %39)
%41 = load i32, i32* @CL_DEVICE_MAX_WORK_GROUP_SIZE
%42 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %41, i32 8, i64* %5, i64* %6)
%43 = load i64, i64* %5
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i64 %43)
%45 = bitcast [3 x i64]* %7 to i8*
%46 = load i32, i32* @CL_DEVICE_MAX_WORK_ITEM_SIZES
%47 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
%48 = call i32 (i32, i32, i32, ...) @clGetDeviceInfo(i32 %0, i32 %46, i32 24, i64* %47, i64* %6)
%49 = load i64, i64* %47
%50 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
%51 = load i64, i64* %50
%52 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 2
%53 = load i64, i64* %52
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0), i64 %49, i64 %51, i64 %53)
%55 = call i32 @clError(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %48)
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.12, i64 0, i64 0))
ret void
}