// File: /workspace/github_cpp_makefile_star2_O3/enbock[P]Warp10Server/ulib/src/Thread.cpp
// Function: u::ThreadSystem::destroy(u::Thread*)
void ThreadSystem::destroy(Thread *thread)
{
	int64 i,l;
	_access.lock();
	l = _run.size();
	for(i=0; i<l; i++)
	{
		if(_run.at(i) == thread)
		{
			_run.erase(i);
#ifndef NDEBUG
			finish++;
			if(ThreadSystem::isTerminating)
				trace("Run queue="+Object::int2string(_build.size())
				+ "\trun="+Object::int2string(_run.size())
				+ "(peak:"+Object::int2string(peakRun)+")"
				+ "\tfinished="+Object::int2string(finish)
				);
#endif
			_access.unlock();
			delete thread;
			return;
		}
	}
	_access.unlock();
#ifndef NDEBUG
	error("A deleting thread was not found in the run queue.");
	assert(false==true);
#endif
	//delete thread;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %rbx
leaq 0x204629(%rip), %rdi    # 0x60f6b0
callq 0x40992e
movq 0x2046e5(%rip), %rax    # 0x60f778
movq 0x2046d6(%rip), %rsi    # 0x60f770
movq %rax, %rdx
subq %rsi, %rdx
movq %rdx, %rcx
sarq $0x3, %rcx
testq %rcx, %rcx
jle 0x40b0c7
addq $0x8, %rsi
addq $-0x8, %rdx
cmpq %rbx, -0x8(%rsi)
je 0x40b12b
addq $0x8, %rsi
addq $-0x8, %rdx
decq %rcx
jne 0x40b0b4
leaq 0x2045e2(%rip), %rdi    # 0x60f6b0
callq 0x4098e6
movq $0x610580, %rdi         # imm = 0x610580
leaq 0x18e078(%rip), %rsi    # 0x599159
callq 0x477ed0
leaq 0x18e426(%rip), %rsi    # 0x599513
movq %rax, %rdi
callq 0x477ed0
leaq 0x18df89(%rip), %rsi    # 0x599085
movq %rax, %rdi
callq 0x477ed0
movq %rax, %rdi
callq 0x4777b0
leaq 0x18e432(%rip), %rdi    # 0x599545
leaq 0x18e437(%rip), %rsi    # 0x599551
leaq 0x18e43f(%rip), %rcx    # 0x599560
movl $0x64, %edx
callq 0x4ccc10
cmpq %rax, %rsi
je 0x40b140
leaq -0x8(%rsi), %rdi
callq 0x401020
movq 0x204638(%rip), %rax    # 0x60f778
incq 0x204641(%rip)          # 0x60f788
addq $-0x8, %rax
movq %rax, 0x204626(%rip)    # 0x60f778
cmpb $0x1, 0x204550(%rip)    # 0x60f6a9
jne 0x40b7e4
movq $0x6106a0, %rdi         # imm = 0x6106A0
leaq 0x18df0c(%rip), %rsi    # 0x599079
movl $0x4, %edx
callq 0x4779a0
movq 0x2045aa(%rip), %rsi    # 0x60f728
subq 0x20459b(%rip), %rsi    # 0x60f720
shrq $0x3, %rsi
leaq 0x210(%rsp), %rdi
callq 0x409c1c
leaq 0x248(%rsp), %rdi
leaq 0x18e44d(%rip), %rcx    # 0x5995f2
movl $0xa, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x488dc0
leaq 0xd8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x40b1e4
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0x40b1ea
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xc8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18e2eb(%rip), %rsi    # 0x5994fb
callq 0x489580
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x40b23c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x40b243
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x204516(%rip), %rsi    # 0x60f778
subq 0x204507(%rip), %rsi    # 0x60f770
shrq $0x3, %rsi
leaq 0x1b8(%rsp), %rdi
callq 0x409c1c
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x1f8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0x40b29f
movq 0x18(%rsp), %rdi
leaq 0x200(%rsp), %r14
movq -0x10(%r14), %rsi
cmpq %rdi, %rax
jbe 0x40b2c7
movl $0xf, %edi
cmpq %r14, %rsi
je 0x40b2c2
movq 0x200(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x40b2d3
leaq 0x8(%rsp), %rdi
callq 0x489440
jmp 0x40b2e4
leaq 0x1f0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x488dc0
leaq 0x78(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x40b308
movq %rsi, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x40b30e
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x18e1cf(%rip), %rsi    # 0x599501
leaq 0x68(%rsp), %rdi
callq 0x489580
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x40b363
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x40b36a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x204408(%rip), %esi    # 0x60f790
leaq 0x160(%rsp), %rdi
callq 0x409c1c
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x1a0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x40b3ba
movq 0x38(%rsp), %rdi
leaq 0x1a8(%rsp), %r12
movq -0x10(%r12), %rsi
cmpq %rdi, %rax
jbe 0x40b3e3
movl $0xf, %edi
cmpq %r12, %rsi
je 0x40b3de
movq 0x1a8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x40b3ef
leaq 0x28(%rsp), %rdi
callq 0x489440
jmp 0x40b400
leaq 0x198(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x488dc0
leaq 0x98(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x40b42d
movq %rsi, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x40b433
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x18dfae(%rip), %rsi    # 0x599408
leaq 0x88(%rsp), %rdi
callq 0x489580
leaq 0xf8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x40b497
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0x40b49d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xe8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18e045(%rip), %rsi    # 0x599508
callq 0x489580
leaq 0xb8(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x40b4f8
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x40b500
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x204267(%rip), %esi    # 0x60f788
leaq 0x108(%rsp), %rdi
callq 0x409c1c
movq 0xa8(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0x148(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x40b55c
movq 0xb8(%rsp), %rdi
leaq 0x150(%rsp), %rbp
movq -0x10(%rbp), %rsi
cmpq %rdi, %rax
jbe 0x40b584
movl $0xf, %edi
cmpq %rbp, %rsi
je 0x40b57f
movq 0x150(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x40b593
leaq 0xa8(%rsp), %rdi
callq 0x489440
jmp 0x40b5a4
leaq 0x140(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x488dc0
leaq 0x58(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x40b5c8
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x40b5ce
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %r14, %r15
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq $0x6106a0, %rdi         # imm = 0x6106A0
callq 0x4779a0
movq %rax, %r14
leaq 0x18da77(%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 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b65d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0x140(%rsp), %rdi
cmpq %rbp, %rdi
je 0x40b67a
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x108(%rsp), %rdi
callq 0x409a3a
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x40b6a4
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x40b6c9
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b6ea
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0x198(%rsp), %rdi
cmpq %r12, %rdi
je 0x40b707
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x160(%rsp), %rdi
callq 0x409a3a
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
leaq 0x18(%rsp), %r14
je 0x40b735
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b750
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0x1f0(%rsp), %rdi
cmpq %r15, %rdi
je 0x40b76d
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x1b8(%rsp), %rdi
callq 0x409a3a
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x40b791
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x40b7b6
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x258(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b7d7
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x210(%rsp), %rdi
callq 0x409a3a
leaq 0x203ec5(%rip), %rdi    # 0x60f6b0
callq 0x4098e6
testq %rbx, %rbx
je 0x40b806
leaq 0x60(%rbx), %rdi
callq 0x4ea850
movq %rbx, %rdi
callq 0x409a3a
movl $0x98, %esi
movq %rbx, %rdi
callq 0x40dd80
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x40b895
movq %rax, %rbx
jmp 0x40b8a2
movq %rax, %rbx
jmp 0x40b8bf
movq %rax, %rbx
jmp 0x40b8e4
movq %rax, %rbx
jmp 0x40b905
movq %rax, %rbx
jmp 0x40b912
movq %rax, %rbx
jmp 0x40b92e
movq %rax, %rbx
jmp 0x40b949
movq %rax, %rbx
jmp 0x40b956
movq %rax, %rbx
jmp 0x40b972
movq %rax, %rbx
jmp 0x40b997
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b895
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x108(%rsp), %rdi
callq 0x404a8c
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x40b8bf
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x40b8e4
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b905
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x160(%rsp), %rdi
callq 0x404a8c
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x40b92e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b949
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x1b8(%rsp), %rdi
callq 0x404a8c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x40b972
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40dd80
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x40b997
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x40dd80
leaq 0x210(%rsp), %rdi
callq 0x404a8c
movq %rbx, %rdi
callq 0x4b7fb0