// File: ridgelab[P]Kmer-SSR/src/TaskQueue.cpp
// Function: TaskQueue::toString[abi:cxx11]()
string TaskQueue::toString()
{
	queue<Task*>* new_tasks = new queue<Task*>();

	string output = "TaskQueue: { ";

	sem_wait(&(this->lock));

	Task* front_task = this->tasks->front();
	
	while (!this->tasks->empty())
	{
		if (!front_task->equalTo(this->tasks->front()))
		{
			output += ", ";
		}
		
		output += this->tasks->front()->toString();
		
		new_tasks->push(this->tasks->front());
		this->tasks->pop();
	}

	output += " }";

	queue<Task*>* temp_ptr = this->tasks;
	this->tasks = new_tasks;
	delete temp_ptr;

	sem_post(&(this->lock));

	return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x50, %edi
callq 0x2210
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
callq 0x6a80
jmp 0x64e1
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
movb $0x0, -0x25(%rbp)
leaq -0x26(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x2370
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0x39bf(%rip), %rsi      # 0x9ec8
callq 0x4450
jmp 0x6510
leaq -0x26(%rbp), %rdi
callq 0x2260
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x20e0
jmp 0x6528
movq -0x68(%rbp), %rax
movq (%rax), %rdi
callq 0x6b20
movq %rax, -0x88(%rbp)
jmp 0x653d
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rdi
callq 0x6ad0
movb %al, -0x89(%rbp)
jmp 0x655f
movb -0x89(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6570
jmp 0x66b9
movq -0x68(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
movq (%rax), %rdi
callq 0x6b20
movq %rax, -0x98(%rbp)
jmp 0x6590
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rax
movq (%rax), %rsi
callq 0x83d0
movb %al, -0xa1(%rbp)
jmp 0x65ae
movb -0xa1(%rbp), %al
testb $0x1, %al
jne 0x6618
jmp 0x65ba
movq -0x78(%rbp), %rdi
leaq 0x3911(%rip), %rsi      # 0x9ed6
callq 0x21e0
jmp 0x65cc
jmp 0x6618
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x50, %esi
callq 0x2220
jmp 0x6741
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x2260
jmp 0x6741
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x6738
movq -0x68(%rbp), %rax
movq (%rax), %rdi
callq 0x6b20
movq %rax, -0xb0(%rbp)
jmp 0x662d
movq -0xb0(%rbp), %rax
movq (%rax), %rsi
leaq -0x50(%rbp), %rdi
callq 0x84c0
jmp 0x6642
movq -0x78(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x22b0
jmp 0x6651
leaq -0x50(%rbp), %rdi
callq 0x2100
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0xc0(%rbp)
movq (%rax), %rdi
callq 0x6b20
movq %rax, -0xb8(%rbp)
jmp 0x667a
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdi
callq 0x6af0
jmp 0x668f
movq -0x68(%rbp), %rax
movq (%rax), %rdi
callq 0x6b40
jmp 0x669d
jmp 0x654b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2100
jmp 0x6738
movq -0x78(%rbp), %rdi
leaq 0x3815(%rip), %rsi      # 0x9ed9
callq 0x21e0
jmp 0x66cb
movq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x58(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, %rax
je 0x670b
movq -0xc8(%rbp), %rdi
callq 0x6a60
movq -0xc8(%rbp), %rdi
movl $0x50, %esi
callq 0x2220
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x2340
movb $0x1, -0x25(%rbp)
testb $0x1, -0x25(%rbp)
jne 0x672b
movq -0x78(%rbp), %rdi
callq 0x2100
movq -0x70(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x2100
movq -0x20(%rbp), %rdi
callq 0x2360
nopw (%rax,%rax)