#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 */
int setWorkSize(size_t *gws, size_t *lws, cl_int x, cl_int y) {
  switch (y) {
  case 1:
    gws[0] = x;
    gws[1] = 1;
    lws[0] = 1;
    lws[1] = 1;
    break;
  default:
    gws[0] = x;
    gws[1] = y;
    lws[0] = 1;
    lws[1] = 1;
    break;
  }
}


x86 assembly (clang, -O0):
<setWorkSize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
jne    1156 <setWorkSize+0x56>
jmp    1123 <setWorkSize+0x23>
movslq -0x1c(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
movq   $0x1,0x8(%rax)
mov    -0x18(%rbp),%rax
movq   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movq   $0x1,0x8(%rax)
jmp    1184 <setWorkSize+0x84>
movslq -0x1c(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movslq -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x18(%rbp),%rax
movq   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movq   $0x1,0x8(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setWorkSize>:
movslq %edx,%rax
mov    %rax,(%rdi)
movslq %ecx,%rax
mov    %rax,0x8(%rdi)
movaps 0xeec(%rip),%xmm0
movups %xmm0,(%rsi)
ret

LLVM IR (-O0):
define i32 @setWorkSize(i64* %0, i64* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i32
%9 = alloca i32
store i64* %0, i64** %6
store i64* %1, i64** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
switch i32 %10, label %22 [
i32 1, label %11
]
11: ; preds = %4
%12 = load i32, i32* %8
%13 = sext i32 %12 to i64
%14 = load i64*, i64** %6
%15 = getelementptr inbounds i64, i64* %14, i64 0
store i64 %13, i64* %15
%16 = load i64*, i64** %6
%17 = getelementptr inbounds i64, i64* %16, i64 1
store i64 1, i64* %17
%18 = load i64*, i64** %7
%19 = getelementptr inbounds i64, i64* %18, i64 0
store i64 1, i64* %19
%20 = load i64*, i64** %7
%21 = getelementptr inbounds i64, i64* %20, i64 1
store i64 1, i64* %21
br label %35
22: ; preds = %4
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = load i64*, i64** %6
%26 = getelementptr inbounds i64, i64* %25, i64 0
store i64 %24, i64* %26
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = load i64*, i64** %6
%30 = getelementptr inbounds i64, i64* %29, i64 1
store i64 %28, i64* %30
%31 = load i64*, i64** %7
%32 = getelementptr inbounds i64, i64* %31, i64 0
store i64 1, i64* %32
%33 = load i64*, i64** %7
%34 = getelementptr inbounds i64, i64* %33, i64 1
store i64 1, i64* %34
br label %35
35: ; preds = %22, %11
%36 = load i32, i32* %5
ret i32 %36
}

LLVM IR (-O2):
define i32 @setWorkSize(i64* nocapture writeonly %0, i64* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
store i64 %5, i64* %0
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %6, i64* %7
%8 = bitcast i64* %1 to <2 x i64>*
store <2 x i64> <i64 1, i64 1>, <2 x i64>* %8
ret i32 undef
}