#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 taskstats {
  int /*<<< orphan*/ swapin_delay_total;
  int /*<<< orphan*/ swapin_count;
  int /*<<< orphan*/ blkio_delay_total;
  int /*<<< orphan*/ blkio_count;
  int /*<<< orphan*/ cpu_delay_total;
  int /*<<< orphan*/ cpu_run_virtual_total;
  int /*<<< orphan*/ cpu_run_real_total;
  int /*<<< orphan*/ cpu_count;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/, char *,
                          char *, int /*<<< orphan*/, int /*<<< orphan*/,
                          char *, char *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void print_delayacct(struct taskstats *t) {
  printf("\n\nCPU   %15s%15s%15s%15s\n"
         "      %15llu%15llu%15llu%15llu\n"
         "IO    %15s%15s\n"
         "      %15llu%15llu\n"
         "MEM   %15s%15s\n"
         "      %15llu%15llu\n",
         "count", "real total", "virtual total", "delay total", t->cpu_count,
         t->cpu_run_real_total, t->cpu_run_virtual_total, t->cpu_delay_total,
         "count", "delay total", t->blkio_count, t->blkio_delay_total, "count",
         "delay total", t->swapin_count, t->swapin_delay_total);
}


x86 assembly (clang, -O0):
<print_delayacct>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdi,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    0x1c(%rax),%r9d
mov    -0x30(%rbp),%rax
mov    0x18(%rax),%eax
mov    -0x30(%rbp),%rcx
mov    0x14(%rcx),%r13d
mov    -0x30(%rbp),%rcx
mov    0x10(%rcx),%r12d
mov    -0x30(%rbp),%rcx
mov    0xc(%rcx),%r15d
mov    -0x30(%rbp),%rcx
mov    0x8(%rcx),%r14d
mov    -0x30(%rbp),%rcx
mov    0x4(%rcx),%r10d
mov    -0x30(%rbp),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x34(%rbp)
lea    0xe94(%rip),%rdi
lea    0xf0a(%rip),%rbx
lea    0xf09(%rip),%rdx
lea    0xf0d(%rip),%rcx
lea    0xf14(%rip),%r11
mov    %rbx,%rsi
mov    %r11,%r8
mov    %eax,(%rsp)
mov    -0x34(%rbp),%eax
mov    %r13d,0x8(%rsp)
mov    %r12d,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r15d,0x28(%rsp)
mov    %r14d,0x30(%rsp)
mov    %rbx,0x38(%rsp)
mov    %r11,0x40(%rsp)
mov    %r10d,0x48(%rsp)
mov    %eax,0x50(%rsp)
call   1030 <printf@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_delayacct>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x1c(%rdi),%r9d
mov    0x18(%rdi),%r10d
mov    0x14(%rdi),%r11d
mov    0x10(%rdi),%r14d
mov    0xc(%rdi),%r15d
mov    0x8(%rdi),%r12d
mov    (%rdi),%ebx
mov    0x4(%rdi),%eax
sub    $0x8,%rsp
lea    0xf5c(%rip),%r8
lea    0xf36(%rip),%rsi
lea    0xeb2(%rip),%rdi
lea    0xf2e(%rip),%rdx
lea    0xf32(%rip),%rcx
push   %rbx
push   %rax
push   %r8
push   %rsi
push   %r12
push   %r15
push   %r8
push   %rsi
push   %r14
push   %r11
push   %r10
call   1030 <printf@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.taskstats = type { i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [125 x i8] c"\0A\0ACPU %15s%15s%15s%15s\0A %15llu%15llu%15llu%15llu\0AIO %15s%15s\0A %15llu%15llu\0AMEM %15s%15s\0A %15llu%15llu\0A\00"
@.str.1 = [6 x i8] c"count\00"
@.str.2 = [11 x i8] c"real total\00"
@.str.3 = [14 x i8] c"virtual total\00"
@.str.4 = [12 x i8] c"delay total\00"
define void @print_delayacct(%struct.taskstats* %0) {
%2 = alloca %struct.taskstats*
store %struct.taskstats* %0, %struct.taskstats** %2
%3 = load %struct.taskstats*, %struct.taskstats** %2
%4 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %3, i32 0, i32 7
%5 = load i32, i32* %4
%6 = load %struct.taskstats*, %struct.taskstats** %2
%7 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %6, i32 0, i32 6
%8 = load i32, i32* %7
%9 = load %struct.taskstats*, %struct.taskstats** %2
%10 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %9, i32 0, i32 5
%11 = load i32, i32* %10
%12 = load %struct.taskstats*, %struct.taskstats** %2
%13 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %12, i32 0, i32 4
%14 = load i32, i32* %13
%15 = load %struct.taskstats*, %struct.taskstats** %2
%16 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %15, i32 0, i32 3
%17 = load i32, i32* %16
%18 = load %struct.taskstats*, %struct.taskstats** %2
%19 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %18, i32 0, i32 2
%20 = load i32, i32* %19
%21 = load %struct.taskstats*, %struct.taskstats** %2
%22 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %21, i32 0, i32 1
%23 = load i32, i32* %22
%24 = load %struct.taskstats*, %struct.taskstats** %2
%25 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %24, i32 0, i32 0
%26 = load i32, i32* %25
%27 = call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %5, i32 %8, i32 %11, i32 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %17, i32 %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %23, i32 %26)
ret void
}

LLVM IR (-O2):
%struct.taskstats = type { i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [125 x i8] c"\0A\0ACPU %15s%15s%15s%15s\0A %15llu%15llu%15llu%15llu\0AIO %15s%15s\0A %15llu%15llu\0AMEM %15s%15s\0A %15llu%15llu\0A\00"
@.str.1 = [6 x i8] c"count\00"
@.str.2 = [11 x i8] c"real total\00"
@.str.3 = [14 x i8] c"virtual total\00"
@.str.4 = [12 x i8] c"delay total\00"
define void @print_delayacct(%struct.taskstats* nocapture %0) {
%2 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 7
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 6
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 5
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 4
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 3
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 2
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 1
%15 = load i32, i32* %14
%16 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 0
%17 = load i32, i32* %16
%18 = tail call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %15, i32 %17)
ret void
}