#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 *, float, float, int, float, int, int);
void displayResults(float awt, float atat, int sim, float aut, int cs,
                    int pids) {
  printf("--------Three-Level-Feedback-Queue---------\n"
         "Average waiting time\t\t:%.2f units\n"
         "Average turnaround time\t\t:%.2f units\n"
         "Time CPU finished all processes\t:%d\n"
         "Average CPU utilization\t\t:%.1f%%\n"
         "Number of context Switces\t:%d\n"
         "PID of last process to finish\t:%d\n"
         "----------------------------------------------\n",
         awt, atat, sim, aut, cs, pids);
}


x86 assembly (clang, -O0):
<displayResults>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mov    -0xc(%rbp),%esi
movss  -0x10(%rbp),%xmm2
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayResults>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [296 x i8] c"--------Three-Level-Feedback-Queue---------\0AAverage waiting time\09\09:%.2f units\0AAverage turnaround time\09\09:%.2f units\0ATime CPU finished all processes\09:%d\0AAverage CPU utilization\09\09:%.1f%%\0ANumber of context Switces\09:%d\0APID of last process to finish\09:%d\0A----------------------------------------------\0A\00"
define void @displayResults(float %0, float %1, i32 %2, float %3, i32 %4, i32 %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca i32
%10 = alloca float
%11 = alloca i32
%12 = alloca i32
store float %0, float* %7
store float %1, float* %8
store i32 %2, i32* %9
store float %3, float* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load float, float* %7
%14 = load float, float* %8
%15 = load i32, i32* %9
%16 = load float, float* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @printf(i8* getelementptr inbounds ([296 x i8], [296 x i8]* @.str, i64 0, i64 0), float %13, float %14, i32 %15, float %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
@.str = [296 x i8] c"--------Three-Level-Feedback-Queue---------\0AAverage waiting time\09\09:%.2f units\0AAverage turnaround time\09\09:%.2f units\0ATime CPU finished all processes\09:%d\0AAverage CPU utilization\09\09:%.1f%%\0ANumber of context Switces\09:%d\0APID of last process to finish\09:%d\0A----------------------------------------------\0A\00"
define void @displayResults(float %0, float %1, i32 %2, float %3, i32 %4, i32 %5) {
%7 = tail call i32 @printf(i8* getelementptr inbounds ([296 x i8], [296 x i8]* @.str, i64 0, i64 0), float %0, float %1, i32 %2, float %3, i32 %4, i32 %5)
ret void
}