#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_ctime;
  scalar_t__ st_mtime;
  scalar_t__ st_atime;
  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_nlink;
  scalar_t__ st_mode;
  scalar_t__ st_ino;
  scalar_t__ st_dev;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_struct_stat(char *msg, struct stat *s) {
  printf("%s\n", msg);
  printf("device    : 0x%llx\n", (long long)s->st_dev);
  printf("inode     : %lld\n", (long long)s->st_ino);
  printf("mode      : 0x%llx\n", (long long)s->st_mode);
  printf("nlink     : %lld\n", (long long)s->st_nlink);
  printf("uid       : %lld\n", (long long)s->st_uid);
  printf("gid       : %lld\n", (long long)s->st_gid);
  printf("rdev      : 0x%llx\n", (long long)s->st_rdev);
  printf("size      : %lld\n", (long long)s->st_size);
  printf("blksize   : %lld\n", (long long)s->st_blksize);
  printf("blocks    : %lld\n", (long long)s->st_blocks);
  printf("atime     : %lld\n", (long long)s->st_atime);
  printf("mtime     : %lld\n", (long long)s->st_mtime);
  printf("ctime     : %lld\n", (long long)s->st_ctime);
}


x86 assembly (clang, -O0):
<print_struct_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x60(%rax),%rsi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x58(%rax),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x50(%rax),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rsi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rsi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_struct_stat>:
push   %rbx
mov    %rsi,%rbx
call   1030 <puts@plt>
mov    0x60(%rbx),%rsi
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x58(%rbx),%rsi
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x50(%rbx),%rsi
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rbx),%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rbx),%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rbx),%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rbx),%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rbx),%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rsi
lea    0xed3(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [20 x i8] c"device : 0x%llx\0A\00"
@.str.2 = [18 x i8] c"inode : %lld\0A\00"
@.str.3 = [20 x i8] c"mode : 0x%llx\0A\00"
@.str.4 = [18 x i8] c"nlink : %lld\0A\00"
@.str.5 = [18 x i8] c"uid : %lld\0A\00"
@.str.6 = [18 x i8] c"gid : %lld\0A\00"
@.str.7 = [20 x i8] c"rdev : 0x%llx\0A\00"
@.str.8 = [18 x i8] c"size : %lld\0A\00"
@.str.9 = [18 x i8] c"blksize : %lld\0A\00"
@.str.10 = [18 x i8] c"blocks : %lld\0A\00"
@.str.11 = [18 x i8] c"atime : %lld\0A\00"
@.str.12 = [18 x i8] c"mtime : %lld\0A\00"
@.str.13 = [18 x i8] c"ctime : %lld\0A\00"
define void @print_struct_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load %struct.stat*, %struct.stat** %4
%8 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 12
%9 = load i64, i64* %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 %9)
%11 = load %struct.stat*, %struct.stat** %4
%12 = getelementptr inbounds %struct.stat, %struct.stat* %11, i32 0, i32 11
%13 = load i64, i64* %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 %13)
%15 = load %struct.stat*, %struct.stat** %4
%16 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 10
%17 = load i64, i64* %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i64 %17)
%19 = load %struct.stat*, %struct.stat** %4
%20 = getelementptr inbounds %struct.stat, %struct.stat* %19, i32 0, i32 9
%21 = load i64, i64* %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i64 %21)
%23 = load %struct.stat*, %struct.stat** %4
%24 = getelementptr inbounds %struct.stat, %struct.stat* %23, i32 0, i32 8
%25 = load i64, i64* %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i64 %25)
%27 = load %struct.stat*, %struct.stat** %4
%28 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 7
%29 = load i64, i64* %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i64 %29)
%31 = load %struct.stat*, %struct.stat** %4
%32 = getelementptr inbounds %struct.stat, %struct.stat* %31, i32 0, i32 6
%33 = load i64, i64* %32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i64 %33)
%35 = load %struct.stat*, %struct.stat** %4
%36 = getelementptr inbounds %struct.stat, %struct.stat* %35, i32 0, i32 5
%37 = load i64, i64* %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i64 %37)
%39 = load %struct.stat*, %struct.stat** %4
%40 = getelementptr inbounds %struct.stat, %struct.stat* %39, i32 0, i32 4
%41 = load i64, i64* %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i64 %41)
%43 = load %struct.stat*, %struct.stat** %4
%44 = getelementptr inbounds %struct.stat, %struct.stat* %43, i32 0, i32 3
%45 = load i64, i64* %44
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i64 %45)
%47 = load %struct.stat*, %struct.stat** %4
%48 = getelementptr inbounds %struct.stat, %struct.stat* %47, i32 0, i32 2
%49 = load i64, i64* %48
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i64 %49)
%51 = load %struct.stat*, %struct.stat** %4
%52 = getelementptr inbounds %struct.stat, %struct.stat* %51, i32 0, i32 1
%53 = load i64, i64* %52
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i64 %53)
%55 = load %struct.stat*, %struct.stat** %4
%56 = getelementptr inbounds %struct.stat, %struct.stat* %55, i32 0, i32 0
%57 = load i64, i64* %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i64 %57)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str.1 = [20 x i8] c"device : 0x%llx\0A\00"
@.str.2 = [18 x i8] c"inode : %lld\0A\00"
@.str.3 = [20 x i8] c"mode : 0x%llx\0A\00"
@.str.4 = [18 x i8] c"nlink : %lld\0A\00"
@.str.5 = [18 x i8] c"uid : %lld\0A\00"
@.str.6 = [18 x i8] c"gid : %lld\0A\00"
@.str.7 = [20 x i8] c"rdev : 0x%llx\0A\00"
@.str.8 = [18 x i8] c"size : %lld\0A\00"
@.str.9 = [18 x i8] c"blksize : %lld\0A\00"
@.str.10 = [18 x i8] c"blocks : %lld\0A\00"
@.str.11 = [18 x i8] c"atime : %lld\0A\00"
@.str.12 = [18 x i8] c"mtime : %lld\0A\00"
@.str.13 = [18 x i8] c"ctime : %lld\0A\00"
define void @print_struct_stat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 12
%5 = load i64, i64* %4
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 %5)
%7 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 11
%8 = load i64, i64* %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 %8)
%10 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 10
%11 = load i64, i64* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i64 %11)
%13 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 9
%14 = load i64, i64* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i64 %14)
%16 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 8
%17 = load i64, i64* %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i64 %17)
%19 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 7
%20 = load i64, i64* %19
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i64 %20)
%22 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 6
%23 = load i64, i64* %22
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i64 %23)
%25 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 5
%26 = load i64, i64* %25
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i64 %26)
%28 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 4
%29 = load i64, i64* %28
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i64 %29)
%31 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 3
%32 = load i64, i64* %31
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i64 %32)
%34 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 2
%35 = load i64, i64* %34
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i64 %35)
%37 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%38 = load i64, i64* %37
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i64 %38)
%40 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%41 = load i64, i64* %40
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i64 %41)
ret void
}