// File: /workspace/github_cpp_makefile_star2_O3/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 0x410226
movq 0xd0(%rbx), %r13
movq 0xd8(%rbx), %r15
movb 0xe8(%rbx), %r12b
movq %rbx, %rdi
callq 0x4101de
movq $0x653c40, %rdi         # imm = 0x653C40
leaq 0x1c46d7(%rip), %rsi    # 0x5ce091
movl $0x4, %edx
callq 0x490910
movq (%rbx), %rax
leaq 0x110(%rsp), %rdi
movq %rbx, %rsi
callq *0x8(%rax)
leaq 0x148(%rsp), %rdi
leaq 0x1c4bb1(%rip), %rsi    # 0x5ce595
callq 0x4a24f0
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 0x409a1a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x409a21
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 0x410514
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0xf8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0x409a6b
movq 0x18(%rsp), %rdi
leaq 0x100(%rsp), %r14
movq -0x10(%r14), %rsi
cmpq %rdi, %rax
jbe 0x409a93
movl $0xf, %edi
cmpq %r14, %rsi
je 0x409a8e
movq 0x100(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x409a9f
leaq 0x8(%rsp), %rdi
callq 0x4a23b0
jmp 0x409ab0
leaq 0xf0(%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 0x409ad4
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x409ada
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 0x1c4aa7(%rip), %rsi    # 0x5ce5a5
leaq 0x28(%rsp), %rdi
callq 0x4a24f0
leaq 0x58(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x409b2f
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x409b35
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 0x1c4a6d(%rip), %rax    # 0x5ce5c8
leaq 0x1c4a63(%rip), %rsi    # 0x5ce5c5
cmoveq %rax, %rsi
callq 0x4a24f0
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 0x409bab
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x409bb2
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 0x1cccb2(%rip), %rsi    # 0x5d688d
callq 0x4a24f0
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
movq %r14, %r15
cmpq %rcx, %rdx
je 0x409c0b
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x409c13
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 0x490910
movq %rax, %r14
leaq 0x1c4460(%rip), %rsi    # 0x5ce0ab
movl $0x4, %edx
movq %rax, %rdi
callq 0x490910
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x471a60
movsbl %al, %esi
movq %r14, %rdi
callq 0x490410
movq %rax, %rdi
callq 0x48f9e0
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x409c96
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x426e30
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x409cb3
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x426e30
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x409ccf
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x18(%rsp), %r14
je 0x409cef
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x426e30
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x409d0c
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0xb8(%rsp), %rdi
callq 0x410332
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x409d30
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x409d51
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x110(%rsp), %rdi
callq 0x410332
movq 0x88(%rsp), %rax
cmpq %rax, 0x90(%rsp)
sete %al
andb %r13b, %al
cmpb $0x1, %al
jne 0x409ddd
movq $0x6527c0, %rsi         # imm = 0x6527C0
movq %rbx, %rdi
callq 0x40e0b6
testb %al, %al
jne 0x409ddd
movq %rbx, %rdi
callq 0x410226
movb 0xe9(%rbx), %bpl
movb $0x1, 0xe9(%rbx)
movq %rbx, %rdi
callq 0x4101de
testb %bpl, %bpl
jne 0x409ddd
movq $0x652c60, %rsi         # imm = 0x652C60
leaq 0x110(%rsp), %r14
movq %r14, %rdi
callq 0x416860
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40e11a
leaq 0x110(%rsp), %rdi
callq 0x41697a
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 0x41697a
jmp 0x409ecc
movq %rax, %rbx
jmp 0x409e42
movq %rax, %rbx
jmp 0x409e5f
movq %rax, %rbx
jmp 0x409e7b
movq %rax, %rbx
jmp 0x409e96
movq %rax, %rbx
jmp 0x409ea3
movq %rax, %rbx
jmp 0x409ebf
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x409e42
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x426e30
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x409e5f
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x426e30
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x409e7b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x409e96
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0xb8(%rsp), %rdi
callq 0x40512c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x409ebf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x426e30
leaq 0x110(%rsp), %rdi
callq 0x40512c
movq %rbx, %rdi
callq 0x4d10c0