// File: /workspace/github_cpp_makefile_star2_O1/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 0x267b8
movq 0x100(%rbx), %rdi
leaq 0x6(%rsp), %r13
movb $0x1a, (%r13)
movq %r13, %rsi
callq 0x1227c
movq 0x100(%rbx), %rdi
leal (,%r12,8), %ecx
movabsq $0x3433323100, %rax     # imm = 0x3433323100
shrq %cl, %rax
xorl %ecx, %ecx
cmpl $0x5, %r12d
cmovbl %eax, %ecx
movb %cl, (%r13)
leaq 0x6(%rsp), %rsi
callq 0x1227c
cmpl $0x5, %r12d
je 0x263d3
movq 0x100(%rbx), %r12
movq %r15, %rax
shrq $0x28, %rax
movb %al, 0x6(%rsp)
cmpb $0x1a, %al
jne 0x261f2
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1227c
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x2620b
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r12)
jmp 0x26218
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x19aea
movq 0x100(%rbx), %r12
movq %r15, %rax
shrq $0x20, %rax
movb %al, 0x6(%rsp)
cmpb $0x1a, %al
jne 0x2623e
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1227c
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x26257
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r12)
jmp 0x26264
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x19aea
movq 0x100(%rbx), %r12
movl %r15d, %eax
shrl $0x18, %eax
movb %al, 0x6(%rsp)
cmpl $0x1a, %eax
jne 0x2628a
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1227c
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x262a3
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r12)
jmp 0x262b0
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x19aea
movq 0x100(%rbx), %r12
movl %r15d, %eax
shrl $0x10, %eax
movb %al, 0x6(%rsp)
cmpb $0x1a, %al
jne 0x262d5
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1227c
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x262ee
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r12)
jmp 0x262fb
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x19aea
movq 0x100(%rbx), %r12
movl %r15d, %eax
shrl $0x8, %eax
movb %al, 0x6(%rsp)
cmpb $0x1a, %al
jne 0x26320
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1227c
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x26339
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r12)
jmp 0x26346
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x19aea
movq 0x100(%rbx), %r12
movb %r15b, 0x6(%rsp)
cmpb $0x1a, %r15b
jne 0x26368
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r12, %rdi
callq 0x1227c
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x26381
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r12)
jmp 0x2638e
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x19aea
movq 0x100(%rbx), %r15
movb %bpl, 0x6(%rsp)
cmpb $0x1a, %bpl
jne 0x263b0
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
movq %r15, %rdi
callq 0x1227c
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x263c6
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r15)
jmp 0x263d3
leaq 0x6(%rsp), %rdx
movq %r15, %rdi
callq 0x19aea
movq (%r14), %r13
movq 0x8(%r14), %rbp
cmpq %rbp, %r13
je 0x26438
leaq 0x7(%rsp), %r14
leaq 0x6(%rsp), %r15
movb (%r13), %al
movq 0x100(%rbx), %r12
movb %al, 0x6(%rsp)
cmpb $0x1a, %al
jne 0x2640c
movb $0x1a, 0x7(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x1227c
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x26425
movb 0x6(%rsp), %al
movb %al, (%rsi)
incq 0x8(%r12)
jmp 0x26430
movq %r12, %rdi
movq %r15, %rdx
callq 0x19aea
incq %r13
cmpq %rbp, %r13
jne 0x263e9
movq %rbx, %rdi
callq 0x2682c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop