// File: /workspace/github_cpp_makefile_star2_O2/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 0x40c442
leaq 0x88(%r14), %r12
leaq 0x58(%rbx), %r15
leaq 0xa0(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x40cb38
movq %r12, %rdi
movq %r13, %rsi
callq 0x411632
testb %al, %al
je 0x410826
movb 0x160(%r14), %bpl
leaq 0xa0(%rsp), %rdi
callq 0x4050e8
testb %bpl, %bpl
jne 0x410833
leaq 0x260(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x40cb38
movq %r12, %rdi
movq %r13, %rsi
callq 0x4112d6
movq %rax, %rdi
callq 0x4114ac
movq (%rax), %rcx
movq %rax, %rdi
callq *0x20(%rcx)
movq %rax, %r12
leaq 0x260(%rsp), %rdi
callq 0x4050e8
movq $0x64ec20, %rdi         # imm = 0x64EC20
leaq 0x1b69bc(%rip), %rsi    # 0x5c7091
callq 0x489b70
movq %rax, %r13
movq (%r14), %rax
leaq 0xf8(%rsp), %rdi
movq %r14, %rsi
callq *0x8(%rax)
leaq 0x130(%rsp), %rsi
leaq 0x1b79c6(%rip), %rdx    # 0x5c80c3
leaq 0x8(%rsp), %rdi
callq 0x405349
movq (%r12), %rax
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq *0x18(%rax)
leaq 0x80(%rsp), %rdx
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x406c55
leaq 0x28(%rsp), %rsi
movq %r13, %rdi
callq 0x49c3f0
leaq 0x1b696a(%rip), %rsi    # 0x5c70ab
movq %rax, %rdi
callq 0x489b70
movq %rax, %rdi
callq 0x489450
leaq 0x28(%rsp), %rdi
callq 0x499a70
leaq 0x48(%rsp), %rdi
callq 0x4050e8
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0xf8(%rsp), %rdi
callq 0x4050e8
leaq 0x110(%r14), %rdi
movq %r12, %rsi
callq 0x410c52
leaq 0x208(%rsp), %r13
pushq $0x31
popq %rdx
movq %r13, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x409b80
movq $0x64dc40, %rsi         # imm = 0x64DC40
movq %r12, %rdi
movq %r13, %rdx
callq 0x40abb6
leaq 0x208(%rsp), %rdi
callq 0x40c544
leaq 0x1b0(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x40cb38
movq $0x64db90, %rsi         # imm = 0x64DB90
leaq 0xf8(%rsp), %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x40fea8
leaq 0x1b0(%rsp), %rdi
callq 0x4050e8
movq %r14, %rdi
callq 0x40c3fe
leaq 0xf8(%rsp), %rsi
movq %r14, %rdi
callq 0x40ad2c
leaq 0xf8(%rsp), %rdi
callq 0x4100e2
jmp 0x41083b
leaq 0xa0(%rsp), %rdi
callq 0x4050e8
movq %r14, %rdi
callq 0x40c3fe
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
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
jmp 0x4108d8
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x40c544
jmp 0x4108dd
movq %rax, %rbx
jmp 0x4108a2
movq %rax, %rbx
jmp 0x4108ac
movq %rax, %rbx
jmp 0x4108b6
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x4100e2
jmp 0x4108dd
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x499a70
leaq 0x48(%rsp), %rdi
callq 0x4050e8
leaq 0x8(%rsp), %rdi
callq 0x499a70
leaq 0xf8(%rsp), %rdi
jmp 0x4108d8
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
jmp 0x4108d8
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
nop