#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 /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};
struct TYPE_3__ {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};
struct rusage {
  TYPE_2__ ru_stime;
  TYPE_1__ ru_utime;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void print_rusage_to_human(FILE *output, struct rusage *usage) {
  fprintf(output, "user time: %ld.%06lds\nsystem time: %ld.%06lds\n",
          usage->ru_utime.tv_sec, usage->ru_utime.tv_usec,
          usage->ru_stime.tv_sec, usage->ru_stime.tv_usec);
}


x86 assembly (clang, -O0):
<print_rusage_to_human>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%r8d
mov    -0x10(%rbp),%rax
mov    (%rax),%r9d
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_rusage_to_human>:
mov    0xc(%rsi),%edx
mov    0x8(%rsi),%ecx
mov    (%rsi),%r9d
mov    0x4(%rsi),%r8d
lea    0xedc(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.rusage = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32, i32 }
@.str = [47 x i8] c"user time: %ld.%06lds\0Asystem time: %ld.%06lds\0A\00"
define void @print_rusage_to_human(i32* %0, %struct.rusage* %1) {
%3 = alloca i32*
%4 = alloca %struct.rusage*
store i32* %0, i32** %3
store %struct.rusage* %1, %struct.rusage** %4
%5 = load i32*, i32** %3
%6 = load %struct.rusage*, %struct.rusage** %4
%7 = getelementptr inbounds %struct.rusage, %struct.rusage* %6, i32 0, i32 1
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 1
%9 = load i32, i32* %8
%10 = load %struct.rusage*, %struct.rusage** %4
%11 = getelementptr inbounds %struct.rusage, %struct.rusage* %10, i32 0, i32 1
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = load %struct.rusage*, %struct.rusage** %4
%15 = getelementptr inbounds %struct.rusage, %struct.rusage* %14, i32 0, i32 0
%16 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = load %struct.rusage*, %struct.rusage** %4
%19 = getelementptr inbounds %struct.rusage, %struct.rusage* %18, i32 0, i32 0
%20 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %19, i32 0, i32 0
%21 = load i32, i32* %20
%22 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %13, i32 %17, i32 %21)
ret void
}

LLVM IR (-O2):
%struct.rusage = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32, i32 }
@.str = [47 x i8] c"user time: %ld.%06lds\0Asystem time: %ld.%06lds\0A\00"
define void @print_rusage_to_human(i32* nocapture %0, %struct.rusage* nocapture %1) {
%3 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 1, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 1, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 0
%10 = load i32, i32* %9
%11 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %8, i32 %10)
ret void
}