#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*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
struct mmt_memory_dump {
  int dummy;
};
struct mmt_buf {
  int dummy;
};

/* Variables and functions */
int decode_nvrm_ioctl_pre(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, struct mmt_buf *, void *,
                          struct mmt_memory_dump *, int);
int nvrm_ioctl_pre(uint32_t fd, uint32_t id, uint8_t dir, uint8_t nr,
                   uint16_t size, struct mmt_buf *buf, void *state,
                   struct mmt_memory_dump *args, int argc) {
  return decode_nvrm_ioctl_pre(fd, id, dir, nr, size, buf, state, args, argc);
}


x86 assembly (clang, -O0):
<nvrm_ioctl_pre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <decode_nvrm_ioctl_pre@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvrm_ioctl_pre>:
jmp    1030 <decode_nvrm_ioctl_pre@plt>

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

LLVM IR (-O2):
%struct.mmt_buf = type { i32 }
%struct.mmt_memory_dump = type { i32 }
define i32 @nvrm_ioctl_pre(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, %struct.mmt_buf* %5, i8* %6, %struct.mmt_memory_dump* %7, i32 %8) {
%10 = tail call i32 @decode_nvrm_ioctl_pre(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, %struct.mmt_buf* %5, i8* %6, %struct.mmt_memory_dump* %7, i32 %8)
ret i32 %10
}