#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 cgroupstats {
  int /*<<< orphan*/ nr_uninterruptible;
  int /*<<< orphan*/ nr_stopped;
  int /*<<< orphan*/ nr_running;
  int /*<<< orphan*/ nr_io_wait;
  int /*<<< orphan*/ nr_sleeping;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void print_cgroupstats(struct cgroupstats *c) {
  printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
         "uninterruptible %llu\n",
         c->nr_sleeping, c->nr_io_wait, c->nr_running, c->nr_stopped,
         c->nr_uninterruptible);
}


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

x86 assembly (clang, -O2):
<print_cgroupstats>:
mov    0x10(%rdi),%esi
mov    0xc(%rdi),%edx
mov    0x8(%rdi),%ecx
mov    (%rdi),%r9d
mov    0x4(%rdi),%r8d
lea    0xed9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.cgroupstats = type { i32, i32, i32, i32, i32 }
@.str = [79 x i8] c"sleeping %llu, blocked %llu, running %llu, stopped %llu, uninterruptible %llu\0A\00"
define void @print_cgroupstats(%struct.cgroupstats* %0) {
%2 = alloca %struct.cgroupstats*
store %struct.cgroupstats* %0, %struct.cgroupstats** %2
%3 = load %struct.cgroupstats*, %struct.cgroupstats** %2
%4 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %3, i32 0, i32 4
%5 = load i32, i32* %4
%6 = load %struct.cgroupstats*, %struct.cgroupstats** %2
%7 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %6, i32 0, i32 3
%8 = load i32, i32* %7
%9 = load %struct.cgroupstats*, %struct.cgroupstats** %2
%10 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %9, i32 0, i32 2
%11 = load i32, i32* %10
%12 = load %struct.cgroupstats*, %struct.cgroupstats** %2
%13 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %12, i32 0, i32 1
%14 = load i32, i32* %13
%15 = load %struct.cgroupstats*, %struct.cgroupstats** %2
%16 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %15, i32 0, i32 0
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %11, i32 %14, i32 %17)
ret void
}

LLVM IR (-O2):
%struct.cgroupstats = type { i32, i32, i32, i32, i32 }
@.str = [79 x i8] c"sleeping %llu, blocked %llu, running %llu, stopped %llu, uninterruptible %llu\0A\00"
define void @print_cgroupstats(%struct.cgroupstats* nocapture %0) {
%2 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %0, i64 0, i32 4
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %0, i64 0, i32 3
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %0, i64 0, i32 2
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %0, i64 0, i32 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.cgroupstats, %struct.cgroupstats* %0, i64 0, i32 0
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %9, i32 %11)
ret void
}