// File: /workspace/github_cpp_makefile_star2_O1/enbock[P]Warp10Server/warp10server/src/Network/WebListener.cpp
// Function: Warp10::Network::WebListener::checkClosed()
void WebListener::checkClosed()
{
	lock();
	int64 count   = _connections.length();
	bool isClosed = _isClosed;
	unlock();
	trace(
		className() + "::checkClosed: " + int2string(count)
		+ " connection left and socket is " 
		+ (isClosed == false ? "connected" : "disconnected")
		+ "."
	);
	if(
		count == 0 && isClosed == true
		&& hasEventListener(WebEvent::WILL_CLOSE) == false
	) {
		lock(); // sync canClose and connection closed here
		bool sent = _closeSent;
		_closeSent = true;
		unlock();
		if (sent  == false) {
			u::Network::Event closed(u::Network::Event::CLOSED);
			dispatchEvent(&closed);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %rbx
callq 0x410246
movq 0xd0(%rbx), %r13
movq 0xd8(%rbx), %r15
movb 0xe8(%rbx), %r12b
movq %rbx, %rdi
callq 0x4101fe
movq $0x653c40, %rdi         # imm = 0x653C40
leaq 0x1c466b(%rip), %rsi    # 0x5ce091
movl $0x4, %edx
callq 0x490a00
movq (%rbx), %rax
leaq 0x110(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x148(%rsp), %rdi
leaq 0x1c4b45(%rip), %rsi    # 0x5ce595
callq 0x4a25e0
movq %r15, %rsi
subq %r13, %rsi
shrq $0x3, %rsi
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x409a86
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x409a8d
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)
leaq 0xb8(%rsp), %rdi
callq 0x410522
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0xf8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x409ad7
movq 0x18(%rsp), %rsi
leaq 0x100(%rsp), %r14
cmpq %rsi, %rax
jbe 0x409b00
movl $0xf, %esi
cmpq %r14, 0xf0(%rsp)
je 0x409afb
movq 0x100(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x409b14
movq 0xf0(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x4a24a0
jmp 0x409b25
leaq 0xf0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4a1e20
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x409b49
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x409b4f
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)
leaq 0x1c4a32(%rip), %rsi    # 0x5ce5a5
leaq 0x28(%rsp), %rdi
callq 0x4a25e0
leaq 0x58(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x409ba4
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x409baa
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
testb %r12b, %r12b
leaq 0x1c49f8(%rip), %rax    # 0x5ce5c8
leaq 0x1c49ee(%rip), %rsi    # 0x5ce5c5
cmoveq %rax, %rsi
callq 0x4a25e0
movq %r15, 0x90(%rsp)
leaq 0xa8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r13, 0x88(%rsp)
je 0x409c20
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x409c27
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movl %r12d, %r13d
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1ccc3d(%rip), %rsi    # 0x5d688d
callq 0x4a25e0
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
movq %r14, %r15
cmpq %rcx, %rdx
je 0x409c80
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x409c88
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq $0x653c40, %rdi         # imm = 0x653C40
callq 0x490a00
movq %rax, %r14
leaq 0x1c43eb(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490a00
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x471b50
movsbl %al, %esi
movq %r14, %rdi
callq 0x490500
movq %rax, %rdi
callq 0x48fad0
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x409d0b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x426f20
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x409d28
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x426f20
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x409d44
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x18(%rsp), %r14
je 0x409d64
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x426f20
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x409d81
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0xb8(%rsp), %rdi
callq 0x410354
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x409da5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x409dc6
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x110(%rsp), %rdi
callq 0x410354
movq 0x88(%rsp), %rax
cmpq %rax, 0x90(%rsp)
sete %al
andb %r13b, %al
cmpb $0x1, %al
jne 0x409e52
movq $0x6527c0, %rsi         # imm = 0x6527C0
movq %rbx, %rdi
callq 0x40e15c
testb %al, %al
jne 0x409e52
movq %rbx, %rdi
callq 0x410246
movb 0xe9(%rbx), %bpl
movb $0x1, 0xe9(%rbx)
movq %rbx, %rdi
callq 0x4101fe
testb %bpl, %bpl
jne 0x409e52
movq $0x652c60, %rsi         # imm = 0x652C60
leaq 0x110(%rsp), %r14
movq %r14, %rdi
callq 0x4168dc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40e18e
leaq 0x110(%rsp), %rdi
callq 0x4169fc
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x4169fc
jmp 0x409f41
movq %rax, %rbx
jmp 0x409eb7
movq %rax, %rbx
jmp 0x409ed4
movq %rax, %rbx
jmp 0x409ef0
movq %rax, %rbx
jmp 0x409f0b
movq %rax, %rbx
jmp 0x409f18
movq %rax, %rbx
jmp 0x409f34
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x409eb7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x426f20
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x409ed4
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x426f20
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x409ef0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x409f0b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0xb8(%rsp), %rdi
callq 0x40512a
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x409f34
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426f20
leaq 0x110(%rsp), %rdi
callq 0x40512a
movq %rbx, %rdi
callq 0x4d11b0
nop