#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_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int tv_sec;
  int tv_usec;
};
struct TYPE_3__ {
  int tv_sec;
  int tv_usec;
};
struct rusage {
  int ru_minflt;
  int ru_majflt;
  TYPE_2__ ru_stime;
  TYPE_1__ ru_utime;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, int, int,
                           int, int, int);
int /*<<< orphan*/ stderr;
void show_rusage(char *tag, struct rusage *rusage) {
  fprintf(stderr, "%s %8d.%06d %8d.%06d %8d %8d\n", tag,
          rusage->ru_utime.tv_sec, rusage->ru_utime.tv_usec,
          rusage->ru_stime.tv_sec, rusage->ru_stime.tv_usec, rusage->ru_minflt,
          rusage->ru_majflt);
}


x86 assembly (clang, -O0):
<show_rusage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%r8d
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%r9d
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%r11d
mov    -0x10(%rbp),%rax
mov    (%rax),%r10d
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
lea    0xe9f(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_rusage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rsi),%ecx
mov    0x14(%rsi),%r8d
mov    0x8(%rsi),%r9d
mov    0xc(%rsi),%r10d
mov    (%rsi),%r11d
mov    0x4(%rsi),%eax
sub    $0x8,%rsp
lea    0xec3(%rip),%rsi
push   %rax
push   %r11
push   %r10
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
%struct.rusage = type { i32, i32, %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32, i32 }
@stderr = global i32 0
@.str = [30 x i8] c"%s %8d.%06d %8d.%06d %8d %8d\0A\00"
define void @show_rusage(i8* %0, %struct.rusage* %1) {
%3 = alloca i8*
%4 = alloca %struct.rusage*
store i8* %0, i8** %3
store %struct.rusage* %1, %struct.rusage** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load %struct.rusage*, %struct.rusage** %4
%8 = getelementptr inbounds %struct.rusage, %struct.rusage* %7, i32 0, i32 3
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = load %struct.rusage*, %struct.rusage** %4
%12 = getelementptr inbounds %struct.rusage, %struct.rusage* %11, i32 0, i32 3
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %12, i32 0, i32 1
%14 = load i32, i32* %13
%15 = load %struct.rusage*, %struct.rusage** %4
%16 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 2
%17 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %16, i32 0, i32 0
%18 = load i32, i32* %17
%19 = load %struct.rusage*, %struct.rusage** %4
%20 = getelementptr inbounds %struct.rusage, %struct.rusage* %19, i32 0, i32 2
%21 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %20, i32 0, i32 1
%22 = load i32, i32* %21
%23 = load %struct.rusage*, %struct.rusage** %4
%24 = getelementptr inbounds %struct.rusage, %struct.rusage* %23, i32 0, i32 0
%25 = load i32, i32* %24
%26 = load %struct.rusage*, %struct.rusage** %4
%27 = getelementptr inbounds %struct.rusage, %struct.rusage* %26, i32 0, i32 1
%28 = load i32, i32* %27
%29 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %10, i32 %14, i32 %18, i32 %22, i32 %25, i32 %28)
ret void
}

LLVM IR (-O2):
%struct.rusage = type { i32, i32, %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32, i32 }
@stderr = global i32 0
@.str = [30 x i8] c"%s %8d.%06d %8d.%06d %8d %8d\0A\00"
define void @show_rusage(i8* %0, %struct.rusage* nocapture %1) {
%3 = load i32, i32* @stderr
%4 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 3, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 3, i32 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 2, i32 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 2, i32 1
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 1
%15 = load i32, i32* %14
%16 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %5, i32 %7, i32 %9, i32 %11, i32 %13, i32 %15)
ret void
}