#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_mem;
typedef int /*<<< orphan*/ cl_event;
typedef int /*<<< orphan*/ cl_command_queue;

/* Variables and functions */
int /*<<< orphan*/
inner_image_to_buffer_copy(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, size_t const *, size_t const *,
                           size_t, unsigned int, int /*<<< orphan*/ const *,
                           int /*<<< orphan*/ *);
void cl_image_to_buffer_copy(cl_command_queue command_queue, cl_mem src_image,
                             cl_mem dst_buffer, const size_t src_origin[3],
                             const size_t region[3], size_t dst_offset,
                             unsigned num_evt, const cl_event *evt_list,
                             cl_event *out) {
  inner_image_to_buffer_copy(command_queue, src_image, dst_buffer, src_origin,
                             region, dst_offset, num_evt, evt_list, out);
}


x86 assembly (clang, -O0):
<cl_image_to_buffer_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <inner_image_to_buffer_copy@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_image_to_buffer_copy>:
jmp    1030 <inner_image_to_buffer_copy@plt>

LLVM IR (-O0):
define void @cl_image_to_buffer_copy(i32 %0, i32 %1, i32 %2, i64* %3, i64* %4, i64 %5, i32 %6, i32* %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i64*
%14 = alloca i64*
%15 = alloca i64
%16 = alloca i32
%17 = alloca i32*
%18 = alloca i32*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i64* %3, i64** %13
store i64* %4, i64** %14
store i64 %5, i64* %15
store i32 %6, i32* %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i64*, i64** %13
%23 = load i64*, i64** %14
%24 = load i64, i64* %15
%25 = load i32, i32* %16
%26 = load i32*, i32** %17
%27 = load i32*, i32** %18
%28 = call i32 @inner_image_to_buffer_copy(i32 %19, i32 %20, i32 %21, i64* %22, i64* %23, i64 %24, i32 %25, i32* %26, i32* %27)
ret void
}

LLVM IR (-O2):
define void @cl_image_to_buffer_copy(i32 %0, i32 %1, i32 %2, i64* %3, i64* %4, i64 %5, i32 %6, i32* %7, i32* %8) {
%10 = tail call i32 @inner_image_to_buffer_copy(i32 %0, i32 %1, i32 %2, i64* %3, i64* %4, i64 %5, i32 %6, i32* %7, i32* %8)
ret void
}