// File: 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
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x378(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x417410
movq -0x378(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x370(%rbp)
movq -0x18(%rbp), %rsi
addq $0x58, %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x417f20
movq -0x370(%rbp), %rdi
movq -0x368(%rbp), %rsi
callq 0x4233d0
movb %al, -0x359(%rbp)
jmp 0x420932
movb -0x359(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
movb %al, -0x379(%rbp)
jne 0x420968
movq -0x378(%rbp), %rax
movb 0x160(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x379(%rbp)
movb -0x379(%rbp), %al
movb %al, -0x37a(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x405650
movb -0x37a(%rbp), %al
testb $0x1, %al
jne 0x42098c
jmp 0x420e16
movq -0x378(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x398(%rbp)
movq -0x18(%rbp), %rsi
addq $0x58, %rsi
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x390(%rbp)
callq 0x417f20
movq -0x398(%rbp), %rdi
movq -0x390(%rbp), %rsi
callq 0x422d60
movq %rax, -0x388(%rbp)
jmp 0x4209d7
movq -0x388(%rbp), %rdi
callq 0x4230d0
movq %rax, -0x3a0(%rbp)
jmp 0x4209ec
movq -0x3a0(%rbp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
movq %rax, -0x3a8(%rbp)
jmp 0x420a05
movq -0x3a8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x405650
movq $0x668c60, %rdi         # imm = 0x668C60
leaq 0x1ba664(%rip), %rsi    # 0x5db091
callq 0x49dd60
movq %rax, -0x3b0(%rbp)
movb $0x0, -0x179(%rbp)
movb $0x0, -0x17a(%rbp)
movb $0x0, -0x1d9(%rbp)
movb $0x0, -0x1db(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x420a5d
jmp 0x420adc
movq -0x378(%rbp), %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq -0x178(%rbp), %rdi
callq *%rax
movb $0x1, -0x179(%rbp)
leaq -0x140(%rbp), %rsi
leaq 0x1bc1cf(%rip), %rdx    # 0x5dcc58
leaq -0x120(%rbp), %rdi
callq 0x405d00
jmp 0x420a97
movb $0x1, -0x17a(%rbp)
movq -0x88(%rbp), %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x1d8(%rbp), %rdi
callq *%rax
jmp 0x420ab7
movb $0x1, -0x1d9(%rbp)
leaq -0x1a0(%rbp), %rdx
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x409d40
jmp 0x420ada
jmp 0x420b14
leaq -0x1da(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x435b90
movq -0x3b8(%rbp), %rdx
movb $0x1, -0x1db(%rbp)
leaq 0x1dfe9e(%rip), %rsi    # 0x6009a2
leaq -0x100(%rbp), %rdi
callq 0x407e60
jmp 0x420b12
jmp 0x420b14
movq -0x3b0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x4b05e0
movq %rax, -0x3c0(%rbp)
jmp 0x420b30
movq -0x3c0(%rbp), %rdi
leaq 0x1ba592(%rip), %rsi    # 0x5db0d0
callq 0x49dd60
movq %rax, -0x3c8(%rbp)
jmp 0x420b4c
movq -0x3c8(%rbp), %rdi
movq $0x49d640, %rsi         # imm = 0x49D640
callq 0x49c850
jmp 0x420b61
leaq -0x100(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1db(%rbp)
jne 0x420b78
jmp 0x420b84
leaq -0x1da(%rbp), %rdi
callq 0x435bb0
testb $0x1, -0x1d9(%rbp)
jne 0x420b8f
jmp 0x420b9b
leaq -0x1d8(%rbp), %rdi
callq 0x405650
testb $0x1, -0x17a(%rbp)
jne 0x420ba6
jmp 0x420bb2
leaq -0x120(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x179(%rbp)
jne 0x420bbd
jmp 0x420bc9
leaq -0x178(%rbp), %rdi
callq 0x405650
movq -0x378(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq -0x88(%rbp), %rsi
callq 0x421560
movq -0x378(%rbp), %rsi
movq -0x88(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movq $0x0, -0x240(%rbp)
movq $0x31, -0x248(%rbp)
movq -0x248(%rbp), %rdx
movq -0x240(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
leaq -0x238(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x410a10
movq -0x3d8(%rbp), %rdi
movq -0x3d0(%rbp), %rdx
movq $0x667c80, %rsi         # imm = 0x667C80
callq 0x412620
jmp 0x420c50
leaq -0x238(%rbp), %rdi
callq 0x407e40
movq -0x18(%rbp), %rsi
addq $0x58, %rsi
leaq -0x358(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x417f20
movq -0x3e0(%rbp), %rdx
movq -0x88(%rbp), %rcx
movq $0x667bd0, %rsi         # imm = 0x667BD0
leaq -0x300(%rbp), %rdi
callq 0x41fb20
jmp 0x420c9a
leaq -0x358(%rbp), %rdi
callq 0x405650
movq -0x378(%rbp), %rdi
callq 0x417380
jmp 0x420cb4
movq -0x378(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x412820
jmp 0x420cc9
leaq -0x300(%rbp), %rdi
callq 0x41fee0
jmp 0x420e22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x405650
jmp 0x420e34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x405650
jmp 0x420e34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x420daf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x420d96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x420d7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x420d64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1db(%rbp)
jne 0x420d6f
jmp 0x420d7b
leaq -0x1da(%rbp), %rdi
callq 0x435bb0
jmp 0x420d7d
testb $0x1, -0x1d9(%rbp)
jne 0x420d88
jmp 0x420d94
leaq -0x1d8(%rbp), %rdi
callq 0x405650
jmp 0x420d96
testb $0x1, -0x17a(%rbp)
jne 0x420da1
jmp 0x420dad
leaq -0x120(%rbp), %rdi
callq 0x4adc60
jmp 0x420daf
testb $0x1, -0x179(%rbp)
jne 0x420dba
jmp 0x420dc6
leaq -0x178(%rbp), %rdi
callq 0x405650
jmp 0x420e34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x407e40
jmp 0x420e34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x405650
jmp 0x420e34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x41fee0
jmp 0x420e34
movq -0x378(%rbp), %rdi
callq 0x417380
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x4deb40
nopl (%rax)