// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f34
leaq 0x10(%rbx), %r12
movq %r12, (%rbx)
leaq 0x21e1(%rip), %rsi      # 0x5ed0
leaq 0x21e6(%rip), %rdx      # 0x5edc
movq %rbx, %rdi
callq 0x3664
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 0x3e36
movq (%rax), %r13
leaq 0x2184(%rip), %rsi      # 0x5ede
movq %rbx, %rdi
callq 0x2270
movq (%r15), %rcx
movq 0x10(%rcx), %rax
movb $0xa, %dl
cmpq %rax, 0x30(%rcx)
je 0x3e38
movq %rbp, 0x10(%rsp)
movq %r12, 0x8(%rsp)
leaq 0x28(%rsp), %r12
leaq 0x18(%rsp), %rbp
movq (%rax), %rsi
movq %r13, %rdi
callq 0x46ca
testb %al, %al
jne 0x3da7
movq %rbx, %rdi
leaq 0x213b(%rip), %rsi      # 0x5edd
callq 0x2270
movq (%r15), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
movq %rbp, %rdi
callq 0x47c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2050
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x3de2
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 0x3e07
movq (%rsi), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%r14)
jmp 0x3e0f
movq %r14, %rdi
callq 0x40aa
movq (%r15), %rdi
callq 0x42be
movq (%r15), %rcx
movq 0x10(%rcx), %rax
cmpq %rax, 0x30(%rcx)
jne 0x3d89
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %rbp
movb $0xa, %dl
jmp 0x3e38
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 0x3e70
movq %r12, %rdi
callq 0x3ee4
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 0x3e99
movq %rax, %r15
movl $0x50, %esi
movq %r14, %rdi
jmp 0x3ed6
movq %r12, 0x8(%rsp)
jmp 0x3ebe
jmp 0x3ebe
movq %rax, %r15
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ec1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x3ec1
movq %rax, %r15
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x3edb
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2180
movq %r15, %rdi
callq 0x2250
nop