// File: /workspace/github_cpp_makefile_star2_O3/enbock[P]Warp10Server/ulib/src/Thread.cpp
// Function: u::ThreadSystem::create(u::Callback*)
bool ThreadSystem::create(Callback *cb)
{
	_access.lock();
	if(isTerminating) {
		_access.unlock();
		return false;
	}

	Thread *t = new Thread(cb);

	_build.push_back(t);
	_access.unlock();

#ifndef NDEBUG
	trace(
		"\033[0mThreadSystem::create: " + Object::ptr2string(cb)
		 + " -> " +  Object::ptr2string(&(t->_call))
		 //+ "\n\033[37m" + ThreadSystem::toString()
	);
#endif

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdi, %r14
leaq 0x203cea(%rip), %rdi    # 0x60f6b0
callq 0x40992e
movb 0x203cd8(%rip), %bl     # 0x60f6a9
cmpb $0x1, %bl
jne 0x40b9e7
leaq 0x203cd3(%rip), %rdi    # 0x60f6b0
callq 0x4098e6
jmp 0x40bcd4
movl $0x98, %edi
callq 0x40ef10
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x40afc4
movq %r15, 0x48(%rsp)
movq 0x203d1d(%rip), %rsi    # 0x60f728
cmpq 0x203d1e(%rip), %rsi    # 0x60f730
je 0x40ba21
movq %r15, (%rsi)
addq $0x8, 0x203d09(%rip)    # 0x60f728
jmp 0x40ba32
leaq 0x203cf8(%rip), %rdi    # 0x60f720
leaq 0x48(%rsp), %rdx
callq 0x40d9bc
leaq 0x203c77(%rip), %rdi    # 0x60f6b0
callq 0x4098e6
movq $0x6106a0, %rdi         # imm = 0x6106A0
leaq 0x18d62d(%rip), %rsi    # 0x599079
movl $0x4, %edx
callq 0x4779a0
leaq 0xc8(%rsp), %rdi
movq %r14, %rsi
callq 0x409cf0
leaq 0x100(%rsp), %rdi
leaq 0x18da6b(%rip), %rcx    # 0x5994e0
movl $0x1a, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x488dc0
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x40baab
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x40bab2
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18d717(%rip), %rsi    # 0x5991ec
callq 0x489580
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x40bb02
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x40bb0a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x48(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x409cf0
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0xb0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x40bb56
movq 0x38(%rsp), %rdi
leaq 0xb8(%rsp), %r13
movq -0x10(%r13), %rsi
cmpq %rdi, %rax
jbe 0x40bb7e
movl $0xf, %edi
cmpq %r13, %rsi
je 0x40bb79
movq 0xb8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x40bb8a
leaq 0x28(%rsp), %rdi
callq 0x489440
jmp 0x40bb9b
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x488dc0
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x40bbbf
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x40bbc5
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq $0x6106a0, %rdi         # imm = 0x6106A0
callq 0x4779a0
movq %rax, %r14
leaq 0x18d483(%rip), %rsi    # 0x599085
movl $0x4, %edx
movq %rax, %rdi
callq 0x4779a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x458af0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4774a0
movq %rax, %rdi
callq 0x476a70
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40bc51
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x40bc6e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x70(%rsp), %rdi
callq 0x409a3a
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x40bc8f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x40bca6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40bcc7
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0xc8(%rsp), %rdi
callq 0x409a3a
xorb $0x1, %bl
movl %ebx, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x40bd2e
movq %rax, %rbx
jmp 0x40bd38
movq %rax, %rbx
jmp 0x40bd4f
movq %rax, %rbx
jmp 0x40bd66
movq %rax, %rbx
movl $0x98, %esi
movq %r15, %rdi
callq 0x40dd80
jmp 0x40bd73
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40bd2e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x70(%rsp), %rdi
callq 0x404a8c
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x40bd4f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x40bd66
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0xc8(%rsp), %rdi
callq 0x404a8c
movq %rbx, %rdi
callq 0x4b7fb0
nop