#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 {
  int /*<<< orphan*/ st_ctime;
  int /*<<< orphan*/ st_mtime;
  int /*<<< orphan*/ st_atime;
  int /*<<< orphan*/ st_blocks;
  int /*<<< orphan*/ st_blksize;
  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;
};

/* Variables and functions */
int /*<<< orphan*/ dm_LogPrintf(int, char *, int /*<<< orphan*/);
void LogStat(struct stat *statfs) {
  dm_LogPrintf(3, "  st_dev %d\n", statfs->st_dev);
  dm_LogPrintf(3, "  st_ino %d\n", statfs->st_ino);
  dm_LogPrintf(3, "  st_mode 0x%x\n", statfs->st_mode);
  dm_LogPrintf(3, "  st_nlink %d\n", statfs->st_nlink);
  dm_LogPrintf(3, "  st_uid %d\n", statfs->st_uid);
  dm_LogPrintf(3, "  st_gid %d\n", statfs->st_gid);
  dm_LogPrintf(3, "  st_rdev %d\n", statfs->st_rdev);
  dm_LogPrintf(3, "  st_size %lld\n", statfs->st_size);
  dm_LogPrintf(3, "  st_blksize %d\n", statfs->st_blksize);
  dm_LogPrintf(3, "  st_blocks %d\n", statfs->st_blocks);
  dm_LogPrintf(3, "  st_atime %d\n", statfs->st_atime);
  dm_LogPrintf(3, "  st_mtime %d\n", statfs->st_mtime);
  dm_LogPrintf(3, "  st_ctime %d\n", statfs->st_ctime);
}


x86 assembly (clang, -O0):
<LogStat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%edx
mov    $0x3,%edi
lea    0xed1(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%edx
mov    $0x3,%edi
lea    0xec6(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%edx
mov    $0x3,%edi
lea    0xebb(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%edx
mov    $0x3,%edi
lea    0xeb3(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%edx
mov    $0x3,%edi
lea    0xeaa(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%edx
mov    $0x3,%edi
lea    0xe9f(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%edx
mov    $0x3,%edi
lea    0xe94(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%edx
mov    $0x3,%edi
lea    0xe8a(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edx
mov    $0x3,%edi
lea    0xe82(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edx
mov    $0x3,%edi
lea    0xe7b(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edx
mov    $0x3,%edi
lea    0xe73(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    $0x3,%edi
lea    0xe6a(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    $0x3,%edi
lea    0xe62(%rip),%rsi
call   1030 <dm_LogPrintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LogStat>:
push   %rbx
mov    %rdi,%rbx
mov    0x30(%rdi),%edx
lea    0xee2(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x2c(%rbx),%edx
lea    0xedb(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x28(%rbx),%edx
lea    0xed4(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x24(%rbx),%edx
lea    0xed0(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x20(%rbx),%edx
lea    0xecb(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x1c(%rbx),%edx
lea    0xec4(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x18(%rbx),%edx
lea    0xebd(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x14(%rbx),%edx
lea    0xeb7(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x10(%rbx),%edx
lea    0xeb3(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0xc(%rbx),%edx
lea    0xeb0(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x8(%rbx),%edx
lea    0xeac(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    0x4(%rbx),%edx
lea    0xea7(%rip),%rsi
mov    $0x3,%edi
call   1030 <dm_LogPrintf@plt>
mov    (%rbx),%edx
lea    0xea3(%rip),%rsi
mov    $0x3,%edi
pop    %rbx
jmp    1030 <dm_LogPrintf@plt>

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [13 x i8] c" st_dev %d\0A\00"
@.str.1 = [13 x i8] c" st_ino %d\0A\00"
@.str.2 = [16 x i8] c" st_mode 0x%x\0A\00"
@.str.3 = [15 x i8] c" st_nlink %d\0A\00"
@.str.4 = [13 x i8] c" st_uid %d\0A\00"
@.str.5 = [13 x i8] c" st_gid %d\0A\00"
@.str.6 = [14 x i8] c" st_rdev %d\0A\00"
@.str.7 = [16 x i8] c" st_size %lld\0A\00"
@.str.8 = [17 x i8] c" st_blksize %d\0A\00"
@.str.9 = [16 x i8] c" st_blocks %d\0A\00"
@.str.10 = [15 x i8] c" st_atime %d\0A\00"
@.str.11 = [15 x i8] c" st_mtime %d\0A\00"
@.str.12 = [15 x i8] c" st_ctime %d\0A\00"
define void @LogStat(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 12
%5 = load i32, i32* %4
%6 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load %struct.stat*, %struct.stat** %2
%8 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 11
%9 = load i32, i32* %8
%10 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load %struct.stat*, %struct.stat** %2
%12 = getelementptr inbounds %struct.stat, %struct.stat* %11, i32 0, i32 10
%13 = load i32, i32* %12
%14 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load %struct.stat*, %struct.stat** %2
%16 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 9
%17 = load i32, i32* %16
%18 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load %struct.stat*, %struct.stat** %2
%20 = getelementptr inbounds %struct.stat, %struct.stat* %19, i32 0, i32 8
%21 = load i32, i32* %20
%22 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = load %struct.stat*, %struct.stat** %2
%24 = getelementptr inbounds %struct.stat, %struct.stat* %23, i32 0, i32 7
%25 = load i32, i32* %24
%26 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %25)
%27 = load %struct.stat*, %struct.stat** %2
%28 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 6
%29 = load i32, i32* %28
%30 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %29)
%31 = load %struct.stat*, %struct.stat** %2
%32 = getelementptr inbounds %struct.stat, %struct.stat* %31, i32 0, i32 5
%33 = load i32, i32* %32
%34 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 %33)
%35 = load %struct.stat*, %struct.stat** %2
%36 = getelementptr inbounds %struct.stat, %struct.stat* %35, i32 0, i32 4
%37 = load i32, i32* %36
%38 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %37)
%39 = load %struct.stat*, %struct.stat** %2
%40 = getelementptr inbounds %struct.stat, %struct.stat* %39, i32 0, i32 3
%41 = load i32, i32* %40
%42 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 %41)
%43 = load %struct.stat*, %struct.stat** %2
%44 = getelementptr inbounds %struct.stat, %struct.stat* %43, i32 0, i32 2
%45 = load i32, i32* %44
%46 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %45)
%47 = load %struct.stat*, %struct.stat** %2
%48 = getelementptr inbounds %struct.stat, %struct.stat* %47, i32 0, i32 1
%49 = load i32, i32* %48
%50 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), i32 %49)
%51 = load %struct.stat*, %struct.stat** %2
%52 = getelementptr inbounds %struct.stat, %struct.stat* %51, i32 0, i32 0
%53 = load i32, i32* %52
%54 = call i32 @dm_LogPrintf(i32 3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0), i32 %53)
ret void
}

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