#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*/ uid_t;
typedef int /*<<< orphan*/ time_t;
struct stat {
  int dummy;
};
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ nlink_t;
typedef int /*<<< orphan*/ mode_t;
typedef int /*<<< orphan*/ ino_t;
typedef int /*<<< orphan*/ gid_t;
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int /*<<< orphan*/
assign_stat_fields(struct stat *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, long *, long *);
int lstat(char const *, struct stat *);
int octave_lstat_wrapper(const char *lname, mode_t *mode, ino_t *ino,
                         dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid,
                         off_t *size, time_t *atime, time_t *mtime,
                         time_t *ctime, dev_t *rdev, long *blksize,
                         long *blocks) {
  struct stat buf;
  int status = lstat(lname, &buf);
  assign_stat_fields(&buf, mode, ino, dev, nlink, uid, gid, size, atime, mtime,
                     ctime, rdev, blksize, blocks);
  return status;
}


x86 assembly (clang, -O0):
<octave_lstat_wrapper>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1040 <lstat@plt>
mov    %eax,-0x64(%rbp)
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%r13
mov    0x18(%rbp),%r12
mov    0x20(%rbp),%r15
mov    0x28(%rbp),%r14
mov    0x30(%rbp),%rbx
mov    0x38(%rbp),%r11
mov    0x40(%rbp),%r10
mov    0x48(%rbp),%rax
lea    -0x60(%rbp),%rdi
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1030 <assign_stat_fields@plt>
mov    -0x64(%rbp),%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<octave_lstat_wrapper>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9,0x48(%rsp)
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
lea    0x50(%rsp),%rbp
mov    %rbp,%rsi
call   1040 <lstat@plt>
mov    %eax,%r14d
movaps 0xc0(%rsp),%xmm0
movups %xmm0,0x30(%rsp)
movaps 0xb0(%rsp),%xmm0
movups %xmm0,0x20(%rsp)
movaps 0xa0(%rsp),%xmm0
movups %xmm0,0x10(%rsp)
movaps 0x90(%rsp),%xmm0
movups %xmm0,(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    0x48(%rsp),%r9
call   1030 <assign_stat_fields@plt>
mov    %r14d,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @octave_lstat_wrapper(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i64* %12, i64* %13) {
%15 = alloca i8*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca i32*
%24 = alloca i32*
%25 = alloca i32*
%26 = alloca i32*
%27 = alloca i64*
%28 = alloca i64*
%29 = alloca %struct.stat
%30 = alloca i32
store i8* %0, i8** %15
store i32* %1, i32** %16
store i32* %2, i32** %17
store i32* %3, i32** %18
store i32* %4, i32** %19
store i32* %5, i32** %20
store i32* %6, i32** %21
store i32* %7, i32** %22
store i32* %8, i32** %23
store i32* %9, i32** %24
store i32* %10, i32** %25
store i32* %11, i32** %26
store i64* %12, i64** %27
store i64* %13, i64** %28
%31 = load i8*, i8** %15
%32 = call i32 @lstat(i8* %31, %struct.stat* %29)
store i32 %32, i32* %30
%33 = load i32*, i32** %16
%34 = load i32*, i32** %17
%35 = load i32*, i32** %18
%36 = load i32*, i32** %19
%37 = load i32*, i32** %20
%38 = load i32*, i32** %21
%39 = load i32*, i32** %22
%40 = load i32*, i32** %23
%41 = load i32*, i32** %24
%42 = load i32*, i32** %25
%43 = load i32*, i32** %26
%44 = load i64*, i64** %27
%45 = load i64*, i64** %28
%46 = call i32 @assign_stat_fields(%struct.stat* %29, i32* %33, i32* %34, i32* %35, i32* %36, i32* %37, i32* %38, i32* %39, i32* %40, i32* %41, i32* %42, i32* %43, i64* %44, i64* %45)
%47 = load i32, i32* %30
ret i32 %47
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @octave_lstat_wrapper(i8* nocapture %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i64* %12, i64* %13) {
%15 = alloca %struct.stat
%16 = bitcast %struct.stat* %15 to i8*
%17 = call i32 @lstat(i8* %0, %struct.stat* %15)
%18 = call i32 @assign_stat_fields(%struct.stat* %15, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i64* %12, i64* %13)
ret i32 %17
}