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

	string json = "TaskQueue: {";
	
	sem_wait(&(this->lock));
	
	Task* front_task = this->tasks->front();

	if (this->size() != 0)
	{
		json += "\n\t";
		
		while (!this->tasks->empty())
		{
			if (!front_task->equalTo(this->tasks->front()))
			{
				json += ",\n\t";
			}
			
			json += this->tasks->front()->toString();;

			new_tasks->push(this->tasks->front());
			this->tasks->pop();
		}

		json += '\n';
	}
	else
	{
		json += ' ';
	}

	json += '}';

	queue<Task*>* temp_ptr = this->tasks;
	this->tasks = new_tasks;
	delete temp_ptr;
	
	sem_post(&(this->lock));

	return json;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x50, %edi
callq 0x2170
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x3ed0
leaq 0x10(%rbx), %r12
movq %r12, (%rbx)
leaq 0x224d(%rip), %rsi      # 0x5ed0
leaq 0x2252(%rip), %rdx      # 0x5edc
movq %rbx, %rdi
callq 0x35f8
leaq 0x8(%r15), %rbp
movq %rbp, %rdi
callq 0x20b0
movq (%r15), %rcx
movq 0x10(%rcx), %rax
movq 0x20(%rcx), %rdx
movq 0x48(%rcx), %rsi
movl 0x28(%rcx), %edi
movl %esi, %r8d
subl %edi, %r8d
shrl $0x3, %r8d
cmpq $0x1, %rsi
adcl $-0x1, %r8d
shll $0x6, %r8d
movq 0x30(%rcx), %rsi
subq 0x38(%rcx), %rsi
shrq $0x3, %rsi
addl %r8d, %esi
subq %rax, %rdx
shrq $0x3, %rdx
addl %esi, %edx
je 0x3dca
movq (%rax), %r13
leaq 0x21f0(%rip), %rsi      # 0x5ede
movq %rbx, %rdi
callq 0x2270
movq (%r15), %rcx
movq 0x10(%rcx), %rax
movb $0xa, %dl
cmpq %rax, 0x30(%rcx)
je 0x3dcc
movq %rbp, 0x10(%rsp)
movq %r12, 0x8(%rsp)
leaq 0x28(%rsp), %r12
leaq 0x18(%rsp), %rbp
movq (%rax), %rsi
movq %r13, %rdi
callq 0x4640
testb %al, %al
jne 0x3d3b
movq %rbx, %rdi
leaq 0x21a7(%rip), %rsi      # 0x5edd
callq 0x2270
movq (%r15), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
movq %rbp, %rdi
callq 0x4746
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2050
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x3d76
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%r15), %rax
movq 0x10(%rax), %rsi
movq 0x30(%r14), %rax
movq 0x40(%r14), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3d9b
movq (%rsi), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%r14)
jmp 0x3da3
movq %r14, %rdi
callq 0x4046
movq (%r15), %rdi
callq 0x425a
movq (%r15), %rcx
movq 0x10(%rcx), %rax
cmpq %rax, 0x30(%rcx)
jne 0x3d1d
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %rbp
movb $0xa, %dl
jmp 0x3dcc
movb $0x20, %dl
movzbl %dl, %esi
movq %rbx, %rdi
callq 0x2130
movq %rbx, %rdi
movl $0x7d, %esi
callq 0x2130
movq (%r15), %r12
movq %r14, (%r15)
testq %r12, %r12
je 0x3df7
movq %r12, %rdi
callq 0x3e78
movl $0x50, %esi
movq %r12, %rdi
callq 0x2180
movq %rbp, %rdi
callq 0x2230
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e2d
movq %rax, %r15
movl $0x50, %esi
movq %r14, %rdi
jmp 0x3e6a
movq %r12, 0x8(%rsp)
jmp 0x3e52
jmp 0x3e52
movq %rax, %r15
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x3e55
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x3e55
movq %rax, %r15
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x3e6f
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2180
movq %r15, %rdi
callq 0x2250
nop