#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 /*<<< orphan*/ st_ctime;
  int /*<<< orphan*/ st_mtime;
  int /*<<< orphan*/ st_atime;
  int /*<<< orphan*/ st_size;
  int /*<<< orphan*/ st_rdev;
  int /*<<< orphan*/ st_gid;
  int /*<<< orphan*/ st_uid;
  int /*<<< orphan*/ st_nlink;
  int /*<<< orphan*/ st_mode;
  int /*<<< orphan*/ st_ino;
  int /*<<< orphan*/ st_dev;
};
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*/ stat(char *, struct stat *);
void c_stat_(char *path, dev_t *st_dev, ino_t *st_ino, mode_t *st_mode,
             nlink_t *st_nlink, uid_t *st_uid, gid_t *st_gid, dev_t *st_rdev,
             off_t *st_size, time_t *st_atimes, time_t *st_mtimes,
             time_t *st_ctimes, int lpath) {
  struct stat buf;
  stat(path, &buf);
  *st_dev = buf.st_dev;
  *st_ino = buf.st_ino;
  *st_mode = buf.st_mode;
  *st_nlink = buf.st_nlink;
  *st_uid = buf.st_uid;
  *st_gid = buf.st_gid;
  *st_rdev = buf.st_rdev;
  *st_size = buf.st_size;
  *st_atimes = buf.st_atime;
  *st_mtimes = buf.st_mtime;
  *st_ctimes = buf.st_ctime;
}


x86 assembly (clang, -O0):
<c_stat_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x40(%rbp),%eax
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,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <stat@plt>
mov    -0x38(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x3c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x44(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x48(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4c(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x50(%rbp),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x54(%rbp),%ecx
mov    0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x58(%rbp),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x5c(%rbp),%ecx
mov    0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x60(%rbp),%ecx
mov    0x38(%rbp),%rax
mov    %ecx,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_stat_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    0x70(%rsp),%rbp
lea    0x8(%rsp),%rsi
call   1030 <stat@plt>
mov    0x30(%rsp),%eax
mov    %eax,(%rbx)
mov    0x2c(%rsp),%eax
mov    %eax,0x0(%r13)
mov    0x28(%rsp),%eax
mov    %eax,(%r12)
mov    0x24(%rsp),%eax
mov    %eax,(%r15)
mov    0x20(%rsp),%eax
mov    %eax,(%r14)
mov    0x1c(%rsp),%eax
mov    %eax,0x0(%rbp)
mov    0x18(%rsp),%eax
mov    0x78(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x14(%rsp),%eax
mov    0x80(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x10(%rsp),%eax
mov    0x88(%rsp),%rcx
mov    %eax,(%rcx)
mov    0xc(%rsp),%eax
mov    0x90(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x8(%rsp),%eax
mov    0x98(%rsp),%rcx
mov    %eax,(%rcx)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @c_stat_(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32 %12) {
%14 = alloca i8*
%15 = alloca i32*
%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 %struct.stat
store i8* %0, i8** %14
store i32* %1, i32** %15
store i32* %2, i32** %16
store i32* %3, i32** %17
store i32* %4, i32** %18
store i32* %5, i32** %19
store i32* %6, i32** %20
store i32* %7, i32** %21
store i32* %8, i32** %22
store i32* %9, i32** %23
store i32* %10, i32** %24
store i32* %11, i32** %25
store i32 %12, i32* %26
%28 = load i8*, i8** %14
%29 = call i32 @stat(i8* %28, %struct.stat* %27)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 10
%31 = load i32, i32* %30
%32 = load i32*, i32** %15
store i32 %31, i32* %32
%33 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 9
%34 = load i32, i32* %33
%35 = load i32*, i32** %16
store i32 %34, i32* %35
%36 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 8
%37 = load i32, i32* %36
%38 = load i32*, i32** %17
store i32 %37, i32* %38
%39 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 7
%40 = load i32, i32* %39
%41 = load i32*, i32** %18
store i32 %40, i32* %41
%42 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 6
%43 = load i32, i32* %42
%44 = load i32*, i32** %19
store i32 %43, i32* %44
%45 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 5
%46 = load i32, i32* %45
%47 = load i32*, i32** %20
store i32 %46, i32* %47
%48 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 4
%49 = load i32, i32* %48
%50 = load i32*, i32** %21
store i32 %49, i32* %50
%51 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 3
%52 = load i32, i32* %51
%53 = load i32*, i32** %22
store i32 %52, i32* %53
%54 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 2
%55 = load i32, i32* %54
%56 = load i32*, i32** %23
store i32 %55, i32* %56
%57 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 1
%58 = load i32, i32* %57
%59 = load i32*, i32** %24
store i32 %58, i32* %59
%60 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 0
%61 = load i32, i32* %60
%62 = load i32*, i32** %25
store i32 %61, i32* %62
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @c_stat_(i8* nocapture %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4, i32* nocapture writeonly %5, i32* nocapture writeonly %6, i32* nocapture writeonly %7, i32* nocapture writeonly %8, i32* nocapture writeonly %9, i32* nocapture writeonly %10, i32* nocapture writeonly %11, i32 %12) {
%14 = alloca %struct.stat
%15 = bitcast %struct.stat* %14 to i8*
%16 = call i32 @stat(i8* %0, %struct.stat* %14)
%17 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 10
%18 = load i32, i32* %17
store i32 %18, i32* %1
%19 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 9
%20 = load i32, i32* %19
store i32 %20, i32* %2
%21 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 8
%22 = load i32, i32* %21
store i32 %22, i32* %3
%23 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 7
%24 = load i32, i32* %23
store i32 %24, i32* %4
%25 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 6
%26 = load i32, i32* %25
store i32 %26, i32* %5
%27 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 5
%28 = load i32, i32* %27
store i32 %28, i32* %6
%29 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 4
%30 = load i32, i32* %29
store i32 %30, i32* %7
%31 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 3
%32 = load i32, i32* %31
store i32 %32, i32* %8
%33 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 2
%34 = load i32, i32* %33
store i32 %34, i32* %9
%35 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 1
%36 = load i32, i32* %35
store i32 %36, i32* %10
%37 = getelementptr inbounds %struct.stat, %struct.stat* %14, i64 0, i32 0
%38 = load i32, i32* %37
store i32 %38, i32* %11
ret void
}