// File: /workspace/github_cpp_makefile_star2_O2/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, %r12
movq %rcx, %rbx
movq %rdi, %r13
andw $0x0, (%rdi)
movl %edx, %r15d
movq %rsi, %r14
movb $0x0, 0x2(%rdi)
addq $0x8, %rdi
movq %rdi, 0x18(%rsp)
movq %r8, %rsi
callq 0x7e3c
leaq 0x28(%r13), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x7e82
leaq 0x48(%r13), %rdi
xorps %xmm0, %xmm0
leaq 0x110(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
andl $0x0, 0x18(%rdx)
movq $0x2, (%rdx)
movq %rdi, 0x8(%rsp)
movq %r14, %rsi
xorl %ecx, %ecx
movq %rbp, 0x10(%rsp)
callq 0xac8c
leaq 0x98(%r13), %r12
xorl %edi, %edi
callq 0x6530
leaq 0x110(%rsp), %rdx
movl %eax, (%rdx)
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0xde78
leaq 0xe0(%r13), %rbp
leaq 0x110(%rsp), %rdx
movl $0x100, %esi            # imm = 0x100
movq %rbp, %rdi
callq 0x7ec8
xorps %xmm0, %xmm0
movups %xmm0, 0x148(%r13)
andl $0x0, 0x158(%r13)
movq $0x2, 0x140(%r13)
leaq 0x110(%rsp), %rdi
callq 0x6240
leaq 0x120(%rsp), %rdi
movzwl %r15w, %esi
callq 0x65a0
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xe07e
movl $0x2, 0x4(%rsp)
leaq 0x128(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x6560
leaq 0xa0(%rsp), %rdi
leaq 0x4(%rsp), %rsi
leaq 0x20(%rsp), %rcx
pushq $0x20
popq %r8
movq %rbx, %rdx
callq 0x7fce
leaq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x7f64
addq $0x140, %r13            # imm = 0x140
leaq 0x48(%rsp), %rdi
movq -0x8(%rdi), %rax
movq (%rax), %rax
imulq $0x60, 0x8(%rdi), %rcx
movups (%rax,%rcx), %xmm0
movq 0x10(%rax,%rcx), %rdx
movl 0x18(%rax,%rcx), %eax
movl %eax, 0x18(%r13)
movq %rdx, 0x10(%r13)
movups %xmm0, (%r13)
callq 0x84ae
leaq 0xa0(%rsp), %rdi
callq 0x804e
leaq 0x20(%rsp), %rdi
callq 0x6180
leaq 0x58(%rsp), %rdi
callq 0xe528
leaq 0x110(%rsp), %rdi
callq 0x6280
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x804e
jmp 0x6a9d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6180
jmp 0x6aac
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xe528
jmp 0x6abd
jmp 0x6aba
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x6280
movq %rbp, %rdi
callq 0x8068
movq %r12, %rdi
callq 0x8b94
movq 0x8(%rsp), %rdi
callq 0xae0a
movq 0x10(%rsp), %rdi
callq 0x8088
movq 0x18(%rsp), %rdi
callq 0x8088
movq %rbx, %rdi
callq 0x65d0
movq %rax, %rbx
jmp 0x6aca
movq %rax, %rbx
jmp 0x6ad2
movq %rax, %rbx
jmp 0x6ada
movq %rax, %rbx
jmp 0x6ae4
movq %rax, %rbx
jmp 0x6aee
nop