// File: /workspace/github_cpp_makefile_star2_O1/enbock[P]Warp10Server/ulib/src/Socket.cpp
// Function: u::Socket::listen()
bool u::Socket::listen()
{
	if(isConnected()) return false;

	lock();
	_con = ::bind(_descriptor, (const struct sockaddr*)_addr, _addrLen);
	unlock();

	if(!isConnected())
	{
		error(className()+"::listen: Socket bind error. ["+int2string(_descriptor)+"]");
		return false; // bind error
	}

	lock();
	_con = ::listen(_descriptor, maxWaitingClients);
	unlock();
	if(!isConnected())
	{
		error(className()+"::listen: Socket listen error. ["+int2string(_descriptor)+"]");
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %rbx
callq 0x410246
movl 0x54(%rbx), %ebp
movq %rbx, %rdi
callq 0x4101fe
cmpl $-0x1, %ebp
jne 0x412bcd
movq %rbx, %rdi
callq 0x410246
movl 0x34(%rbx), %edi
movq 0x48(%rbx), %rsi
movl 0x50(%rbx), %edx
callq 0x560790
movl %eax, 0x54(%rbx)
movq %rbx, %rdi
callq 0x4101fe
movq %rbx, %rdi
callq 0x410246
movl 0x54(%rbx), %ebp
movq %rbx, %rdi
callq 0x4101fe
cmpl $-0x1, %ebp
je 0x41293d
movq %rbx, %rdi
callq 0x410246
movl 0x34(%rbx), %edi
movl 0xbc(%rbx), %esi
callq 0x560890
movl %eax, 0x54(%rbx)
movq %rbx, %rdi
callq 0x4101fe
movq %rbx, %rdi
callq 0x410246
movl 0x54(%rbx), %ebp
movq %rbx, %rdi
callq 0x4101fe
movb $0x1, %al
cmpl $-0x1, %ebp
jne 0x412bcf
movq $0x653b20, %rdi         # imm = 0x653B20
leaq 0x1bb873(%rip), %rsi    # 0x5ce153
movl $0x7, %edx
callq 0x490a00
movq (%rbx), %rax
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0xf0(%rsp), %rdi
leaq 0x1bc44b(%rip), %rsi    # 0x5ced55
callq 0x4a25e0
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x412bdf
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x412be6
movq $0x653b20, %rdi         # imm = 0x653B20
leaq 0x1bb808(%rip), %rsi    # 0x5ce153
movl $0x7, %edx
callq 0x490a00
movq (%rbx), %rax
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0xf0(%rsp), %rdi
leaq 0x1bc3c1(%rip), %rsi    # 0x5ced36
callq 0x4a25e0
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4129a1
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x4129a8
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x34(%rbx), %esi
leaq 0x60(%rsp), %rdi
callq 0x410522
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0xa0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x4129f2
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x412a17
leaq 0xa8(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x412a12
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x412a2b
movq 0x98(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x4a24a0
jmp 0x412a3c
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4a1e20
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x412a5f
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x412a65
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1e037d(%rip), %rsi    # 0x5f2e06
movq %rsp, %rdi
callq 0x4a25e0
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x412ab8
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x412abf
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq $0x653b20, %rdi         # imm = 0x653B20
callq 0x490a00
movq %rax, %rbx
leaq 0x1bb5b4(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490a00
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x471b50
movsbl %al, %esi
movq %rbx, %rdi
callq 0x490500
movq %rax, %rdi
callq 0x48fad0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x412b42
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x412b5d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x412b7e
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x60(%rsp), %rdi
callq 0x410354
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x412b9f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x412bc0
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0xb8(%rsp), %rdi
callq 0x410354
xorl %eax, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x34(%rbx), %esi
leaq 0x60(%rsp), %rdi
callq 0x410522
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0xa0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x412c30
movq 0x30(%rsp), %rsi
leaq 0xa8(%rsp), %r15
cmpq %rsi, %rax
jbe 0x412c59
movl $0xf, %esi
cmpq %r15, 0x98(%rsp)
je 0x412c54
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x412c6d
movq 0x98(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x4a24a0
jmp 0x412c7e
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4a1e20
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x412ca1
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x412ca7
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1e013b(%rip), %rsi    # 0x5f2e06
movq %rsp, %rdi
callq 0x4a25e0
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x412cfb
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x412d03
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq $0x653b20, %rdi         # imm = 0x653B20
callq 0x490a00
movq %rax, %rbx
leaq 0x1bb370(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490a00
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x471b50
movsbl %al, %esi
movq %rbx, %rdi
callq 0x490500
movq %rax, %rdi
callq 0x48fad0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x412d86
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x412da1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x426f20
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
jne 0x412b6e
jmp 0x412b7e
jmp 0x412dbf
jmp 0x412dc4
jmp 0x412dc9
jmp 0x412dce
movq %rax, %rbx
jmp 0x412dfc
movq %rax, %rbx
jmp 0x412e17
movq %rax, %rbx
jmp 0x412e21
movq %rax, %rbx
jmp 0x412e38
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
jne 0x412def
jmp 0x412dfc
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x412dfc
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x412e17
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x60(%rsp), %rdi
callq 0x40512a
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x412e38
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0xb8(%rsp), %rdi
callq 0x40512a
movq %rbx, %rdi
callq 0x4d11b0
nop