#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 */
typedef struct TYPE_6__ TYPE_3__;
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_6__ {
  int tv_sec;
  int tv_nsec;
};
struct TYPE_5__ {
  int tv_sec;
  int tv_nsec;
};
struct TYPE_4__ {
  int tv_sec;
  int tv_nsec;
};
struct stat {
  int st_dev;
  int st_ino;
  int st_mode;
  int st_nlink;
  int st_uid;
  int st_gid;
  int st_rdev;
  int st_size;
  int st_blksize;
  int st_blocks;
  TYPE_3__ st_ctim;
  TYPE_2__ st_mtim;
  TYPE_1__ st_atim;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_fstat;
int /*<<< orphan*/ printf(char *, int);
int syscall(int /*<<< orphan*/, int, struct stat *);
int main() {
  struct stat stat;
  int rv;
  rv = syscall(SYS_fstat, 1, &stat);
  printf("rv %d\n", rv);
  printf(" st_dev %lu\n", stat.st_dev);
  printf(" st_ino %lu\n", stat.st_ino);
  printf(" st_mode %d\n", stat.st_mode);
  printf(" st_nlink %lu\n", stat.st_nlink);
  printf(" st_uid %d\n", stat.st_uid);
  printf(" st_gid %d\n", stat.st_gid);
  printf(" st_rdev %lu\n", stat.st_rdev);
  printf(" st_size %ld\n", stat.st_size);
  printf(" st_blksize %lu\n", stat.st_blksize);
  printf(" st_blocks %lu\n", stat.st_blocks);
  printf(" st_atim.tv_sec %lu\n", stat.st_atim.tv_sec);
  printf(" st_atim.tv_nsec %lu\n", stat.st_atim.tv_nsec);
  printf(" st_mtim.tv_sec %lu\n", stat.st_mtim.tv_sec);
  printf(" st_mtim.tv_nsec %lu\n", stat.st_mtim.tv_nsec);
  printf(" st_ctim.tv_sec %lu\n", stat.st_ctim.tv_sec);
  printf(" st_ctim.tv_nsec %lu\n", stat.st_ctim.tv_nsec);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
lea    -0x48(%rbp),%rdx
call   1040 <syscall@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x48(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x44(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x40(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rdx
mov    $0x1,%esi
call   1040 <syscall@plt>
lea    0xebd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    0x1c(%rsp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    0x20(%rsp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    0x24(%rsp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    0x28(%rsp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    0x2c(%rsp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    0x40(%rsp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    0x44(%rsp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    0x38(%rsp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    0x3c(%rsp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    0x30(%rsp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    0x34(%rsp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.TYPE_6__, %struct.TYPE_5__, %struct.TYPE_4__ }
%struct.TYPE_6__ = type { i32, i32 }
%struct.TYPE_5__ = type { i32, i32 }
%struct.TYPE_4__ = type { i32, i32 }
@SYS_fstat = global i32 0
@.str = [7 x i8] c"rv %d\0A\00"
@.str.1 = [13 x i8] c" st_dev %lu\0A\00"
@.str.2 = [13 x i8] c" st_ino %lu\0A\00"
@.str.3 = [13 x i8] c" st_mode %d\0A\00"
@.str.4 = [15 x i8] c" st_nlink %lu\0A\00"
@.str.5 = [12 x i8] c" st_uid %d\0A\00"
@.str.6 = [12 x i8] c" st_gid %d\0A\00"
@.str.7 = [14 x i8] c" st_rdev %lu\0A\00"
@.str.8 = [14 x i8] c" st_size %ld\0A\00"
@.str.9 = [17 x i8] c" st_blksize %lu\0A\00"
@.str.10 = [16 x i8] c" st_blocks %lu\0A\00"
@.str.11 = [21 x i8] c" st_atim.tv_sec %lu\0A\00"
@.str.12 = [22 x i8] c" st_atim.tv_nsec %lu\0A\00"
@.str.13 = [21 x i8] c" st_mtim.tv_sec %lu\0A\00"
@.str.14 = [22 x i8] c" st_mtim.tv_nsec %lu\0A\00"
@.str.15 = [21 x i8] c" st_ctim.tv_sec %lu\0A\00"
@.str.16 = [22 x i8] c" st_ctim.tv_nsec %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.stat
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* @SYS_fstat
%5 = call i32 @syscall(i32 %4, i32 1, %struct.stat* %2)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 1
%12 = load i32, i32* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 2
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 3
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 4
%21 = load i32, i32* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 5
%24 = load i32, i32* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 6
%27 = load i32, i32* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 7
%30 = load i32, i32* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %30)
%32 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 8
%33 = load i32, i32* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 9
%36 = load i32, i32* %35
%37 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 12
%39 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %38, i32 0, i32 0
%40 = load i32, i32* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 12
%43 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %42, i32 0, i32 1
%44 = load i32, i32* %43
%45 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i32 %44)
%46 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 11
%47 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %46, i32 0, i32 0
%48 = load i32, i32* %47
%49 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 11
%51 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %50, i32 0, i32 1
%52 = load i32, i32* %51
%53 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 10
%55 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %54, i32 0, i32 0
%56 = load i32, i32* %55
%57 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 10
%59 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %58, i32 0, i32 1
%60 = load i32, i32* %59
%61 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0), i32 %60)
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.TYPE_6__, %struct.TYPE_5__, %struct.TYPE_4__ }
%struct.TYPE_6__ = type { i32, i32 }
%struct.TYPE_5__ = type { i32, i32 }
%struct.TYPE_4__ = type { i32, i32 }
@SYS_fstat = global i32 0
@.str = [7 x i8] c"rv %d\0A\00"
@.str.1 = [13 x i8] c" st_dev %lu\0A\00"
@.str.2 = [13 x i8] c" st_ino %lu\0A\00"
@.str.3 = [13 x i8] c" st_mode %d\0A\00"
@.str.4 = [15 x i8] c" st_nlink %lu\0A\00"
@.str.5 = [12 x i8] c" st_uid %d\0A\00"
@.str.6 = [12 x i8] c" st_gid %d\0A\00"
@.str.7 = [14 x i8] c" st_rdev %lu\0A\00"
@.str.8 = [14 x i8] c" st_size %ld\0A\00"
@.str.9 = [17 x i8] c" st_blksize %lu\0A\00"
@.str.10 = [16 x i8] c" st_blocks %lu\0A\00"
@.str.11 = [21 x i8] c" st_atim.tv_sec %lu\0A\00"
@.str.12 = [22 x i8] c" st_atim.tv_nsec %lu\0A\00"
@.str.13 = [21 x i8] c" st_mtim.tv_sec %lu\0A\00"
@.str.14 = [22 x i8] c" st_mtim.tv_nsec %lu\0A\00"
@.str.15 = [21 x i8] c" st_ctim.tv_sec %lu\0A\00"
@.str.16 = [22 x i8] c" st_ctim.tv_nsec %lu\0A\00"
define i32 @main() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = load i32, i32* @SYS_fstat
%4 = call i32 @syscall(i32 %3, i32 1, %struct.stat* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 2
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 3
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 4
%19 = load i32, i32* %18
%20 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 5
%22 = load i32, i32* %21
%23 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 6
%25 = load i32, i32* %24
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 7
%28 = load i32, i32* %27
%29 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 8
%31 = load i32, i32* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 9
%34 = load i32, i32* %33
%35 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 12, i32 0
%37 = load i32, i32* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 12, i32 1
%40 = load i32, i32* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 11, i32 0
%43 = load i32, i32* %42
%44 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 11, i32 1
%46 = load i32, i32* %45
%47 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 10, i32 0
%49 = load i32, i32* %48
%50 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 10, i32 1
%52 = load i32, i32* %51
%53 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0), i32 %52)
ret i32 0
}