LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: flightaware[P]beast-splitter/beast_input.cc
// Function: beast::BeastInput::connection_established()
void BeastInput::connection_established() {
    auto self(shared_from_this());

    first_message = true;
    receiving_gps_timestamps = false;
    good_sync = false;
    good_messages_count = 0;
    bad_bytes_count = 0;
    state = ParserState::READ_1A;
    current_settings = Settings();

    autodetect_timer.cancel();
    if (fixed_settings.radarcape.on())
        receiver_type = ReceiverType::RADARCAPE;
    else if (fixed_settings.radarcape.off())
        receiver_type = ReceiverType::BEAST;
    else {
        receiver_type = ReceiverType::UNKNOWN;
        autodetect_timer.expires_from_now(radarcape_detect_interval);
        autodetect_timer.async_wait([this, self](const boost::system::error_code &ec) {
            if (!ec) {
                receiver_type = ReceiverType::BEAST;
                send_settings_message();
            }
        });
    }

    send_settings_message();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x80(%rbp)
addq $0x8, %rsi
leaq -0x18(%rbp), %rdi
callq 0x212b0
movq -0x80(%rbp), %rax
movb $0x1, 0x23c(%rax)
movb $0x0, 0xdb(%rax)
movb $0x0, 0x230(%rax)
movl $0x0, 0x234(%rax)
movl $0x0, 0x238(%rax)
movl $0x1, 0x278(%rax)
leaq -0x48(%rbp), %rdi
callq 0x19860
jmp 0x1cd56
movq -0x80(%rbp), %rdi
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups -0x28(%rbp), %xmm2
movups %xmm2, 0xa4(%rdi)
movups %xmm1, 0x94(%rdi)
movups %xmm0, 0x84(%rdi)
addq $0xe0, %rdi
callq 0x212e0
jmp 0x1cd89
movq -0x80(%rbp), %rdi
addq $0x54, %rdi
callq 0x1b340
movb %al, -0x81(%rbp)
jmp 0x1cd9e
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x1cdaa
jmp 0x1cdcb
movq -0x80(%rbp), %rax
movl $0x2, 0x50(%rax)
jmp 0x1ce94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1ceb1
movq -0x80(%rbp), %rdi
addq $0x54, %rdi
callq 0x1b300
movb %al, -0x82(%rbp)
jmp 0x1cde0
movb -0x82(%rbp), %al
testb $0x1, %al
jne 0x1cdec
jmp 0x1cdfc
movq -0x80(%rbp), %rax
movl $0x1, 0x50(%rax)
jmp 0x1ce92
movq -0x80(%rbp), %rsi
movl $0x0, 0x50(%rsi)
movq %rsi, %rax
addq $0xe0, %rax
movq %rax, -0x90(%rbp)
addq $0x20, %rsi
leaq -0x60(%rbp), %rdi
callq 0x213c0
jmp 0x1ce26
movq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x21350
jmp 0x1ce38
movq -0x80(%rbp), %rax
movq %rax, %rcx
addq $0xe0, %rcx
movq %rcx, -0x98(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x21400
movq -0x98(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1ced0
jmp 0x1ce70
leaq -0x78(%rbp), %rdi
callq 0x1cf00
jmp 0x1ce92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x1cf00
jmp 0x1ceb1
jmp 0x1ce94
movq -0x80(%rbp), %rdi
callq 0x1cf20
jmp 0x1ce9f
leaq -0x18(%rbp), %rdi
callq 0x21430
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x21430
movq -0x50(%rbp), %rdi
callq 0x12f70
nopw %cs:(%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input.cc
// Function: beast::BeastInput::connection_failed()
void BeastInput::connection_failed() {
    good_sync = false;
    autodetect_timer.cancel();

    // schedule reconnect.
    auto self(shared_from_this());
    reconnect_timer.expires_from_now(reconnect_interval);
    reconnect_timer.async_wait([this, self](const boost::system::error_code &ec) {
        if (!ec) {
            try_to_connect();
        }
    });
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movb $0x0, 0x230(%rdi)
addq $0xe0, %rdi
callq 0x212e0
movq -0x58(%rbp), %rsi
addq $0x8, %rsi
leaq -0x18(%rbp), %rdi
callq 0x212b0
movq -0x58(%rbp), %rsi
movq %rsi, %rax
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x50(%rbp)
addq $0x18, %rsi
leaq -0x20(%rbp), %rdi
callq 0x213c0
jmp 0x1d1f8
movq -0x50(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x21350
jmp 0x1d207
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x150, %rcx            # imm = 0x150
movq %rcx, -0x60(%rbp)
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x21400
movq -0x60(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1d290
jmp 0x1d239
leaq -0x48(%rbp), %rdi
callq 0x1d2c0
leaq -0x18(%rbp), %rdi
callq 0x21430
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1d274
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x1d2c0
leaq -0x18(%rbp), %rdi
callq 0x21430
movq -0x28(%rbp), %rdi
callq 0x12f70
nopw %cs:(%rax,%rax)
// File: flightaware[P]beast-splitter/./beast_input.h
// Function: beast::messagetype_from_byte(unsigned char)
inline modes::MessageType messagetype_from_byte(std::uint8_t b) {
        switch (b) {
        case 0x31:
            return modes::MessageType::MODE_AC;
        case 0x32:
            return modes::MessageType::MODE_S_SHORT;
        case 0x33:
            return modes::MessageType::MODE_S_LONG;
        case 0x34:
            return modes::MessageType::STATUS;
        case 0x35:
            return modes::MessageType::POSITION;
        default:
            return modes::MessageType::INVALID;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
addl $-0x31, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x4, %eax
ja 0x215ed
movq -0x10(%rbp), %rax
leaq 0x91ca1(%rip), %rcx     # 0xb3258
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x215f4
movl $0x2, -0x4(%rbp)
jmp 0x215f4
movl $0x3, -0x4(%rbp)
jmp 0x215f4
movl $0x4, -0x4(%rbp)
jmp 0x215f4
movl $0x5, -0x4(%rbp)
jmp 0x215f4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: flightaware[P]beast-splitter/./modes_message.h
// Function: modes::message_size(modes::MessageType)
inline std::size_t message_size(MessageType type) {
        // return the expected number of data bytes for a message of the given type

        switch (type) {
        case MessageType::MODE_AC:
            return 2;
        case MessageType::MODE_S_SHORT:
            return 7;
        case MessageType::MODE_S_LONG:
            return 14;
        case MessageType::STATUS:
            return 14;
        case MessageType::POSITION:
            return 14;
        default:
            return 0;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0x2167d
movq -0x18(%rbp), %rax
leaq 0x91c2a(%rip), %rcx     # 0xb326c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x2, -0x8(%rbp)
jmp 0x21685
movq $0x7, -0x8(%rbp)
jmp 0x21685
movq $0xe, -0x8(%rbp)
jmp 0x21685
movq $0xe, -0x8(%rbp)
jmp 0x21685
movq $0xe, -0x8(%rbp)
jmp 0x21685
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_serial.cc
// Function: beast::SerialInput::handle_error(boost::system::error_code const&)
void SerialInput::handle_error(const boost::system::error_code &ec) {
    if (ec == boost::asio::error::operation_aborted)
        return;

    std::cerr << what() << ": i/o error: " << ec.message() << std::endl;
    connection_failed();

    autobaud_timer.cancel();
    read_timer.cancel();
    if (port.is_open()) {
        boost::system::error_code ignored;
        port.close(ignored);
    }

    // reset autobaud state
    if (!autobaud_rates.empty()) {
        autobauding = true;
        autobaud_interval = autobaud_base_interval;
        autobaud_rate = autobaud_rates.begin();
        baud_rate = *autobaud_rate;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x7d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3ace0
movq -0xa0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3aee0
testb $0x1, %al
jne 0x36231
jmp 0x36236
jmp 0x363fd
movq -0xa8(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x40(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq *%rax
movq -0xb8(%rbp), %rsi
movq 0xd4d79(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0xb0(%rbp)
jmp 0x3626d
movq -0xb0(%rbp), %rdi
leaq 0x7e090(%rip), %rsi     # 0xb430b
callq 0x12800
movq %rax, -0xc0(%rbp)
jmp 0x36289
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x21130
jmp 0x36298
movq -0xc0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x12770
movq %rax, -0xc8(%rbp)
jmp 0x362b1
movq -0xc8(%rbp), %rdi
movq 0xd4c59(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x362c6
leaq -0x70(%rbp), %rdi
callq 0x13198
leaq -0x40(%rbp), %rdi
callq 0x13198
movq -0xa8(%rbp), %rdi
callq 0x1d1a0
movq -0xa8(%rbp), %rdi
addq $0x350, %rdi            # imm = 0x350
callq 0x212e0
movq -0xa8(%rbp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
callq 0x212e0
movq -0xa8(%rbp), %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x3a780
testb $0x1, %al
jne 0x36323
jmp 0x36384
leaq -0x80(%rbp), %rdi
callq 0x26710
movq -0xa8(%rbp), %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
leaq -0x80(%rbp), %rsi
callq 0x3ade0
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
jmp 0x36384
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x36376
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x13198
leaq -0x40(%rbp), %rdi
callq 0x13198
jmp 0x36406
movq -0xa8(%rbp), %rdi
addq $0x320, %rdi            # imm = 0x320
callq 0x3af30
testb $0x1, %al
jne 0x363fd
movq -0xa8(%rbp), %rdi
movb $0x1, 0x318(%rdi)
movq 0x288(%rdi), %rax
movq %rax, 0x348(%rdi)
addq $0x320, %rdi            # imm = 0x320
callq 0x3a580
movq -0xa8(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, 0x338(%rdi)
addq $0x338, %rdi            # imm = 0x338
callq 0x3a5b0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x340(%rax)
addq $0xd0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x12f70
nop
// File: flightaware[P]beast-splitter/beast_input_serial.cc
// Function: beast::SerialInput::disconnect()
void SerialInput::disconnect() {
    autobaud_timer.cancel();
    read_timer.cancel();
    if (port.is_open()) {
        boost::system::error_code ignored;
        port.close(ignored);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x350, %rdi            # imm = 0x350
callq 0x212e0
movq -0x30(%rbp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
callq 0x212e0
movq -0x30(%rbp), %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x3a780
testb $0x1, %al
jne 0x36706
jmp 0x3672b
leaq -0x18(%rbp), %rdi
callq 0x26710
movq -0x30(%rbp), %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
leaq -0x18(%rbp), %rsi
callq 0x3ade0
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_serial.cc
// Function: beast::SerialInput::low_level_write(std::shared_ptr<std::vector<unsigned char, std::allocator<unsigned char>>>)
bool SerialInput::low_level_write(std::shared_ptr<helpers::bytebuf> message) {
    if (!port.is_open())
        return false;

    auto self(shared_from_this());
    boost::asio::async_write(port, boost::asio::buffer(*message), [this, self, message](boost::system::error_code ec, std::size_t len) {
        if (ec)
            handle_error(ec);
    });
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x80(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x78(%rbp)
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x3a780
testb $0x1, %al
jne 0x36778
movb $0x0, -0x1(%rbp)
jmp 0x36834
movq -0x78(%rbp), %rsi
addq $0x8, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x212b0
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rdi
addq $0x2d0, %rax            # imm = 0x2D0
movq %rax, -0x88(%rbp)
callq 0x3aeb0
movq %rax, %rdi
callq 0x3ae40
movq -0x90(%rbp), %rsi
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x21400
movq -0x80(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x214c0
movq -0x88(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x36850
jmp 0x367fc
leaq -0x60(%rbp), %rdi
callq 0x368b0
movb $0x1, -0x1(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x21430
jmp 0x36834
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x368b0
leaq -0x28(%rbp), %rdi
callq 0x21430
jmp 0x36842
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x12f70
nopl (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_serial.cc
// Function: beast::SerialInput::advance_autobaud()
void SerialInput::advance_autobaud(void) {
    if (!autobauding)
        return;

    if (++autobaud_rate == autobaud_rates.end()) {
        // Ran out of rates to try. Increase the interval and start again
        std::cerr << what() << ": autobaud failed, trying again (consider specifying --fixed-baud)" << std::endl;
        autobaud_interval = std::min(autobaud_max_interval, autobaud_interval * 2);
        autobaud_rate = autobaud_rates.begin();
    }

    baud_rate = *autobaud_rate;
    try_to_connect();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
testb $0x1, 0x318(%rax)
jne 0x36905
jmp 0x36a49
movq -0x60(%rbp), %rdi
addq $0x338, %rdi            # imm = 0x338
callq 0x3afb0
movq -0x60(%rbp), %rdi
movq %rax, -0x68(%rbp)
addq $0x320, %rdi            # imm = 0x320
callq 0x3afd0
movq -0x68(%rbp), %rdi
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rsi
callq 0x3af70
testb $0x1, %al
jne 0x36943
jmp 0x36a27
movq -0x60(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x30(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq *%rax
movq -0x78(%rbp), %rsi
movq 0xd4675(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0x70(%rbp)
jmp 0x3696e
movq -0x70(%rbp), %rdi
leaq 0x7d9a0(%rip), %rsi     # 0xb4319
callq 0x12800
movq %rax, -0x80(%rbp)
jmp 0x36984
movq -0x80(%rbp), %rdi
movq 0xd4589(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x36996
leaq -0x30(%rbp), %rdi
callq 0x13198
movq -0x60(%rbp), %rdi
movq %rdi, %rax
addq $0x290, %rax            # imm = 0x290
movq %rax, -0x88(%rbp)
addq $0x348, %rdi            # imm = 0x348
movl $0x2, -0x4c(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x3b040
movq -0x88(%rbp), %rdi
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x3b000
movq -0x60(%rbp), %rdi
movq (%rax), %rax
movq %rax, 0x348(%rdi)
addq $0x320, %rdi            # imm = 0x320
callq 0x3a580
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movq %rcx, 0x338(%rax)
jmp 0x36a27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x13198
jmp 0x36a52
movq -0x60(%rbp), %rdi
addq $0x338, %rdi            # imm = 0x338
callq 0x3a5b0
movq -0x60(%rbp), %rdi
movl (%rax), %eax
movl %eax, 0x340(%rdi)
movq (%rdi), %rax
callq *0x28(%rax)
addq $0x90, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x12f70
nopl (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_serial.cc
// Function: beast::SerialInput::check_framing_errors()
void SerialInput::check_framing_errors(void) {
    if (!autobauding && !have_good_sync() && bad_bytes() > autobaud_restart_bytes) {
        if (!autobaud_rates.empty()) {
            // We did autobaud and picked a rate, but it's not really working, let's
            // restart autobauding.
            std::cerr << what() << ": too many framing errors seen, restarting autobauding" << std::endl;
            autobauding = true;
            advance_autobaud();
        } else {
            if (!warned_about_rate) {
                std::cerr << what() << ": many framing errors seen, is the baud rate (" << baud_rate << " bps) correct?" << std::endl;
                warned_about_rate = true;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
testb $0x1, 0x318(%rax)
jne 0x36c2d
movq -0x60(%rbp), %rdi
callq 0x3b090
testb $0x1, %al
jne 0x36c2d
movq -0x60(%rbp), %rdi
callq 0x3b0b0
movq -0x60(%rbp), %rcx
cmpl 0x29c(%rcx), %eax
jbe 0x36c2d
movq -0x60(%rbp), %rdi
addq $0x320, %rdi            # imm = 0x320
callq 0x3af30
testb $0x1, %al
jne 0x36b51
movq -0x60(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x28(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq *%rax
movq -0x70(%rbp), %rsi
movq 0xd44f2(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0x68(%rbp)
jmp 0x36af1
movq -0x68(%rbp), %rdi
leaq 0x7d860(%rip), %rsi     # 0xb435c
callq 0x12800
movq %rax, -0x78(%rbp)
jmp 0x36b07
movq -0x78(%rbp), %rdi
movq 0xd4406(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x36b19
leaq -0x28(%rbp), %rdi
callq 0x13198
movq -0x60(%rbp), %rdi
movb $0x1, 0x318(%rdi)
callq 0x368e0
jmp 0x36c2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x13198
jmp 0x36c36
movq -0x60(%rbp), %rax
testb $0x1, 0x440(%rax)
jne 0x36c29
movq -0x60(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x58(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq *%rax
movq -0x88(%rbp), %rsi
movq 0xd4450(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0x80(%rbp)
jmp 0x36b93
movq -0x80(%rbp), %rdi
leaq 0x7d7f5(%rip), %rsi     # 0xb4393
callq 0x12800
movq %rax, -0x90(%rbp)
jmp 0x36bac
movq -0x90(%rbp), %rdi
movq -0x60(%rbp), %rax
movl 0x340(%rax), %esi
callq 0x12b90
movq %rax, -0x98(%rbp)
jmp 0x36bcb
movq -0x98(%rbp), %rdi
leaq 0x7d7e9(%rip), %rsi     # 0xb43c2
callq 0x12800
movq %rax, -0xa0(%rbp)
jmp 0x36be7
movq -0xa0(%rbp), %rdi
movq 0xd4323(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x36bfc
leaq -0x58(%rbp), %rdi
callq 0x13198
movq -0x60(%rbp), %rax
movb $0x1, 0x440(%rax)
jmp 0x36c29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x13198
jmp 0x36c36
jmp 0x36c2b
jmp 0x36c2d
addq $0xa0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x12f70
nop
// File: flightaware[P]beast-splitter/beast_input_serial.cc
// Function: beast::SerialInput::saw_good_message()
void SerialInput::saw_good_message() {
    BeastInput::saw_good_message();

    if (autobauding && good_messages() >= autobaud_good_messages) {
        // Accept this rate
        std::cerr << what() << ": autobaud selected " << baud_rate << " bps" << std::endl;
        autobauding = false;
        autobaud_timer.cancel();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x1de20
movq -0x40(%rbp), %rax
testb $0x1, 0x318(%rax)
je 0x36dae
movq -0x40(%rbp), %rdi
callq 0x3b2d0
movq -0x40(%rbp), %rcx
cmpl 0x298(%rcx), %eax
jb 0x36dae
movq -0x40(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x28(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq *%rax
movq -0x50(%rbp), %rsi
movq 0xd42c5(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0x48(%rbp)
jmp 0x36d1e
movq -0x48(%rbp), %rdi
leaq 0x7d734(%rip), %rsi     # 0xb445d
callq 0x12800
movq %rax, -0x58(%rbp)
jmp 0x36d34
movq -0x58(%rbp), %rdi
movq -0x40(%rbp), %rax
movl 0x340(%rax), %esi
callq 0x12b90
movq %rax, -0x60(%rbp)
jmp 0x36d4d
movq -0x60(%rbp), %rdi
leaq 0x7d71a(%rip), %rsi     # 0xb4472
callq 0x12800
movq %rax, -0x68(%rbp)
jmp 0x36d63
movq -0x68(%rbp), %rdi
movq 0xd41aa(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x36d75
leaq -0x28(%rbp), %rdi
callq 0x13198
movq -0x40(%rbp), %rdi
movb $0x0, 0x318(%rdi)
addq $0x350, %rdi            # imm = 0x350
callq 0x212e0
jmp 0x36dae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x13198
jmp 0x36db4
addq $0x70, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x12f70
nopl (%rax)
// File: flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::try_to_connect()
void NetInput::try_to_connect(void) {
    auto self(shared_from_this());

    tcp::resolver::query query(host, port_or_service);
    resolver.async_resolve(query, [this, self](const boost::system::error_code &ec, tcp::resolver::iterator it) {
        if (!ec) {
            next_endpoint = it;
            try_next_endpoint();
        } else if (ec == boost::asio::error::operation_aborted) {
            return;
        } else {
            std::cerr << what() << ": could not resolve address: " << ec.message() << std::endl;
            connection_failed();
            return;
        }
    });
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
addq $0x8, %rsi
leaq -0x18(%rbp), %rdi
callq 0x212b0
movq -0xb8(%rbp), %rdx
movq %rdx, %rsi
addq $0x288, %rsi            # imm = 0x288
addq $0x2a8, %rdx            # imm = 0x2A8
leaq -0x88(%rbp), %rdi
movl $0x20, %ecx
callq 0x487a0
jmp 0x422a2
movq -0xb8(%rbp), %rax
movq %rax, %rcx
addq $0x2c8, %rcx            # imm = 0x2C8
movq %rcx, -0xc0(%rbp)
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x21400
movq -0xc0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x42370
jmp 0x422ed
leaq -0xb0(%rbp), %rdi
callq 0x423b0
leaq -0x88(%rbp), %rdi
callq 0x488b0
leaq -0x18(%rbp), %rdi
callq 0x21430
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x42355
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x423b0
leaq -0x88(%rbp), %rdi
callq 0x488b0
leaq -0x18(%rbp), %rdi
callq 0x21430
movq -0x90(%rbp), %rdi
callq 0x12f70
nopw (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::try_next_endpoint()
void NetInput::try_next_endpoint() {
    if (next_endpoint == tcp::resolver::iterator()) {
        // No more addresses to try
        connection_failed();
        return;
    }

    tcp::endpoint endpoint = *next_endpoint++;

    auto self(shared_from_this());
    socket.async_connect(endpoint, [this, self, endpoint](const boost::system::error_code &ec) {
        if (!ec) {
            connection_established(endpoint);
        } else if (ec == boost::asio::error::operation_aborted) {
            return;
        } else {
            std::cerr << what() << ": connection to " << endpoint << " failed: " << ec.message() << std::endl;
            socket.close();
            try_next_endpoint();
        }
    });
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
addq $0x3d0, %rax            # imm = 0x3D0
movq %rax, -0xc0(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x48700
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x488f0
movb %al, -0xa9(%rbp)
jmp 0x42422
leaq -0x20(%rbp), %rdi
callq 0x48730
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x42437
jmp 0x42462
movq -0xc8(%rbp), %rdi
callq 0x1d1a0
jmp 0x42547
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x48730
jmp 0x42588
movq -0xc8(%rbp), %rsi
addq $0x3d0, %rsi            # imm = 0x3D0
leaq -0x60(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
xorl %edx, %edx
callq 0x48920
movq -0xd8(%rbp), %rdi
callq 0x489a0
movq %rax, -0xd0(%rbp)
jmp 0x42497
movq -0xd0(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x489c0
jmp 0x424a9
leaq -0x60(%rbp), %rdi
callq 0x48730
movq -0xc8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x212b0
movq -0xc8(%rbp), %rax
movq -0xf0(%rbp), %rsi
movq %rax, %rcx
addq $0x310, %rcx            # imm = 0x310
movq %rcx, -0xe8(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x21400
leaq -0x90(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movq %rsi, -0xe0(%rbp)
callq 0x489f0
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x425a0
jmp 0x42532
leaq -0xa8(%rbp), %rdi
callq 0x42640
leaq -0x70(%rbp), %rdi
callq 0x21430
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x48730
jmp 0x42588
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x42640
leaq -0x70(%rbp), %rdi
callq 0x21430
movq -0x28(%rbp), %rdi
callq 0x12f70
nopw %cs:(%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::connection_established(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const&)
void NetInput::connection_established(const tcp::endpoint &endpoint) {
    std::cerr << what() << ": connected to " << endpoint << std::endl;

    BeastInput::connection_established();
    warned_about_framing = false;
    start_reading();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x68(%rbp)
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x30(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq *%rax
movq -0x60(%rbp), %rsi
movq 0xc8941(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0x58(%rbp)
jmp 0x426a2
movq -0x58(%rbp), %rdi
leaq 0x7204c(%rip), %rsi     # 0xb46f9
callq 0x12800
movq %rax, -0x70(%rbp)
jmp 0x426b8
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x48a20
movq %rax, -0x78(%rbp)
jmp 0x426cb
movq -0x78(%rbp), %rdi
movq 0xc8842(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x426dd
leaq -0x30(%rbp), %rdi
callq 0x13198
movq -0x68(%rbp), %rdi
callq 0x1ccf0
movq -0x68(%rbp), %rax
movb $0x0, 0x3f8(%rax)
leaq -0x50(%rbp), %rdi
callq 0x26710
movq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x42740
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x13198
movq -0x38(%rbp), %rdi
callq 0x12f70
nopw (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::low_level_write(std::shared_ptr<std::vector<unsigned char, std::allocator<unsigned char>>>)
bool NetInput::low_level_write(std::shared_ptr<helpers::bytebuf> message) {
    if (!socket.is_open())
        return false;

    auto self(shared_from_this());
    boost::asio::async_write(socket, boost::asio::buffer(*message), [this, self, message](boost::system::error_code ec, std::size_t len) {
        if (ec)
            handle_error(ec);
    });
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x80(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x78(%rbp)
addq $0x310, %rdi            # imm = 0x310
callq 0x48af0
testb $0x1, %al
jne 0x429f8
movb $0x0, -0x1(%rbp)
jmp 0x42ab4
movq -0x78(%rbp), %rsi
addq $0x8, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x212b0
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rdi
addq $0x310, %rax            # imm = 0x310
movq %rax, -0x88(%rbp)
callq 0x3aeb0
movq %rax, %rdi
callq 0x3ae40
movq -0x90(%rbp), %rsi
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x21400
movq -0x80(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x214c0
movq -0x88(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x42ad0
jmp 0x42a7c
leaq -0x60(%rbp), %rdi
callq 0x42b30
movb $0x1, -0x1(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x21430
jmp 0x42ab4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x42b30
leaq -0x28(%rbp), %rdi
callq 0x21430
jmp 0x42ac2
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x12f70
nopl (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::handle_error(boost::system::error_code const&)
void NetInput::handle_error(const boost::system::error_code &ec) {
    if (ec == boost::asio::error::operation_aborted)
        return;

    std::cerr << what() << ": i/o error: " << ec.message() << std::endl;
    connection_failed();

    if (socket.is_open()) {
        boost::system::error_code ignored;
        socket.close(ignored);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x7d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3ace0
movq -0x98(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3aee0
testb $0x1, %al
jne 0x42bb1
jmp 0x42bb6
jmp 0x42cdb
movq -0xa0(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x40(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq *%rax
movq -0xb0(%rbp), %rsi
movq 0xc83f9(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0xa8(%rbp)
jmp 0x42bed
movq -0xa8(%rbp), %rdi
leaq 0x71710(%rip), %rsi     # 0xb430b
callq 0x12800
movq %rax, -0xb8(%rbp)
jmp 0x42c09
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x21130
jmp 0x42c18
movq -0xb8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x12770
movq %rax, -0xc0(%rbp)
jmp 0x42c31
movq -0xc0(%rbp), %rdi
movq 0xc82d9(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x42c46
leaq -0x70(%rbp), %rdi
callq 0x13198
leaq -0x40(%rbp), %rdi
callq 0x13198
movq -0xa0(%rbp), %rdi
callq 0x1d1a0
movq -0xa0(%rbp), %rdi
addq $0x310, %rdi            # imm = 0x310
callq 0x48af0
testb $0x1, %al
jne 0x42c7d
jmp 0x42cdb
leaq -0x80(%rbp), %rdi
callq 0x26710
movq -0xa0(%rbp), %rdi
addq $0x310, %rdi            # imm = 0x310
leaq -0x80(%rbp), %rsi
callq 0x48b30
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
jmp 0x42cdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x42cd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x13198
leaq -0x40(%rbp), %rdi
callq 0x13198
jmp 0x42ce4
addq $0xc0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x12f70
nopl (%rax)
// File: flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::check_framing_errors()
void NetInput::check_framing_errors(void) {
    if (!have_good_sync() && bad_bytes() > 20) {
        if (!warned_about_framing) {
            std::cerr << what() << ": framing errors seen, is the peer sending Beast binary data?" << std::endl;
            warned_about_framing = true;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x3b090
testb $0x1, %al
jne 0x42db6
movq -0x40(%rbp), %rdi
callq 0x3b0b0
cmpl $0x14, %eax
jbe 0x42db6
movq -0x40(%rbp), %rax
testb $0x1, 0x3f8(%rax)
jne 0x42db4
movq -0x40(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x28(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq *%rax
movq -0x50(%rbp), %rsi
movq 0xc8284(%rip), %rdi     # 0x10afd8
callq 0x12770
movq %rax, -0x48(%rbp)
jmp 0x42d5f
movq -0x48(%rbp), %rdi
leaq 0x7199f(%rip), %rsi     # 0xb4709
callq 0x12800
movq %rax, -0x58(%rbp)
jmp 0x42d75
movq -0x58(%rbp), %rdi
movq 0xc8198(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x42d87
leaq -0x28(%rbp), %rdi
callq 0x13198
movq -0x40(%rbp), %rax
movb $0x1, 0x3f8(%rax)
jmp 0x42db4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x13198
jmp 0x42dbc
jmp 0x42db6
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x12f70
nopw %cs:(%rax,%rax)
// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::read_commands()
void SocketOutput::read_commands() {
        auto self(shared_from_this());
        auto buf = std::make_shared<std::vector<std::uint8_t>>(512);

        socket.async_read_some(asio::buffer(*buf), [this, self, buf](const boost::system::error_code &ec, std::size_t len) {
            if (ec) {
                handle_error(ec);
            } else {
                buf->resize(len);
                process_commands(*buf);
                read_commands();
            }
        });
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x80(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x5a340
movl $0x200, -0x2c(%rbp)     # imm = 0x200
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x5a370
jmp 0x4fe66
movq -0x80(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x88(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x3aeb0
movq %rax, %rdi
callq 0x3ae40
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x5a3e0
movq -0x90(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x214c0
movq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x4ff40
jmp 0x4fed3
leaq -0x78(%rbp), %rdi
callq 0x4ff90
leaq -0x28(%rbp), %rdi
callq 0x214f0
leaq -0x18(%rbp), %rdi
callq 0x5a410
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4ff23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x4ff90
leaq -0x28(%rbp), %rdi
callq 0x214f0
leaq -0x18(%rbp), %rdi
callq 0x5a410
movq -0x38(%rbp), %rdi
callq 0x12f70
nopw %cs:(%rax,%rax)
// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::process_commands(std::vector<unsigned char, std::allocator<unsigned char>>)
void SocketOutput::process_commands(std::vector<std::uint8_t> data) {
        bool got_a_command = false;

        for (auto p = data.begin(); p != data.end(); ++p) {
            switch (state) {
            case ParserState::FIND_1A:
                if (*p == 0x1A)
                    state = ParserState::READ_1;
                break;

            case ParserState::READ_1:
                if (*p == 0x31)
                    state = ParserState::READ_OPTION;
                else
                    state = ParserState::FIND_1A;
                break;

            case ParserState::READ_OPTION:
                process_option_command(*p);
                got_a_command = true;
                state = ParserState::FIND_1A;
                break;
            }
        }

        if (got_a_command) {
            // just do this once at the end, not on every command
            std::cerr << peer << ": settings changed to " << settings << std::endl;
            if (settings_notifier)
                settings_notifier(settings);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, %rax
movq -0x40(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x1c410
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1c260
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5a430
testb $0x1, %al
jne 0x50017
jmp 0x500c7
movq -0x30(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x44(%rbp)
testl %eax, %eax
je 0x5003e
jmp 0x5002a
movl -0x44(%rbp), %eax
subl $0x1, %eax
je 0x5005f
jmp 0x50034
movl -0x44(%rbp), %eax
subl $0x2, %eax
je 0x50090
jmp 0x500b7
leaq -0x20(%rbp), %rdi
callq 0x1c660
movzbl (%rax), %eax
cmpl $0x1a, %eax
jne 0x5005d
movq -0x30(%rbp), %rax
movl $0x1, 0x8c(%rax)
jmp 0x500b7
leaq -0x20(%rbp), %rdi
callq 0x1c660
movzbl (%rax), %eax
cmpl $0x31, %eax
jne 0x50080
movq -0x30(%rbp), %rax
movl $0x2, 0x8c(%rax)
jmp 0x5008e
movq -0x30(%rbp), %rax
movl $0x0, 0x8c(%rax)
jmp 0x500b7
leaq -0x20(%rbp), %rdi
callq 0x1c660
movq -0x30(%rbp), %rdi
movzbl (%rax), %esi
callq 0x50150
movq -0x30(%rbp), %rax
movb $0x1, -0x11(%rbp)
movl $0x0, 0x8c(%rax)
jmp 0x500b9
leaq -0x20(%rbp), %rdi
callq 0x5a470
jmp 0x4fff4
testb $0x1, -0x11(%rbp)
je 0x50144
movq -0x30(%rbp), %rsi
addq $0x70, %rsi
movq 0xbaefc(%rip), %rdi     # 0x10afd8
callq 0x48a20
movq %rax, %rdi
leaq 0x64e49(%rip), %rsi     # 0xb4f34
callq 0x12800
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x90, %rsi
callq 0x1ac40
movq %rax, %rdi
movq 0xbae0b(%rip), %rsi     # 0x10af18
callq 0x128b0
movq -0x30(%rbp), %rdi
addq $0xc0, %rdi
callq 0x5a490
testb $0x1, %al
jne 0x50128
jmp 0x50142
movq -0x30(%rbp), %rsi
movq %rsi, %rdi
addq $0xc0, %rdi
addq $0x90, %rsi
callq 0x5a4c0
jmp 0x50144
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::write_avr(std::vector<unsigned char, std::allocator<unsigned char>> const&)
void SocketOutput::write_avr(const helpers::bytebuf &data) {
        prepare_write();

        outbuf->push_back((std::uint8_t)'*');
        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 $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x50d30
movq -0x40(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3b1a0
movq %rax, %rdi
movb $0x2a, -0x11(%rbp)
leaq -0x11(%rbp), %rsi
callq 0x1c010
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x13e30
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x13e60
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x13e90
testb $0x1, %al
jne 0x50ca2
jmp 0x50cd7
leaq -0x28(%rbp), %rdi
callq 0x13ed0
movq -0x40(%rbp), %rdi
movb (%rax), %al
movb %al, -0x31(%rbp)
addq $0x100, %rdi            # imm = 0x100
callq 0x3aeb0
movq %rax, %rdi
movzbl -0x31(%rbp), %esi
callq 0x510c0
leaq -0x28(%rbp), %rdi
callq 0x13ef0
jmp 0x50c8f
movq -0x40(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3b1a0
movq %rax, %rdi
movb $0x3b, -0x32(%rbp)
leaq -0x32(%rbp), %rsi
callq 0x1c010
movq -0x40(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3b1a0
movq %rax, %rdi
movb $0xa, -0x33(%rbp)
leaq -0x33(%rbp), %rsi
callq 0x1c010
movq -0x40(%rbp), %rdi
callq 0x50db0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::flush_outbuf()
void SocketOutput::flush_outbuf() {
        if (!outbuf || outbuf->empty())
            return;

        std::shared_ptr<helpers::bytebuf> writebuf;
        writebuf.swap(outbuf);

        auto self(shared_from_this());
        async_write(socket, boost::asio::buffer(*writebuf), [this, self, writebuf](const boost::system::error_code &ec, size_t len) {
            // NB: we only reset the pending flag here,
            // because async_write is a composed operation
            // that might take a while to complete, and
            // if we do another write before it completes
            // then it might interleave data.
            flush_pending = false;

            if (!outbuf) {
                writebuf->clear();
                outbuf = writebuf;
            }

            if (ec)
                handle_error(ec);
        });
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
addq $0x100, %rdi            # imm = 0x100
callq 0x3b180
testb $0x1, %al
jne 0x50ec9
jmp 0x50ee7
movq -0x78(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x3b1a0
movq %rax, %rdi
callq 0x5a7b0
testb $0x1, %al
jne 0x50ee7
jmp 0x50eec
jmp 0x50fa8
leaq -0x18(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x3b120
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x100, %rsi            # imm = 0x100
callq 0x3b140
movq -0x78(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x5a340
jmp 0x50f1c
movq -0x78(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x88(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x3aeb0
movq %rax, %rdi
callq 0x3ae40
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5a3e0
movq -0x90(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x214c0
movq -0x88(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x48(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x50ff0
jmp 0x50f8d
leaq -0x70(%rbp), %rdi
callq 0x51050
leaq -0x28(%rbp), %rdi
callq 0x5a410
leaq -0x18(%rbp), %rdi
callq 0x214f0
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x50fdd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x51050
leaq -0x28(%rbp), %rdi
callq 0x5a410
leaq -0x18(%rbp), %rdi
callq 0x214f0
movq -0x30(%rbp), %rdi
callq 0x12f70
nop
// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::handle_error(boost::system::error_code const&)
void SocketOutput::handle_error(const boost::system::error_code &ec) {
        if (ec == boost::asio::error::eof) {
            std::cerr << peer << ": connection closed" << std::endl;
        } else if (ec != boost::asio::error::operation_aborted) {
            std::cerr << peer << ": connection error: " << ec.message() << std::endl;
        }

        close();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5a8d0
movq -0x68(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3aee0
testb $0x1, %al
jne 0x51178
jmp 0x511af
movq -0x70(%rbp), %rsi
addq $0x70, %rsi
movq 0xb9e51(%rip), %rdi     # 0x10afd8
callq 0x48a20
movq %rax, %rdi
leaq 0x63db5(%rip), %rsi     # 0xb4f4b
callq 0x12800
movq %rax, %rdi
movq 0xb9d73(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x5126c
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x7d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3ace0
movq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3acb0
testb $0x1, %al
jne 0x511df
jmp 0x5126a
movq -0x70(%rbp), %rsi
addq $0x70, %rsi
movq 0xb9dea(%rip), %rdi     # 0x10afd8
callq 0x48a20
movq %rax, %rdi
leaq 0x63d62(%rip), %rsi     # 0xb4f5f
callq 0x12800
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x21130
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x12770
movq %rax, -0x80(%rbp)
jmp 0x51236
movq -0x80(%rbp), %rdi
movq 0xb9cd7(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x51248
leaq -0x50(%rbp), %rdi
callq 0x13198
jmp 0x5126a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x13198
jmp 0x5127e
jmp 0x5126c
movq -0x70(%rbp), %rdi
callq 0x51290
addq $0x90, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x12f70
nopw (%rax,%rax)
// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketListener::start()
void SocketListener::start() {
        acceptor.open(endpoint.protocol());
        acceptor.set_option(asio::socket_base::reuse_address(true));
        acceptor.set_option(tcp::acceptor::reuse_address(true));

        // We are v6 aware and bind separately to v4 and v6 addresses
        if (endpoint.protocol() == tcp::v6())
            acceptor.set_option(asio::ip::v6_only(true));

        acceptor.bind(endpoint);
        acceptor.listen();
        accept_connection();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
addq $0x68, %rdi
callq 0x4b4d0
movq -0x40(%rbp), %rdi
movl %eax, -0xc(%rbp)
leaq -0xc(%rbp), %rsi
callq 0x5aa40
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5ab20
movq -0x38(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x5aab0
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
leaq -0x14(%rbp), %rdi
movl $0x1, %esi
callq 0x5ab20
movq -0x30(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x5aab0
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x4b4d0
movl %eax, -0x18(%rbp)
callq 0x4b660
movl %eax, -0x1c(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x5ab50
testb $0x1, %al
jne 0x51481
jmp 0x514a8
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x5abe0
movq -0x48(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x5ab70
movq -0x28(%rbp), %rsi
movq %rsi, %rdi
addq $0x18, %rdi
addq $0x68, %rsi
callq 0x5ac10
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x5ac80
movq -0x28(%rbp), %rdi
callq 0x514e0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketListener::accept_connection()
void SocketListener::accept_connection() {
        auto self(shared_from_this());

        acceptor.async_accept(socket, peer, [this, self](const boost::system::error_code &ec) {
            if (!ec) {
                std::cerr << endpoint << ": accepted a connection from " << peer << " with settings " << initial_settings << std::endl;
                SocketOutput::pointer new_output = SocketOutput::create(service, std::move(socket), initial_settings);

                modes::FilterDistributor::handle h = distributor.add_client(std::bind(&SocketOutput::write, new_output, std::placeholders::_1), initial_settings.to_filter());

                new_output->set_settings_notifier([this, self, h](const Settings &newsettings) { distributor.update_client_filter(h, newsettings.to_filter()); });

                new_output->set_close_notifier([this, self, h] { distributor.remove_client(h); });

                new_output->start();
            } else {
                if (ec == boost::system::errc::operation_canceled)
                    return;
                std::cerr << endpoint << ": accept error: " << ec.message() << std::endl;
            }

            accept_connection();
        });
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x68(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x5ad60
movq -0x68(%rbp), %rax
movq -0x60(%rbp), %rsi
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, -0x58(%rbp)
movq %rax, %rcx
addq $0x88, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, %rcx
addq $0xd8, %rcx
movq %rcx, -0x48(%rbp)
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5ad90
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x515e0
jmp 0x51554
leaq -0x30(%rbp), %rdi
callq 0x51630
leaq -0x18(%rbp), %rdi
callq 0x5adc0
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x51630
leaq -0x18(%rbp), %rdi
callq 0x5adc0
movq -0x38(%rbp), %rdi
callq 0x12f70
nopw %cs:(%rax,%rax)