#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*/ printf(char *, long, long, long, long, long, long, long,
                          long);
long syscall(int, int);
int main() {
  long int cpu0 = syscall(316, 0);
  long int cpu1 = syscall(316, 1);
  long int cpu2 = syscall(316, 2);
  long int cpu3 = syscall(316, 3);
  long int cpu4 = syscall(316, 4);
  long int cpu5 = syscall(316, 5);
  long int cpu6 = syscall(316, 6);
  long int cpu7 = syscall(316, 7);
  printf(
      "cpu 0: nr running :  %ld\ncpu 1: nr running :  %ld\ncpu 2: nr running : "
      " %ld\ncpu 3: nr running :  %ld\ncpu 4: nr running :  %ld\ncpu 5: nr "
      "running :  %ld\ncpu 6: nr running :  %ld\ncpu 7: nr running :  %ld\n",
      cpu0, cpu1, cpu2, cpu3, cpu4, cpu5, cpu6, cpu7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x13c,%edi
xor    %esi,%esi
call   1040 <syscall@plt>
mov    %rax,-0x10(%rbp)
mov    $0x13c,%edi
mov    $0x1,%esi
call   1040 <syscall@plt>
mov    %rax,-0x18(%rbp)
mov    $0x13c,%edi
mov    $0x2,%esi
call   1040 <syscall@plt>
mov    %rax,-0x20(%rbp)
mov    $0x13c,%edi
mov    $0x3,%esi
call   1040 <syscall@plt>
mov    %rax,-0x28(%rbp)
mov    $0x13c,%edi
mov    $0x4,%esi
call   1040 <syscall@plt>
mov    %rax,-0x30(%rbp)
mov    $0x13c,%edi
mov    $0x5,%esi
call   1040 <syscall@plt>
mov    %rax,-0x38(%rbp)
mov    $0x13c,%edi
mov    $0x6,%esi
call   1040 <syscall@plt>
mov    %rax,-0x40(%rbp)
mov    $0x13c,%edi
mov    $0x7,%esi
call   1040 <syscall@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    -0x38(%rbp),%r11
mov    -0x40(%rbp),%r10
mov    -0x48(%rbp),%rax
lea    0xe15(%rip),%rdi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x13c,%edi
xor    %esi,%esi
call   1040 <syscall@plt>
mov    %rax,(%rsp)
mov    $0x13c,%edi
mov    $0x1,%esi
call   1040 <syscall@plt>
mov    %rax,%r15
mov    $0x13c,%edi
mov    $0x2,%esi
call   1040 <syscall@plt>
mov    %rax,%r12
mov    $0x13c,%edi
mov    $0x3,%esi
call   1040 <syscall@plt>
mov    %rax,%r13
mov    $0x13c,%edi
mov    $0x4,%esi
call   1040 <syscall@plt>
mov    %rax,%rbx
mov    $0x13c,%edi
mov    $0x5,%esi
call   1040 <syscall@plt>
mov    %rax,%rbp
mov    $0x13c,%edi
mov    $0x6,%esi
call   1040 <syscall@plt>
mov    %rax,%r14
mov    $0x13c,%edi
mov    $0x7,%esi
call   1040 <syscall@plt>
sub    $0x8,%rsp
lea    0xe3f(%rip),%rdi
mov    0x8(%rsp),%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbx,%r9
push   %rax
push   %r14
push   %rbp
call   1030 <printf@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [201 x i8] c"cpu 0: nr running : %ld\0Acpu 1: nr running : %ld\0Acpu 2: nr running : %ld\0Acpu 3: nr running : %ld\0Acpu 4: nr running : %ld\0Acpu 5: nr running : %ld\0Acpu 6: nr running : %ld\0Acpu 7: nr running : %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i32 0, i32* %1
%10 = call i64 @syscall(i32 316, i32 0)
store i64 %10, i64* %2
%11 = call i64 @syscall(i32 316, i32 1)
store i64 %11, i64* %3
%12 = call i64 @syscall(i32 316, i32 2)
store i64 %12, i64* %4
%13 = call i64 @syscall(i32 316, i32 3)
store i64 %13, i64* %5
%14 = call i64 @syscall(i32 316, i32 4)
store i64 %14, i64* %6
%15 = call i64 @syscall(i32 316, i32 5)
store i64 %15, i64* %7
%16 = call i64 @syscall(i32 316, i32 6)
store i64 %16, i64* %8
%17 = call i64 @syscall(i32 316, i32 7)
store i64 %17, i64* %9
%18 = load i64, i64* %2
%19 = load i64, i64* %3
%20 = load i64, i64* %4
%21 = load i64, i64* %5
%22 = load i64, i64* %6
%23 = load i64, i64* %7
%24 = load i64, i64* %8
%25 = load i64, i64* %9
%26 = call i32 @printf(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i64 %18, i64 %19, i64 %20, i64 %21, i64 %22, i64 %23, i64 %24, i64 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [201 x i8] c"cpu 0: nr running : %ld\0Acpu 1: nr running : %ld\0Acpu 2: nr running : %ld\0Acpu 3: nr running : %ld\0Acpu 4: nr running : %ld\0Acpu 5: nr running : %ld\0Acpu 6: nr running : %ld\0Acpu 7: nr running : %ld\0A\00"
define i32 @main() {
%1 = tail call i64 @syscall(i32 316, i32 0)
%2 = tail call i64 @syscall(i32 316, i32 1)
%3 = tail call i64 @syscall(i32 316, i32 2)
%4 = tail call i64 @syscall(i32 316, i32 3)
%5 = tail call i64 @syscall(i32 316, i32 4)
%6 = tail call i64 @syscall(i32 316, i32 5)
%7 = tail call i64 @syscall(i32 316, i32 6)
%8 = tail call i64 @syscall(i32 316, i32 7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8)
ret i32 0
}