#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 */

/* Variables and functions */
int /*<<< orphan*/ printCPUtime();
int /*<<< orphan*/ printCPUtype();
int /*<<< orphan*/ printDiskRW();
int /*<<< orphan*/ printKernelVersion();
int /*<<< orphan*/ printLoadAverages();
int /*<<< orphan*/ printMemoryAvailable();
int /*<<< orphan*/ printMemoryTotal();
int /*<<< orphan*/ printNumContextSwitches();
int /*<<< orphan*/ printNumProcCreated();
int /*<<< orphan*/ printTimeOfLastBoot();
int /*<<< orphan*/ printUptime();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\n\n##########################################################\n");
  printf("This is the system's current state information:\n\t");
  printCPUtype();
  printKernelVersion();
  printUptime();
  printCPUtime();
  printDiskRW();
  printNumContextSwitches();
  printTimeOfLastBoot();
  printNumProcCreated();
  printMemoryTotal();
  printMemoryAvailable();
  printLoadAverages();
  printf("\n\n##########################################################\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe2a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe5c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <printCPUtype@plt>
mov    $0x0,%al
call   10e0 <printKernelVersion@plt>
mov    $0x0,%al
call   10c0 <printUptime@plt>
mov    $0x0,%al
call   1090 <printCPUtime@plt>
mov    $0x0,%al
call   10a0 <printDiskRW@plt>
mov    $0x0,%al
call   1080 <printNumContextSwitches@plt>
mov    $0x0,%al
call   1050 <printTimeOfLastBoot@plt>
mov    $0x0,%al
call   10d0 <printNumProcCreated@plt>
mov    $0x0,%al
call   1030 <printMemoryTotal@plt>
mov    $0x0,%al
call   1070 <printMemoryAvailable@plt>
mov    $0x0,%al
call   10b0 <printLoadAverages@plt>
lea    0xe35(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe5a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe1c(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <printCPUtype@plt>
xor    %eax,%eax
call   10f0 <printKernelVersion@plt>
xor    %eax,%eax
call   10d0 <printUptime@plt>
xor    %eax,%eax
call   10a0 <printCPUtime@plt>
xor    %eax,%eax
call   10b0 <printDiskRW@plt>
xor    %eax,%eax
call   1090 <printNumContextSwitches@plt>
xor    %eax,%eax
call   1060 <printTimeOfLastBoot@plt>
xor    %eax,%eax
call   10e0 <printNumProcCreated@plt>
xor    %eax,%eax
call   1040 <printMemoryTotal@plt>
xor    %eax,%eax
call   1080 <printMemoryAvailable@plt>
xor    %eax,%eax
call   10c0 <printLoadAverages@plt>
lea    0xe32(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [62 x i8] c"\0A\0A##########################################################\0A\00"
@.str.1 = [50 x i8] c"This is the system's current state information:\0A\09\00"
@.str.2 = [63 x i8] c"\0A\0A##########################################################\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @printCPUtype()
%5 = call i32 (...) @printKernelVersion()
%6 = call i32 (...) @printUptime()
%7 = call i32 (...) @printCPUtime()
%8 = call i32 (...) @printDiskRW()
%9 = call i32 (...) @printNumContextSwitches()
%10 = call i32 (...) @printTimeOfLastBoot()
%11 = call i32 (...) @printNumProcCreated()
%12 = call i32 (...) @printMemoryTotal()
%13 = call i32 (...) @printMemoryAvailable()
%14 = call i32 (...) @printLoadAverages()
%15 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [50 x i8] c"This is the system's current state information:\0A\09\00"
@str = [61 x i8] c"\0A\0A##########################################################\00"
@str.3 = [62 x i8] c"\0A\0A##########################################################\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @printCPUtype()
%4 = tail call i32 (...) @printKernelVersion()
%5 = tail call i32 (...) @printUptime()
%6 = tail call i32 (...) @printCPUtime()
%7 = tail call i32 (...) @printDiskRW()
%8 = tail call i32 (...) @printNumContextSwitches()
%9 = tail call i32 (...) @printTimeOfLastBoot()
%10 = tail call i32 (...) @printNumProcCreated()
%11 = tail call i32 (...) @printMemoryTotal()
%12 = tail call i32 (...) @printMemoryAvailable()
%13 = tail call i32 (...) @printLoadAverages()
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}