#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 *, int, ...);
int /*<<< orphan*/ puts(char *);
void print(int timer[], int timerp[]) {
  int i;
  printf("timerp: %i\n", timerp[1]);
  for (i = 0; i < 1; i++) {
    printf("Tempo total CPU %d: %d\n", i, timer[i]);
    printf("Tempo total ocioso CPU %d: %d\n", i, timerp[i]);
    puts("");
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jge    11a8 <print+0x88>
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <print+0x2c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x4(%rsi),%esi
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%edx
lea    0xec7(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%edx
lea    0xecd(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"timerp: %i\0A\00"
@.str.1 = [24 x i8] c"Tempo total CPU %d: %d\0A\00"
@.str.2 = [31 x i8] c"Tempo total ocioso CPU %d: %d\0A\00"
@.str.3 = [1 x i8] zeroinitializer
define void @print(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 0, i32* %5
br label %10
10: ; preds = %29, %2
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 1
br i1 %12, label %13, label %32
13: ; preds = %10
%14 = load i32, i32* %5
%15 = load i32*, i32** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %19)
%21 = load i32, i32* %5
%22 = load i32*, i32** %4
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %22, i64 %24
%26 = load i32, i32* %25
%27 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %21, i32 %26)
%28 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %29
29: ; preds = %13
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %10
32: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"timerp: %i\0A\00"
@.str.1 = [24 x i8] c"Tempo total CPU %d: %d\0A\00"
@.str.2 = [31 x i8] c"Tempo total ocioso CPU %d: %d\0A\00"
define void @print(i32* nocapture %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 1
%4 = load i32, i32* %3
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %0
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %6)
%8 = load i32, i32* %1
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 %8)
%10 = tail call i32 @putchar(i32 10)
ret void
}