#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 timeval {
  int dummy;
};

/* Variables and functions */
int getTimeElapsed(struct timeval *);
int /*<<< orphan*/ printf(char *, int, ...);
void printResults(struct timeval *begTime) {
  printf("The end.\n\tThreads: %d, tasks: %d\n", 4, 500000 * 4);
  printf("Tasks breakdown (%%):\n\tinsert: %d, find: %d, remove: %d\n", 10, 10,
         80);
  printf("Skip list: %d levels.\n", 16);
  printf("Time elapsed:\n\t%lfs\n", getTimeElapsed(begTime));
}


x86 assembly (clang, -O0):
<printResults>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x4,%esi
mov    $0x1e8480,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0xa,%edx
mov    $0x50,%ecx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x10,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <getTimeElapsed@plt>
mov    %eax,%esi
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printResults>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x4,%esi
mov    $0x1e8480,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0xa,%esi
mov    $0xa,%edx
mov    $0x50,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <getTimeElapsed@plt>
lea    0xef7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@.str = [34 x i8] c"The end.\0A\09Threads: %d, tasks: %d\0A\00"
@.str.1 = [57 x i8] c"Tasks breakdown (%%):\0A\09insert: %d, find: %d, remove: %d\0A\00"
@.str.2 = [23 x i8] c"Skip list: %d levels.\0A\00"
@.str.3 = [21 x i8] c"Time elapsed:\0A\09%lfs\0A\00"
define void @printResults(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 4, i32 2000000)
%4 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 10, i32 80)
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 16)
%6 = load %struct.timeval*, %struct.timeval** %2
%7 = call i32 @getTimeElapsed(%struct.timeval* %6)
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@.str = [34 x i8] c"The end.\0A\09Threads: %d, tasks: %d\0A\00"
@.str.1 = [57 x i8] c"Tasks breakdown (%%):\0A\09insert: %d, find: %d, remove: %d\0A\00"
@.str.2 = [23 x i8] c"Skip list: %d levels.\0A\00"
@.str.3 = [21 x i8] c"Time elapsed:\0A\09%lfs\0A\00"
define void @printResults(%struct.timeval* %0) {
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 4, i32 2000000)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 10, i32 80)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 16)
%5 = tail call i32 @getTimeElapsed(%struct.timeval* %0)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %5)
ret void
}