#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 */
struct stat {
  scalar_t__ st_blocks;
  scalar_t__ st_blksize;
  scalar_t__ st_size;
  scalar_t__ st_rdev;
  scalar_t__ st_gid;
  scalar_t__ st_uid;
  scalar_t__ st_mode;
  scalar_t__ st_nlink;
  scalar_t__ st_ino;
  scalar_t__ st_dev;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, int, long long);
int /*<<< orphan*/ stat(char *, struct stat *);
int main(int argc, char **argv) {
  struct stat buf;
  stat(argv[1], &buf);
  printf("st_dev"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_dev)),
         sizeof(((struct stat *)0)->st_dev), (long long)buf.st_dev);
  ;
  printf("st_ino"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_ino)),
         sizeof(((struct stat *)0)->st_ino), (long long)buf.st_ino);
  ;
  printf("st_nlink"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_nlink)),
         sizeof(((struct stat *)0)->st_nlink), (long long)buf.st_nlink);
  ;
  printf("st_mode"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_mode)),
         sizeof(((struct stat *)0)->st_mode), (long long)buf.st_mode);
  ;
  printf("st_uid"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_uid)),
         sizeof(((struct stat *)0)->st_uid), (long long)buf.st_uid);
  ;
  printf("st_gid"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_gid)),
         sizeof(((struct stat *)0)->st_gid), (long long)buf.st_gid);
  ;
  printf("st_rdev"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_rdev)),
         sizeof(((struct stat *)0)->st_rdev), (long long)buf.st_rdev);
  ;
  printf("st_size"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_size)),
         sizeof(((struct stat *)0)->st_size), (long long)buf.st_size);
  ;
  printf("st_blksize"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_blksize)),
         sizeof(((struct stat *)0)->st_blksize), (long long)buf.st_blksize);
  ;
  printf("st_blocks"
         " %d %d %016llx\n",
         ((unsigned)(&((struct stat *)0)->st_blocks)),
         sizeof(((struct stat *)0)->st_blocks), (long long)buf.st_blocks);
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x60(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x18(%rbp),%rcx
lea    0xeae(%rip),%rdi
xor    %eax,%eax
add    $0x48,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x20(%rbp),%rcx
lea    0xea7(%rip),%rdi
xor    %eax,%eax
add    $0x40,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x28(%rbp),%rcx
lea    0xea0(%rip),%rdi
xor    %eax,%eax
add    $0x38,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x30(%rbp),%rcx
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
add    $0x30,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x38(%rbp),%rcx
lea    0xe95(%rip),%rdi
xor    %eax,%eax
add    $0x28,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x40(%rbp),%rcx
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
add    $0x20,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x48(%rbp),%rcx
lea    0xe87(%rip),%rdi
xor    %eax,%eax
add    $0x18,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x50(%rbp),%rcx
lea    0xe81(%rip),%rdi
xor    %eax,%eax
add    $0x10,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x58(%rbp),%rcx
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rax
mov    %eax,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    -0x60(%rbp),%rcx
lea    0xe78(%rip),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
mov    0x8(%rsi),%rdi
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
mov    0x50(%rsp),%rcx
lea    0xec2(%rip),%rdi
mov    $0x48,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x48(%rsp),%rcx
lea    0xebd(%rip),%rdi
mov    $0x40,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x40(%rsp),%rcx
lea    0xeb8(%rip),%rdi
mov    $0x38,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x38(%rsp),%rcx
lea    0xeb5(%rip),%rdi
mov    $0x30,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x30(%rsp),%rcx
lea    0xeb1(%rip),%rdi
mov    $0x28,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x28(%rsp),%rcx
lea    0xeac(%rip),%rdi
mov    $0x20,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x20(%rsp),%rcx
lea    0xea7(%rip),%rdi
mov    $0x18,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x18(%rsp),%rcx
lea    0xea3(%rip),%rdi
mov    $0x10,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x10(%rsp),%rcx
lea    0xe9f(%rip),%rdi
mov    $0x8,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    0x8(%rsp),%rcx
lea    0xe9e(%rip),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str = [22 x i8] c"st_dev %d %d %016llx\0A\00"
@.str.1 = [22 x i8] c"st_ino %d %d %016llx\0A\00"
@.str.2 = [24 x i8] c"st_nlink %d %d %016llx\0A\00"
@.str.3 = [23 x i8] c"st_mode %d %d %016llx\0A\00"
@.str.4 = [22 x i8] c"st_uid %d %d %016llx\0A\00"
@.str.5 = [22 x i8] c"st_gid %d %d %016llx\0A\00"
@.str.6 = [23 x i8] c"st_rdev %d %d %016llx\0A\00"
@.str.7 = [23 x i8] c"st_size %d %d %016llx\0A\00"
@.str.8 = [26 x i8] c"st_blksize %d %d %016llx\0A\00"
@.str.9 = [25 x i8] c"st_blocks %d %d %016llx\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.stat
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @stat(i8* %9, %struct.stat* %6)
%11 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 9
%12 = load i64, i64* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 9) to i32), i32 8, i64 %12)
%14 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 8
%15 = load i64, i64* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 8) to i32), i32 8, i64 %15)
%17 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 7
%18 = load i64, i64* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 7) to i32), i32 8, i64 %18)
%20 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 6
%21 = load i64, i64* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 6) to i32), i32 8, i64 %21)
%23 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 5
%24 = load i64, i64* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 5) to i32), i32 8, i64 %24)
%26 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 4
%27 = load i64, i64* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 4) to i32), i32 8, i64 %27)
%29 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 3
%30 = load i64, i64* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 3) to i32), i32 8, i64 %30)
%32 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 2
%33 = load i64, i64* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 2) to i32), i32 8, i64 %33)
%35 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%36 = load i64, i64* %35
%37 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i32 ptrtoint (i64* getelementptr inbounds (%struct.stat, %struct.stat* null, i32 0, i32 1) to i32), i32 8, i64 %36)
%38 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%39 = load i64, i64* %38
%40 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 0, i32 8, i64 %39)
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str = [22 x i8] c"st_dev %d %d %016llx\0A\00"
@.str.1 = [22 x i8] c"st_ino %d %d %016llx\0A\00"
@.str.2 = [24 x i8] c"st_nlink %d %d %016llx\0A\00"
@.str.3 = [23 x i8] c"st_mode %d %d %016llx\0A\00"
@.str.4 = [22 x i8] c"st_uid %d %d %016llx\0A\00"
@.str.5 = [22 x i8] c"st_gid %d %d %016llx\0A\00"
@.str.6 = [23 x i8] c"st_rdev %d %d %016llx\0A\00"
@.str.7 = [23 x i8] c"st_size %d %d %016llx\0A\00"
@.str.8 = [26 x i8] c"st_blksize %d %d %016llx\0A\00"
@.str.9 = [25 x i8] c"st_blocks %d %d %016llx\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @stat(i8* %6, %struct.stat* %3)
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 9
%9 = load i64, i64* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 72, i32 8, i64 %9)
%11 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 8
%12 = load i64, i64* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 64, i32 8, i64 %12)
%14 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 7
%15 = load i64, i64* %14
%16 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 56, i32 8, i64 %15)
%17 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 6
%18 = load i64, i64* %17
%19 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 48, i32 8, i64 %18)
%20 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 5
%21 = load i64, i64* %20
%22 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 40, i32 8, i64 %21)
%23 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 4
%24 = load i64, i64* %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 32, i32 8, i64 %24)
%26 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 3
%27 = load i64, i64* %26
%28 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 24, i32 8, i64 %27)
%29 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
%30 = load i64, i64* %29
%31 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 16, i32 8, i64 %30)
%32 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%33 = load i64, i64* %32
%34 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i32 8, i32 8, i64 %33)
%35 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%36 = load i64, i64* %35
%37 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 0, i32 8, i64 %36)
ret i32 0
}