#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*/ cl_int;
typedef scalar_t__ cl_command_queue_properties;
typedef scalar_t__ cl_command_queue;
typedef scalar_t__ cl_bool;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_int clSetCommandQueueProperty(cl_command_queue command_queue,
                                 cl_command_queue_properties properties,
                                 cl_bool enable,
                                 cl_command_queue_properties *old_properties) {
  unsigned int sys_args[4];
  sys_args[0] = (unsigned int)command_queue;
  sys_args[1] = (unsigned int)properties;
  sys_args[2] = (unsigned int)enable;
  sys_args[3] = (unsigned int)old_properties;
  return (cl_int)syscall(325, 1013, sys_args);
}


x86 assembly (clang, -O0):
<clSetCommandQueueProperty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x24(%rbp)
lea    -0x30(%rbp),%rdx
mov    $0x145,%edi
mov    $0x3f5,%esi
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clSetCommandQueueProperty>:
sub    $0x18,%rsp
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %edx,0x8(%rsp)
mov    %ecx,0xc(%rsp)
mov    %rsp,%rdx
mov    $0x145,%edi
mov    $0x3f5,%esi
call   1030 <syscall@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @clSetCommandQueueProperty(i64 %0, i64 %1, i64 %2, i64* %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64*
%9 = alloca [4 x i32]
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64* %3, i64** %8
%10 = load i64, i64* %5
%11 = trunc i64 %10 to i32
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i64, i64* %6
%14 = trunc i64 %13 to i32
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i64, i64* %7
%17 = trunc i64 %16 to i32
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 2
store i32 %17, i32* %18
%19 = load i64*, i64** %8
%20 = ptrtoint i64* %19 to i32
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 3
store i32 %20, i32* %21
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 0
%23 = call i32 @syscall(i32 325, i32 1013, i32* %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @clSetCommandQueueProperty(i64 %0, i64 %1, i64 %2, i64* %3) {
%5 = alloca [4 x i32]
%6 = bitcast [4 x i32]* %5 to i8*
%7 = trunc i64 %0 to i32
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
store i32 %7, i32* %8
%9 = trunc i64 %1 to i32
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 1
store i32 %9, i32* %10
%11 = trunc i64 %2 to i32
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 2
store i32 %11, i32* %12
%13 = ptrtoint i64* %3 to i64
%14 = trunc i64 %13 to i32
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 3
store i32 %14, i32* %15
%16 = call i32 @syscall(i32 325, i32 1013, i32* %8)
ret i32 %16
}