// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::write_avrmlat(unsigned long, std::vector<unsigned char, std::allocator<unsigned char>> const&)
void SocketOutput::write_avrmlat(std::uint64_t timestamp, const helpers::bytebuf &data) {
        prepare_write();

        outbuf->push_back((std::uint8_t)'@');
        push_back_hex(*outbuf, (timestamp >> 40) & 0xFF);
        push_back_hex(*outbuf, (timestamp >> 32) & 0xFF);
        push_back_hex(*outbuf, (timestamp >> 24) & 0xFF);
        push_back_hex(*outbuf, (timestamp >> 16) & 0xFF);
        push_back_hex(*outbuf, (timestamp >> 8) & 0xFF);
        push_back_hex(*outbuf, timestamp & 0xFF);
        for (auto b : data)
            push_back_hex(*outbuf, b);
        outbuf->push_back((std::uint8_t)';');
        outbuf->push_back((std::uint8_t)'\n');

        complete_write();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x50d30
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3b1a0
movq %rax, %rdi
movb $0x40, -0x19(%rbp)
leaq -0x19(%rbp), %rsi
callq 0x1c010
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movq -0x10(%rbp), %rax
shrq $0x28, %rax
andq $0xff, %rax
movzbl %al, %esi
callq 0x510c0
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movq -0x10(%rbp), %rax
shrq $0x20, %rax
andq $0xff, %rax
movzbl %al, %esi
callq 0x510c0
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movq -0x10(%rbp), %rax
shrq $0x18, %rax
andq $0xff, %rax
movzbl %al, %esi
callq 0x510c0
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movq -0x10(%rbp), %rax
shrq $0x10, %rax
andq $0xff, %rax
movzbl %al, %esi
callq 0x510c0
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movq -0x10(%rbp), %rax
shrq $0x8, %rax
andq $0xff, %rax
movzbl %al, %esi
callq 0x510c0
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movq -0x10(%rbp), %rax
andq $0xff, %rax
movzbl %al, %esi
callq 0x510c0
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x13e30
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x13e60
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x13e90
testb $0x1, %al
jne 0x50ba8
jmp 0x50bdd
leaq -0x30(%rbp), %rdi
callq 0x13ed0
movq -0x48(%rbp), %rdi
movb (%rax), %al
movb %al, -0x39(%rbp)
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movzbl -0x39(%rbp), %esi
callq 0x510c0
leaq -0x30(%rbp), %rdi
callq 0x13ef0
jmp 0x50b95
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3b1a0
movq %rax, %rdi
movb $0x3b, -0x3a(%rbp)
leaq -0x3a(%rbp), %rsi
callq 0x1c010
movq -0x48(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3b1a0
movq %rax, %rdi
movb $0xa, -0x3b(%rbp)
leaq -0x3b(%rbp), %rsi
callq 0x1c010
movq -0x48(%rbp), %rdi
callq 0x50db0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)