// File: marcellapantarotto[P]pseudoSO/scheduler.cpp
// Function: Scheduler::displayProcessQueue()
void Scheduler::displayProcessQueue()
{
	Process x;

	cout << "\n All processes in real time:  " << endl;
	for(int i=0; i<(int)realTIME.size(); i++) {
		x = realTIME.front();
		cout << x << endl;
		realTIME.pop();		// remove o próximo elemento
		realTIME.push(x);	// insere um processo no final da fila
	}

	cout << "\n All user processes with priority 1:  "<< endl;
	for(int i=0; i<(int)userP1.size(); i++) {
		x = userP1.front();
		cout << x << endl;
		userP1.pop();
		userP1.push(x);
	}

	cout << "\n All user processes with priority 2:  "<< endl;
	for(int i=0; i<(int)userP2.size(); i++) {
		x = userP2.front();
		cout << x << endl;
		userP2.pop();
		userP2.push(x);
	}

	cout << "\n All user processes with priority 3:  "<< endl;
	for(int i=0; i<(int)userP3.size(); i++) {
		x = userP3.front();
		cout << x << endl;
		userP3.pop();
		userP3.push(x);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5700
movq 0xa62c(%rip), %rdi      # 0xefd0
leaq 0x5769(%rip), %rsi      # 0xa114
callq 0x2170
movq %rax, %rdi
movq 0xa606(%rip), %rsi      # 0xefc0
callq 0x2190
movl $0x0, -0x2c(%rbp)
movq -0x40(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, -0x44(%rbp)
addq $0x110, %rdi            # imm = 0x110
callq 0x59b0
movq %rax, %rcx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jge 0x4a6a
movq -0x40(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x5930
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq 0xa5b0(%rip), %rdi      # 0xefd0
leaq -0x28(%rbp), %rsi
callq 0x3500
movq %rax, %rdi
movq 0xa58d(%rip), %rsi      # 0xefc0
callq 0x2190
movq -0x40(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x5950
movq -0x40(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
leaq -0x28(%rbp), %rsi
callq 0x56d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x49c6
movq 0xa55f(%rip), %rdi      # 0xefd0
leaq 0x56bc(%rip), %rsi      # 0xa134
callq 0x2170
movq %rax, %rdi
movq 0xa539(%rip), %rsi      # 0xefc0
callq 0x2190
movl $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, -0x48(%rbp)
addq $0x20, %rdi
callq 0x59b0
movq %rax, %rcx
movl -0x48(%rbp), %eax
cmpl %ecx, %eax
jge 0x4b27
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x5930
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq 0xa4ed(%rip), %rdi      # 0xefd0
leaq -0x28(%rbp), %rsi
callq 0x3500
movq %rax, %rdi
movq 0xa4ca(%rip), %rsi      # 0xefc0
callq 0x2190
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x5950
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
leaq -0x28(%rbp), %rsi
callq 0x56d0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4a93
movq 0xa4a2(%rip), %rdi      # 0xefd0
leaq 0x5627(%rip), %rsi      # 0xa15c
callq 0x2170
movq %rax, %rdi
movq 0xa47c(%rip), %rsi      # 0xefc0
callq 0x2190
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, -0x4c(%rbp)
addq $0x70, %rdi
callq 0x59b0
movq %rax, %rcx
movl -0x4c(%rbp), %eax
cmpl %ecx, %eax
jge 0x4be4
movq -0x40(%rbp), %rdi
addq $0x70, %rdi
callq 0x5930
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq 0xa430(%rip), %rdi      # 0xefd0
leaq -0x28(%rbp), %rsi
callq 0x3500
movq %rax, %rdi
movq 0xa40d(%rip), %rsi      # 0xefc0
callq 0x2190
movq -0x40(%rbp), %rdi
addq $0x70, %rdi
callq 0x5950
movq -0x40(%rbp), %rdi
addq $0x70, %rdi
leaq -0x28(%rbp), %rsi
callq 0x56d0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4b50
movq 0xa3e5(%rip), %rdi      # 0xefd0
leaq 0x5592(%rip), %rsi      # 0xa184
callq 0x2170
movq %rax, %rdi
movq 0xa3bf(%rip), %rsi      # 0xefc0
callq 0x2190
movl $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, -0x50(%rbp)
addq $0xc0, %rdi
callq 0x59b0
movq %rax, %rcx
movl -0x50(%rbp), %eax
cmpl %ecx, %eax
jge 0x4cb1
movq -0x40(%rbp), %rdi
addq $0xc0, %rdi
callq 0x5930
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq 0xa369(%rip), %rdi      # 0xefd0
leaq -0x28(%rbp), %rsi
callq 0x3500
movq %rax, %rdi
movq 0xa346(%rip), %rsi      # 0xefc0
callq 0x2190
movq -0x40(%rbp), %rdi
addq $0xc0, %rdi
callq 0x5950
movq -0x40(%rbp), %rdi
addq $0xc0, %rdi
leaq -0x28(%rbp), %rsi
callq 0x56d0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x4c0d
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)