// File: /workspace/github_cpp_makefile_star2_O3/flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::write_binary(modes::MessageType, unsigned long, unsigned char, std::vector<unsigned char, std::allocator<unsigned char>> const&)
void SocketOutput::write_binary(modes::MessageType type, std::uint64_t timestamp, std::uint8_t signal, const helpers::bytebuf &data) {
        prepare_write();
        outbuf->push_back(0x1A);
        outbuf->push_back(messagetype_to_byte(type));

        if (type != modes::MessageType::POSITION) {
            push_back_beast(*outbuf, (timestamp >> 40) & 0xFF);
            push_back_beast(*outbuf, (timestamp >> 32) & 0xFF);
            push_back_beast(*outbuf, (timestamp >> 24) & 0xFF);
            push_back_beast(*outbuf, (timestamp >> 16) & 0xFF);
            push_back_beast(*outbuf, (timestamp >> 8) & 0xFF);
            push_back_beast(*outbuf, timestamp & 0xFF);
            push_back_beast(*outbuf, signal);
        }

        for (auto b : data)
            push_back_beast(*outbuf, b);

        complete_write();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbx
callq 0x24ce4
movq 0x100(%rbx), %rdi
leaq 0x6(%rsp), %rsi
movb $0x1a, (%rsi)
callq 0x1114e
movq 0x100(%rbx), %rdi
leal -0x1(%r12), %eax
cmpl $0x3, %eax
ja 0x246e9
addb $0x31, %al
leaq 0x6(%rsp), %rsi
movb %al, (%rsi)
callq 0x1114e
jmp 0x24700
leaq 0x6(%rsp), %rsi
movb $0x0, (%rsi)
callq 0x1114e
cmpl $0x5, %r12d
je 0x24903
movq 0x100(%rbx), %r12
movq %r15, %r13
shrq $0x28, %r13
movb %r13b, 0x6(%rsp)
cmpb $0x1a, %r13b
jne 0x24729
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1114e
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x2473f
movb %r13b, (%rsi)
incq 0x8(%r12)
jmp 0x2474c
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x18716
movq 0x100(%rbx), %r12
movq %r15, %r13
shrq $0x20, %r13
movb %r13b, 0x6(%rsp)
cmpb $0x1a, %r13b
jne 0x24775
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1114e
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x2478b
movb %r13b, (%rsi)
incq 0x8(%r12)
jmp 0x24798
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x18716
movq 0x100(%rbx), %r12
movl %r15d, %r13d
shrl $0x18, %r13d
movb %r13b, 0x6(%rsp)
cmpl $0x1a, %r13d
jne 0x247c1
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1114e
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x247d7
movb %r13b, (%rsi)
incq 0x8(%r12)
jmp 0x247e4
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x18716
movq 0x100(%rbx), %r12
movl %r15d, %r13d
shrl $0x10, %r13d
movb %r13b, 0x6(%rsp)
cmpb $0x1a, %r13b
jne 0x2480d
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1114e
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x24823
movb %r13b, (%rsi)
incq 0x8(%r12)
jmp 0x24830
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x18716
movq 0x100(%rbx), %r12
movl %r15d, %r13d
shrl $0x8, %r13d
movb %r13b, 0x6(%rsp)
cmpb $0x1a, %r13b
jne 0x24859
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1114e
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x2486f
movb %r13b, (%rsi)
incq 0x8(%r12)
jmp 0x2487c
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x18716
movq 0x100(%rbx), %r12
movb %r15b, 0x6(%rsp)
cmpb $0x1a, %r15b
jne 0x2489e
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1114e
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x248b4
movb %r15b, (%rsi)
incq 0x8(%r12)
jmp 0x248c1
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x18716
movq 0x100(%rbx), %r15
movb %bpl, 0x6(%rsp)
cmpb $0x1a, %bpl
jne 0x248e3
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r15, %rdi
callq 0x1114e
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x248f6
movb %bpl, (%rsi)
incq 0x8(%r15)
jmp 0x24903
leaq 0x6(%rsp), %rdx
movq %r15, %rdi
callq 0x18716
movq (%r14), %r13
movq 0x8(%r14), %rbp
cmpq %rbp, %r13
je 0x24965
leaq 0x7(%rsp), %r14
movb (%r13), %r15b
movq 0x100(%rbx), %r12
movb %r15b, 0x6(%rsp)
cmpb $0x1a, %r15b
jne 0x2493a
movb $0x1a, 0x7(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x1114e
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x24950
movb %r15b, (%rsi)
incq 0x8(%r12)
jmp 0x2495d
movq %r12, %rdi
leaq 0x6(%rsp), %rdx
callq 0x18716
incq %r13
cmpq %rbp, %r13
jne 0x24914
movq %rbx, %rdi
callq 0x24d5a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq