// File: /workspace/github_cpp_makefile_star2_O3/nightmeng[P]net/src/acceptor.cpp
// Function: acceptor::ievent()
void acceptor::ievent(){
	if(!status)
		return;

	int fd;
	while(true){
		std::shared_ptr<struct sockaddr_in> addr(new struct sockaddr_in());
		socklen_t len = sizeof(struct sockaddr_in);

		fd = ::accept(sock, reinterpret_cast<struct sockaddr*>(addr.get()),
				&len);
		
		if(fd > 0){
			singleton<scheduler>::instance()->arrange(std::bind(acb, 0, std::shared_ptr<class socket>(
							new class socket(fd, addr))));
		}
		else{
			if(errno != EAGAIN && errno != ECONNABORTED && errno != EPROTO
					&& errno != EINTR){
				singleton<scheduler>::instance()->arrange(std::bind(acb, errno, nullptr));
				return;
			}
			else{
				return;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, -0x60(%rbp)
cmpb $0x1, 0x30(%rdi)
jne 0x40fc
movq -0x60(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x58(%rbp)
leaq -0x98(%rbp), %rbx
leaq -0xf8(%rbp), %r12
movl $0x10, %edi
callq 0x3200
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x4472
movl $0x10, -0x30(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x30b0
movl %eax, %r13d
testl %eax, %eax
jle 0x3ed0
callq 0x427a
movq %rax, %r14
movl $0x228, %edi            # imm = 0x228
callq 0x3200
movq %rax, %r15
movl %r13d, -0x2c(%rbp)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0xd0(%rbp)
movq %rax, -0xc8(%rbp)
testq %rax, %rax
je 0x3f7c
movq 0xb101(%rip), %rcx      # 0xefc0
cmpb $0x0, (%rcx)
je 0x3f78
incl 0x8(%rax)
jmp 0x3f7c
callq 0x3040
movq %rax, %r14
movl (%rax), %eax
cmpl $0x46, %eax
jg 0x3ef3
cmpl $0x4, %eax
je 0x40e5
cmpl $0xb, %eax
je 0x40e5
jmp 0x3f05
cmpl $0x47, %eax
je 0x40e5
cmpl $0x67, %eax
je 0x40e5
callq 0x427a
movq %rax, %r15
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
callq 0x440c
movq $0x0, -0x78(%rbp)
movl (%r14), %eax
movl %eax, -0x70(%rbp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4386
movq %r15, %rdi
movq %r12, %rsi
callq 0x4a32
movq -0xe8(%rbp), %rax
testq %rax, %rax
je 0x3f56
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movq -0x88(%rbp), %rax
testq %rax, %rax
je 0x40e5
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x40e5
lock
incl 0x8(%rax)
movq %r12, %r13
movb $0x1, %r12b
movq %r15, %rdi
movl -0x2c(%rbp), %esi
leaq -0xd0(%rbp), %rdx
movq %r15, -0xd8(%rbp)
callq 0x52da
movq %r15, -0x40(%rbp)
xorl %r12d, %r12d
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x45ca
movq %rbx, %r15
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
callq 0x440c
movq -0x40(%rbp), %rbx
movq -0x38(%rbp), %r12
movq %rbx, -0x78(%rbp)
movq %r12, -0x70(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x40(%rbp)
movl $0x0, -0x68(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movl $0x38, %edi
callq 0x3200
xorps %xmm1, %xmm1
movups %xmm1, (%rax)
movq $0x0, 0x10(%rax)
movq -0x80(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x88(%rbp), %rcx
testq %rcx, %rcx
je 0x402d
movups -0x98(%rbp), %xmm0
movups %xmm0, (%rax)
movq %rcx, 0x10(%rax)
leaq -0x88(%rbp), %rcx
movups %xmm1, (%rcx)
movq %rbx, 0x20(%rax)
xorl %ecx, %ecx
movq %rcx, -0x70(%rbp)
movq %r12, 0x28(%rax)
movq %rcx, -0x78(%rbp)
movl $0x0, 0x30(%rax)
movq %rax, -0xc0(%rbp)
leaq 0x624(%rip), %rax       # 0x4678
movq %rax, -0xa8(%rbp)
leaq 0x62c(%rip), %rax       # 0x468e
movq %rax, -0xb0(%rbp)
movq %r14, %rdi
leaq -0xc0(%rbp), %rsi
callq 0x4a32
movq -0xb0(%rbp), %rax
testq %rax, %rax
movq %r15, %rbx
movq %r13, %r12
je 0x409b
leaq -0xc0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
movl -0x2c(%rbp), %r13d
je 0x40ad
callq 0x3a10
movq -0x88(%rbp), %rax
testq %rax, %rax
je 0x40c6
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x40d4
callq 0x3a10
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x40e5
callq 0x3a10
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x40f3
callq 0x3a10
testl %r13d, %r13d
jg 0x3e3e
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4189
jmp 0x4189
movq %rax, %rbx
movq -0xe8(%rbp), %rax
testq %rax, %rax
je 0x4139
leaq -0xf8(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x4139
jmp 0x4189
movq %rax, %rbx
movq -0x88(%rbp), %rax
testq %rax, %rax
je 0x41e4
leaq -0x98(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x41e4
jmp 0x4189
jmp 0x41e1
jmp 0x4189
jmp 0x4189
movq %rax, %rbx
movq -0xb0(%rbp), %rax
testq %rax, %rax
je 0x4199
leaq -0xc0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x4199
movq %rax, %rdi
callq 0x3a01
movq %rax, %rbx
jmp 0x41a5
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x434a
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x41b3
callq 0x3a10
xorl %r12d, %r12d
jmp 0x41bd
jmp 0x41e1
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x41ce
callq 0x3a10
testb %r12b, %r12b
je 0x41e4
movq -0xd8(%rbp), %rdi
callq 0x31e0
jmp 0x41e4
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x41f2
callq 0x3a10
movq %rbx, %rdi
callq 0x3330