#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 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;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int, int, int,
                          int);
void _disp_stat(struct stat *statbuf) {
  printf("Device ID = %d\n"
         "Inode number = %d\n"
         "mode_t = %d\n"
         "Number of hard links = %d\n"
         "User ID of owner = %d\n"
         "Group ID of owner = %d\n"
         "Device ID = %d\n"
         "Total size (in bytes) = %d\n"
         "Block size of fs I/O = %d\n"
         "Block count allocated (512B) = %d\n",
         statbuf->st_dev, statbuf->st_ino, statbuf->st_mode, statbuf->st_nlink,
         statbuf->st_uid, statbuf->st_gid, statbuf->st_rdev, statbuf->st_size,
         statbuf->st_blksize, statbuf->st_blocks);
}


x86 assembly (clang, -O0):
<_disp_stat>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%r8d
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%r9d
mov    -0x18(%rbp),%rax
mov    0x14(%rax),%r14d
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%ebx
mov    -0x18(%rbp),%rax
mov    0x1c(%rax),%r11d
mov    -0x18(%rbp),%rax
mov    0x20(%rax),%r10d
mov    -0x18(%rbp),%rax
mov    0x24(%rax),%eax
lea    0xe90(%rip),%rdi
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<_disp_stat>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
mov    0x8(%rdi),%ecx
mov    0xc(%rdi),%r8d
mov    0x10(%rdi),%r9d
mov    0x14(%rdi),%r10d
mov    0x18(%rdi),%r11d
mov    0x1c(%rdi),%r14d
mov    0x20(%rdi),%ebx
mov    0x24(%rdi),%eax
sub    $0x8,%rsp
lea    0xebf(%rip),%rdi
push   %rax
push   %rbx
push   %r14
push   %r11
push   %r10
call   1030 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [219 x i8] c"Device ID = %d\0AInode number = %d\0Amode_t = %d\0ANumber of hard links = %d\0AUser ID of owner = %d\0AGroup ID of owner = %d\0ADevice ID = %d\0ATotal size (in bytes) = %d\0ABlock size of fs I/O = %d\0ABlock count allocated (512B) = %d\0A\00"
define void @_disp_stat(%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 0
%5 = load i32, i32* %4
%6 = load %struct.stat*, %struct.stat** %2
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%8 = load i32, i32* %7
%9 = load %struct.stat*, %struct.stat** %2
%10 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 2
%11 = load i32, i32* %10
%12 = load %struct.stat*, %struct.stat** %2
%13 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 3
%14 = load i32, i32* %13
%15 = load %struct.stat*, %struct.stat** %2
%16 = getelementptr inbounds %struct.stat, %struct.stat* %15, i32 0, i32 4
%17 = load i32, i32* %16
%18 = load %struct.stat*, %struct.stat** %2
%19 = getelementptr inbounds %struct.stat, %struct.stat* %18, i32 0, i32 5
%20 = load i32, i32* %19
%21 = load %struct.stat*, %struct.stat** %2
%22 = getelementptr inbounds %struct.stat, %struct.stat* %21, i32 0, i32 6
%23 = load i32, i32* %22
%24 = load %struct.stat*, %struct.stat** %2
%25 = getelementptr inbounds %struct.stat, %struct.stat* %24, i32 0, i32 7
%26 = load i32, i32* %25
%27 = load %struct.stat*, %struct.stat** %2
%28 = getelementptr inbounds %struct.stat, %struct.stat* %27, i32 0, i32 8
%29 = load i32, i32* %28
%30 = load %struct.stat*, %struct.stat** %2
%31 = getelementptr inbounds %struct.stat, %struct.stat* %30, i32 0, i32 9
%32 = load i32, i32* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([219 x i8], [219 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %11, i32 %14, i32 %17, i32 %20, i32 %23, i32 %26, i32 %29, i32 %32)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [219 x i8] c"Device ID = %d\0AInode number = %d\0Amode_t = %d\0ANumber of hard links = %d\0AUser ID of owner = %d\0AGroup ID of owner = %d\0ADevice ID = %d\0ATotal size (in bytes) = %d\0ABlock size of fs I/O = %d\0ABlock count allocated (512B) = %d\0A\00"
define void @_disp_stat(%struct.stat* nocapture %0) {
%2 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 2
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 3
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 4
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 5
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 6
%15 = load i32, i32* %14
%16 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 7
%17 = load i32, i32* %16
%18 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 8
%19 = load i32, i32* %18
%20 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 9
%21 = load i32, i32* %20
%22 = tail call i32 @printf(i8* getelementptr inbounds ([219 x i8], [219 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %9, i32 %11, i32 %13, i32 %15, i32 %17, i32 %19, i32 %21)
ret void
}