// File: /workspace/github_cpp_makefile_star2_O3/patxitron[P]BattleyeRconToolLinux/a3s.cpp
// Function: patxi::a3s::a3s(boost::asio::io_context&, unsigned short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<void (char const*, unsigned long)>, std::function<void (bool)>)
a3s::a3s(boost::asio::io_service& io_service, uint16_t port
        ,std::string const& addr, on_data_func on_data, on_login_func on_login)
		:loged_in_(false)
		,listening_(false)
		,sequence_(0)
		,on_data_(on_data)
		,on_login_(on_login)
		,socket_(io_service, udp::endpoint(udp::v4(), 0))
		,input_(io_service, ::dup(STDIN_FILENO))
		,console_data_(MAX_COMMAND_LENGTH)
{
	stringstream str_port;
	str_port << port;
	udp::resolver resolver(io_service);
	endpoint_ = *resolver.resolve({udp::v4(), addr, str_port.str()});
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %r9, %r13
movq %rcx, %r14
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
movw $0x0, (%rdi)
movb $0x0, 0x2(%rdi)
addq $0x8, %rdi
movq %rdi, 0x10(%rsp)
movq %r8, %rsi
callq 0x842c
leaq 0x28(%rbx), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x848a
leaq 0x48(%rbx), %rdi
xorps %xmm0, %xmm0
leaq 0x110(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
movl $0x0, 0x18(%rdx)
movq $0x2, (%rdx)
movq %rdi, 0x18(%rsp)
movq %r15, %rsi
xorl %ecx, %ecx
movq %rbp, 0x8(%rsp)
callq 0xb5fc
leaq 0x98(%rbx), %r13
xorl %edi, %edi
callq 0x6530
leaq 0x110(%rsp), %rdx
movl %eax, (%rdx)
movq %r13, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xf188
leaq 0xe0(%rbx), %rbp
leaq 0x110(%rsp), %rdx
movl $0x100, %esi            # imm = 0x100
movq %rbp, %rdi
callq 0x84e8
xorps %xmm0, %xmm0
movups %xmm0, 0x148(%rbx)
movl $0x0, 0x158(%rbx)
movq $0x2, 0x140(%rbx)
leaq 0x110(%rsp), %rdi
callq 0x6260
leaq 0x120(%rsp), %rdi
movzwl %r12w, %esi
callq 0x6240
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf34e
movl $0x2, 0x4(%rsp)
leaq 0x128(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x6570
leaq 0x58(%rsp), %rdi
leaq 0x4(%rsp), %rsi
leaq 0x20(%rsp), %rcx
movq %r14, %rdx
movl $0x20, %r8d
callq 0x8680
leaq 0x40(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x85be
addq $0x140, %rbx            # imm = 0x140
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
movups (%rax,%rcx), %xmm0
movq 0x10(%rax,%rcx), %rdx
movl 0x18(%rax,%rcx), %eax
movl %eax, 0x18(%rbx)
movq %rdx, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x6a7a
callq 0x8c34
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a9b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x6390
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6abc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6390
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ad7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6390
leaq 0xc8(%rsp), %rdi
callq 0xfa0c
movq 0x144a5(%rip), %rsi     # 0x1af90
leaq 0x110(%rsp), %rdi
callq 0x62a0
leaq 0x190(%rsp), %rdi
callq 0x6120
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x873a
jmp 0x6b29
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6b49
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6390
jmp 0x6b49
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
callq 0xfa0c
jmp 0x6b5d
jmp 0x6b5a
movq %rax, %r14
movq 0x1442c(%rip), %rsi     # 0x1af90
leaq 0x110(%rsp), %rdi
callq 0x62a0
leaq 0x190(%rsp), %rdi
callq 0x6120
movq %rbp, %rdi
callq 0x8772
movq %r13, %rdi
callq 0x93d4
movq 0x18(%rsp), %rdi
callq 0xb8aa
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x6bc9
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6bc9
movq %rax, %r14
jmp 0x6b7e
movq %rax, %r14
jmp 0x6b86
movq %rax, %r14
jmp 0x6b8e
movq %rax, %r14
jmp 0x6b98
movq %rax, %r14
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x6be1
movq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0x65e0
jmp 0x6beb
movq %rax, %rdi
callq 0x8333
nop