// File: /workspace/github_cpp_makefile_star2_O3/enbock[P]Warp10Server/ulib/src/Network/Manager.cpp
// Function: u::Network::Manager::onRequestListener(u::Object*)
void Manager::onRequestListener(Object *arg)
{
	Event* event = ((Event*) arg);

	lock();
	if (_builder.hasKey(event->networkType) == true && _isClosing == false) 
	{
		Network::IListener* listener;
		listener = ((IBuilder*)((Object *)_builder[event->networkType]))
			->createListener();
		trace(
			className() + "::onRequestListener: Create " + listener->toString()
		);
		_listener.push(listener);

		listener->addEventListener(
			Event::CLOSED
			, Callback(this, cb_cast(&Network::Manager::onListenerClosed))
		);

		Event response(
			Event::LISTENER_CREATED, event->networkType, listener
		);
		unlock();
		dispatchEvent(&response);
	} else {
		unlock();
	}

	event->destroy();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %rbx
movq %rdi, %r14
callq 0x410226
leaq 0x88(%r14), %r12
leaq 0x58(%rbx), %r15
leaq 0xa0(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x410a2c
movq %r12, %rdi
movq %r13, %rsi
callq 0x4187b4
leaq 0xe8(%rsp), %rcx
testb %al, %al
je 0x417221
movb 0x160(%r14), %bpl
movq 0xd8(%rsp), %rdi
cmpq %rcx, %rdi
je 0x417147
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0xa0(%rsp), %rdi
callq 0x410332
testb %bpl, %bpl
jne 0x41724b
leaq 0x150(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x410a2c
movq %r12, %rdi
movq %r13, %rsi
callq 0x4182aa
movq %rax, %rdi
callq 0x4185cc
movq (%rax), %rcx
movq %rax, %rdi
callq *0x20(%rcx)
movq %rax, %r12
leaq 0x198(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4171b0
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x150(%rsp), %rdi
callq 0x410332
movq $0x653c40, %rdi         # imm = 0x653C40
leaq 0x1b6ec6(%rip), %rsi    # 0x5ce091
movl $0x4, %edx
callq 0x490910
movq (%r14), %rax
leaq 0x1a8(%rsp), %rdi
movq %r14, %rsi
callq *0x8(%rax)
leaq 0x1e0(%rsp), %rdi
leaq 0x1b7f30(%rip), %rsi    # 0x5cf125
callq 0x4a24f0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x41726d
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x417275
movq 0xd8(%rsp), %rdi
cmpq %rcx, %rdi
je 0x41723e
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0xa0(%rsp), %rdi
callq 0x410332
movq %r14, %rdi
callq 0x4101de
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r12), %rax
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq *0x18(%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x88(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x4172c1
movq 0x18(%rsp), %rdi
leaq 0x90(%rsp), %rbp
movq -0x10(%rbp), %rsi
cmpq %rdi, %rax
jbe 0x4172e9
movl $0xf, %edi
cmpq %rbp, %rsi
je 0x4172e4
movq 0x90(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x4172f5
leaq 0x8(%rsp), %rdi
callq 0x4a23b0
jmp 0x417306
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4a1d30
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x41732a
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x417330
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq $0x653c40, %rdi         # imm = 0x653C40
callq 0x490910
movq %rax, %r13
leaq 0x1b6d3e(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490910
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x471a60
movsbl %al, %esi
movq %r13, %rdi
callq 0x490410
movq %rax, %rdi
callq 0x48f9e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4173bd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x426e30
movq 0x80(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4173da
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x48(%rsp), %rdi
callq 0x410332
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x417400
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x1f0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x417421
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x1a8(%rsp), %rdi
callq 0x410332
leaq 0x110(%r14), %rdi
movq %r12, %rsi
callq 0x417a64
leaq 0x260(%rsp), %r13
movl $0x31, %edx
movq %r13, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x40bcd8
movq $0x652c60, %rsi         # imm = 0x652C60
movq %r12, %rdi
movq %r13, %rdx
callq 0x40ded4
leaq 0x260(%rsp), %rdi
callq 0x410332
leaq 0xf8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x410a2c
movq $0x652bb0, %rsi         # imm = 0x652BB0
leaq 0x1a8(%rsp), %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x416720
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4174c7
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0xf8(%rsp), %rdi
callq 0x410332
movq %r14, %rdi
callq 0x4101de
leaq 0x1a8(%rsp), %rsi
movq %r14, %rdi
callq 0x40e11a
leaq 0x1a8(%rsp), %rdi
callq 0x41697a
jmp 0x417253
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
jmp 0x4175aa
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x410332
jmp 0x4175af
movq %rax, %rbx
jmp 0x41756f
movq %rax, %rbx
jmp 0x417579
movq %rax, %rbx
jmp 0x417595
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x41697a
jmp 0x4175af
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
jmp 0x4175aa
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41756f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x48(%rsp), %rdi
callq 0x40512c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x417595
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x1a8(%rsp), %rdi
jmp 0x4175aa
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x40512c
movq %rbx, %rdi
callq 0x4d10c0
nop