LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/flightaware[P]beast-splitter/beast_input.cc
// Function: beast::BeastInput::send_settings_message()
void BeastInput::send_settings_message() {
    // apply fixed settings, let the filter set anything else that's not fixed
    Settings settings = fixed_settings | Settings(filter);

    // some hardcoded things we expect
    settings.radarcape = (receiver_type == ReceiverType::RADARCAPE);
    settings.binary_format = true;

    // subclass-specific settings
    apply_connection_settings(settings);

    // did anything actually change?
    if (settings == current_settings)
        return;

    // send it
    auto message = std::make_shared<helpers::bytebuf>(settings.to_message());
    if (low_level_write(message)) {
        std::cerr << what() << ": configured with settings: " << settings << std::endl;
        current_settings = settings;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %r14
leaq 0x54(%rdi), %rbx
leaq 0xb4(%rdi), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x116dc
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x118c2
xorl %eax, %eax
cmpl $0x2, 0x50(%r14)
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, (%r12)
movl $0x1, 0x4(%r12)
movq (%r14), %rax
movq %r14, %rdi
movq %r12, %rsi
callq *0x40(%rax)
leaq 0x84(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x11d00
testb %al, %al
jne 0x1246a
leaq 0x20(%rsp), %r15
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x11a7c
movq %rsp, %rdi
movq %r15, %rsi
callq 0x139b4
leaq 0x20(%rsp), %rdi
callq 0x105fc
leaq 0x10(%rsp), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x14e7e
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x38(%rax)
movl %eax, %ebp
leaq 0x18(%rsp), %rdi
callq 0x14e02
testb %bpl, %bpl
je 0x12460
movq (%r14), %rax
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq *0x20(%rax)
movq 0x5abca(%rip), %rdi     # 0x6cfd8
leaq 0x20(%rsp), %rsi
callq 0xf590
leaq 0x30f21(%rip), %rsi     # 0x43340
movq %rax, %rdi
callq 0xf610
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x11d10
movq %rax, %rdi
callq 0xf310
leaq 0x20(%rsp), %rdi
callq 0xfd68
movups 0x50(%rsp), %xmm0
movups 0x60(%rsp), %xmm1
movups 0x70(%rsp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x8(%rsp), %rdi
callq 0x14e02
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x124aa
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x14e02
jmp 0x124aa
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x105fc
jmp 0x124b4
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xfd68
leaq 0x8(%rsp), %rdi
callq 0x14e02
movq %rbx, %rdi
callq 0xfba0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movb $0x0, 0x230(%rdi)
addq $0xe0, %rdi
callq 0x13916
leaq 0x8(%rbx), %rsi
leaq 0x38(%rsp), %rdi
callq 0x1824e
leaq 0x150(%rbx), %rdi
imulq $0xf4240, 0x18(%rbx), %rax # imm = 0xF4240
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
callq 0x13964
leaq 0x8(%rsp), %rdi
movq %rbx, -0x8(%rdi)
leaq 0x38(%rsp), %rsi
callq 0x14dce
movq 0x150(%rbx), %r14
movq %rsp, %rsi
movq %rsi, 0x20(%rsp)
pushq $0x70
popq %rdi
xorl %eax, %eax
callq 0x13dbd
movq %rax, %r15
movq %rax, 0x28(%rsp)
andq $0x0, (%rax)
leaq 0xace(%rip), %rax       # 0x13014
movq %rax, 0x8(%r15)
andl $0x0, 0x10(%r15)
andl $0x0, 0x18(%r15)
movb $0x0, 0x1c(%r15)
leaq 0x57c30(%rip), %rax     # 0x6a190
movq %rax, 0x20(%r15)
movaps (%rsp), %xmm0
movups %xmm0, 0x28(%r15)
movq 0x10(%rsp), %rax
andq $0x0, 0x10(%rsp)
movq %rax, 0x38(%r15)
andq $0x0, 0x8(%rsp)
leaq 0x190(%rbx), %rsi
leaq 0x158(%rbx), %r12
movq %r15, %rdi
addq $0x40, %rdi
callq 0x14776
movq %r15, 0x30(%rsp)
movb $0x1, 0x160(%rbx)
movq 0x58(%r14), %rdi
addq $0x28, %r14
addq $0x168, %rbx            # imm = 0x168
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x13d28
leaq 0x28(%rsp), %rax
leaq 0x10(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x20(%rsp), %rdi
callq 0x13004
movq %rbx, %rdi
callq 0x14e02
leaq 0x40(%rsp), %rdi
callq 0x14e02
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x13004
jmp 0x12612
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x14e02
jmp 0x12621
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x14e02
movq %rbx, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/flightaware[P]beast-splitter/beast_input_serial.cc
// Function: beast::SerialInput::SerialInput(boost::asio::io_context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, beast::Settings const&, modes::Filter const&)
SerialInput::SerialInput(boost::asio::io_service &service_, const std::string &path_, unsigned int fixed_baud_rate_, const Settings &fixed_settings_, const modes::Filter &filter_) : BeastInput(service_, fixed_settings_, filter_), path(path_), port(service_), autobaud_interval(autobaud_base_interval), autobaud_timer(service_), read_timer(service_), readbuf(std::make_shared<helpers::bytebuf>(read_buffer_size)), warned_about_rate(false) {
    // set up autobaud
    if (fixed_baud_rate_ == 0) {
        autobauding = true;
        autobaud_rates.assign(autobaud_standard_rates.begin(), autobaud_standard_rates.end());
        autobaud_rate = autobaud_rates.begin();
        baud_rate = *autobaud_rate;
    } else {
        autobauding = false;
        baud_rate = fixed_baud_rate_;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %r8, %rdx
movq %r9, %rcx
callq 0x11fd8
leaq 0x522dd(%rip), %rax     # 0x6aa60
movq %rax, (%rbx)
movabsq $0xf4240002dc6c0, %rax  # imm = 0xF4240002DC6C0
movq %rax, 0x27c(%rbx)
movq $0x3e8, 0x288(%rbx) # imm = 0x3E8
movq $0x3e80, 0x290(%rbx) # imm = 0x3E80
movabsq $0x3e800000004, %rax    # imm = 0x3E800000004
movq %rax, 0x298(%rbx)
movq $0x1000, 0x2a0(%rbx) # imm = 0x1000
movq $0x32, 0x2a8(%rbx)
leaq 0x2b0(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xf8f0
movq %r15, 0x10(%rsp)
leaq 0x2d0(%rbx), %r14
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1b43e
movq %r14, 0x8(%rsp)
leaq 0x320(%rbx), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x330(%rbx)
movups %xmm0, 0x320(%rbx)
movq 0x288(%rbx), %rax
movq %rax, 0x348(%rbx)
leaq 0x350(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x153cc
leaq 0x3c0(%rbx), %r14
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x153cc
leaq 0x2a0(%rbx), %rsi
leaq 0x430(%rbx), %rdi
movq %r15, %r12
callq 0x1a38b
movb $0x0, 0x440(%rbx)
testl %ebp, %ebp
je 0x1887c
movb $0x0, 0x318(%rbx)
jmp 0x188a9
leaq 0x27c(%rbx), %rsi
movb $0x1, 0x318(%rbx)
leaq 0x284(%rbx), %rdx
movq %r12, %rdi
callq 0x1b994
movq 0x320(%rbx), %rax
movq %rax, 0x338(%rbx)
movl (%rax), %ebp
movl %ebp, 0x340(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
leaq 0x438(%rbx), %rdi
callq 0x14e02
jmp 0x188d2
movq %rax, %rbp
movq %r14, %rdi
callq 0x14ec0
jmp 0x188df
movq %rax, %rbp
movq %r13, %rdi
callq 0x14ec0
jmp 0x188ec
movq %rax, %rbp
movq %r15, %rdi
callq 0x1b960
movq 0x8(%rsp), %rdi
callq 0x1b65e
jmp 0x18903
movq %rax, %rbp
movq 0x10(%rsp), %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0x13b92
movq %rbp, %rdi
callq 0xfba0
movq %rax, %rbp
jmp 0x1890d
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x7d
popq %rdi
callq 0x15246
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x1a65d
testb %al, %al
jne 0x18e4e
movq (%rbx), %rax
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x5425b(%rip), %rdi     # 0x6cfd8
movq %r15, %rsi
callq 0xf590
leaq 0x2b38f(%rip), %rsi     # 0x4411b
movq %rax, %rdi
callq 0xf610
movq %rax, %r15
movq 0x8(%r14), %rsi
movl (%r14), %edx
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x20(%rax)
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0xf590
movq %rax, %rdi
callq 0xf310
leaq 0x20(%rsp), %rdi
callq 0xfd68
movq %rsp, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0x124bc
leaq 0x350(%rbx), %rdi
callq 0x13916
leaq 0x3c0(%rbx), %rdi
callq 0x13916
cmpl $-0x1, 0x2d8(%rbx)
je 0x18e1a
movq %rsp, %rsi
andl $0x0, (%rsi)
leaq 0x2d0(%rbx), %rdi
movb $0x0, 0x4(%rsi)
leaq 0x5137f(%rip), %rax     # 0x6a190
movq %rax, 0x8(%rsi)
callq 0x1a63a
movq 0x320(%rbx), %rax
cmpq 0x328(%rbx), %rax
je 0x18e4e
movb $0x1, 0x318(%rbx)
movq 0x288(%rbx), %rcx
movq %rcx, 0x348(%rbx)
movq %rax, 0x338(%rbx)
movl (%rax), %eax
movl %eax, 0x340(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x18e69
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xfd68
jmp 0x18e6c
movq %rax, %rbx
movq %rsp, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x350, %rdi            # imm = 0x350
callq 0x13916
leaq 0x3c0(%rbx), %rdi
callq 0x13916
cmpl $-0x1, 0x2d8(%rbx)
je 0x19167
movq %rsp, %rsi
andl $0x0, (%rsi)
addq $0x2d0, %rbx            # imm = 0x2D0
movb $0x0, 0x4(%rsi)
leaq 0x51035(%rip), %rax     # 0x6a190
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0x1a63a
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl 0x2d8(%rdi), %ebp
cmpl $-0x1, %ebp
je 0x19262
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2d0(%rdi), %r12
leaq 0x8(%rdi), %rsi
movq %rsp, %rdi
callq 0x1824e
movq (%rbx), %rax
movq (%rax), %r13
movq 0x8(%rax), %r15
xorl %eax, %eax
subq %r13, %r15
cmoveq %rax, %r13
leaq 0x18(%rsp), %rdi
movq %r14, -0x8(%rdi)
movq %rsp, %rsi
callq 0x14dce
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14e7e
leaq 0x70(%rsp), %rbx
movq %r12, -0x28(%rbx)
movq %r13, -0x20(%rbx)
movq %r15, -0x18(%rbx)
andq $0x0, -0x10(%rbx)
andl $0x0, -0x8(%rbx)
movaps -0x18(%r14), %xmm0
movaps -0x8(%r14), %xmm1
andq $0x0, -0x10(%r14)
movups %xmm0, (%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r14)
movups %xmm1, 0x10(%rbx)
movq 0x8(%r14), %rax
andq $0x0, 0x8(%r14)
leaq 0x38(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, 0x20(%rbx)
movb $0x0, 0x4(%rsi)
leaq 0x50f5d(%rip), %rax     # 0x6a190
movq %rax, 0x8(%rsi)
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rcx
xorl %edx, %edx
callq 0x19936
movq %rbx, %rdi
callq 0x192a2
leaq 0x10(%rsp), %rdi
callq 0x192a2
leaq 0x8(%rsp), %rdi
callq 0x14e02
cmpl $-0x1, %ebp
setne %al
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x192a2
leaq 0x10(%rsp), %rdi
callq 0x192a2
leaq 0x8(%rsp), %rdi
callq 0x14e02
movq %r14, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
cmpb $0x1, 0x318(%rdi)
jne 0x1936d
movq %rdi, %rbx
movq 0x338(%rdi), %rax
addq $0x4, %rax
movq %rax, 0x338(%rdi)
cmpq 0x328(%rdi), %rax
jne 0x1935c
movq (%rbx), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x53cd2(%rip), %rdi     # 0x6cfd8
movq %r14, %rsi
callq 0xf590
leaq 0x2ae14(%rip), %rsi     # 0x44129
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
callq 0xf310
leaq 0x8(%rsp), %rdi
callq 0xfd68
movq 0x348(%rbx), %rcx
addq %rcx, %rcx
movq 0x290(%rbx), %rdx
movq 0x320(%rbx), %rax
cmpq %rdx, %rcx
cmovgeq %rdx, %rcx
movq %rcx, 0x348(%rbx)
movq %rax, 0x338(%rbx)
movl (%rax), %eax
movl %eax, 0x340(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
cmpb $0x0, 0x318(%rdi)
jne 0x19490
movq %rdi, %rbx
cmpb $0x0, 0x230(%rdi)
jne 0x19490
movl 0x238(%rbx), %eax
cmpl 0x29c(%rbx), %eax
jbe 0x19490
movq 0x320(%rbx), %rax
cmpq 0x328(%rbx), %rax
je 0x19422
movq (%rbx), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x53bf0(%rip), %rdi     # 0x6cfd8
movq %r14, %rsi
callq 0xf590
leaq 0x2ad75(%rip), %rsi     # 0x4416c
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
callq 0xf310
leaq 0x8(%rsp), %rdi
callq 0xfd68
movb $0x1, 0x318(%rbx)
movq %rbx, %rdi
callq 0x192bc
jmp 0x19490
cmpb $0x0, 0x440(%rbx)
jne 0x19490
movq (%rbx), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x53b95(%rip), %rdi     # 0x6cfd8
movq %r14, %rsi
callq 0xf590
leaq 0x2ad51(%rip), %rsi     # 0x441a3
movq %rax, %rdi
callq 0xf610
movl 0x340(%rbx), %esi
movq %rax, %rdi
callq 0xf480
leaq 0x2ad63(%rip), %rsi     # 0x441d2
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
callq 0xf310
leaq 0x8(%rsp), %rdi
callq 0xfd68
movb $0x1, 0x440(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x1949a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x12c4c
cmpb $0x1, 0x318(%rbx)
jne 0x19568
movl 0x234(%rbx), %eax
cmpl 0x298(%rbx), %eax
jb 0x19568
movq (%rbx), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x53acc(%rip), %rdi     # 0x6cfd8
movq %r14, %rsi
callq 0xf590
leaq 0x2ad52(%rip), %rsi     # 0x4426d
movq %rax, %rdi
callq 0xf610
movl 0x340(%rbx), %esi
movq %rax, %rdi
callq 0xf480
leaq 0x2ad4a(%rip), %rsi     # 0x44282
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
callq 0xf310
leaq 0x8(%rsp), %rdi
callq 0xfd68
movb $0x0, 0x318(%rbx)
addq $0x350, %rbx            # imm = 0x350
movq %rbx, %rdi
callq 0x13916
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq 0x30(%rsp), %rdi
callq 0x1824e
leaq 0x288(%rbx), %rsi
leaq 0x2a8(%rbx), %rdx
leaq 0x50(%rsp), %rdi
pushq $0x20
popq %rcx
callq 0x1ef4e
leaq 0x8(%rsp), %rdi
movq %rbx, -0x8(%rdi)
leaq 0x30(%rsp), %rsi
callq 0x14dce
movq 0x2c8(%rbx), %r14
movq %rsp, %rsi
movq %rsi, 0x18(%rsp)
movl $0x100, %edi            # imm = 0x100
xorl %eax, %eax
callq 0x13dbd
movq %rax, %r15
leaq 0x2d0(%rbx), %rsi
movq %rax, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x1f288
movq 0x28(%r14), %r13
andq $0x0, (%r15)
leaq 0xcd9(%rip), %rax       # 0x1d868
movq %rax, 0x8(%r15)
andl $0x0, 0x10(%r15)
andl $0x0, 0x18(%r15)
movb $0x0, 0x1c(%r15)
leaq 0x4d5e7(%rip), %rax     # 0x6a190
movq %rax, 0x20(%r15)
leaq 0x28(%r15), %rdi
movq %r12, %rsi
callq 0x1fc52
leaq 0x38(%r15), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1f2bc
movq %r13, 0xa8(%r15)
movaps (%rsp), %xmm0
movups %xmm0, 0xb0(%r15)
movq 0x10(%rsp), %rax
andq $0x0, 0x10(%rsp)
movq %rax, 0xc0(%r15)
andq $0x0, 0x8(%rsp)
addq $0x28, %r14
addq $0x2e0, %rbx            # imm = 0x2E0
movq %r15, %rdi
addq $0xc8, %rdi
movq %rbx, %rsi
callq 0x14776
andq $0x0, 0xf8(%r15)
movq %r15, 0x28(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x15392
movq %r14, %rdi
movq %r15, %rsi
callq 0x1f22e
leaq 0x20(%rsp), %rax
leaq 0x10(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x18(%rsp), %rdi
callq 0x1d858
movq %rbx, %rdi
callq 0x14e02
leaq 0x50(%rsp), %rdi
callq 0x1efba
leaq 0x38(%rsp), %rdi
callq 0x14e02
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x1cc96
movq %rax, %rbx
addq $0x30, %r15
movq %r15, %rdi
callq 0x15392
leaq 0x48(%rsp), %rdi
callq 0x15392
leaq 0x18(%rsp), %rdi
callq 0x1d858
jmp 0x1cca5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x14e02
leaq 0x50(%rsp), %rdi
callq 0x1efba
jmp 0x1ccbe
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x14e02
movq %rbx, %rdi
callq 0xfba0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x4fdbb(%rip), %rdi     # 0x6cfd8
movq %r15, %rsi
callq 0xf590
leaq 0x27325(%rip), %rsi     # 0x44551
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
movq %r14, %rsi
callq 0x1eff6
movq %rax, %rdi
callq 0xf310
movq %rsp, %r14
movq %r14, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0x12132
xorl %eax, %eax
movb %al, 0x3f8(%rbx)
andl $0x0, (%r14)
movb %al, 0x4(%r14)
leaq 0x4cf1f(%rip), %rax     # 0x6a190
movq %rax, 0x8(%r14)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1d29e
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x7d
popq %rdi
callq 0x15246
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x1a65d
testb %al, %al
jne 0x1d785
movq (%rbx), %rax
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x4f8db(%rip), %rdi     # 0x6cfd8
movq %r15, %rsi
callq 0xf590
leaq 0x26a0f(%rip), %rsi     # 0x4411b
movq %rax, %rdi
callq 0xf610
movq %rax, %r15
movq 0x8(%r14), %rsi
movl (%r14), %edx
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
callq *0x20(%rax)
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0xf590
movq %rax, %rdi
callq 0xf310
leaq 0x20(%rsp), %rdi
callq 0xfd68
movq %rsp, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0x124bc
cmpl $-0x1, 0x318(%rbx)
je 0x1d785
movq %rsp, %rsi
andl $0x0, (%rsi)
addq $0x310, %rbx            # imm = 0x310
movb $0x0, 0x4(%rsi)
leaq 0x4ca17(%rip), %rax     # 0x6a190
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0x1f09a
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1d7a0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xfd68
jmp 0x1d7a3
movq %rax, %rbx
movq %rsp, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
cmpb $0x0, 0x230(%rdi)
jne 0x1d821
movq %rdi, %rbx
cmpl $0x15, 0x238(%rdi)
jb 0x1d821
cmpb $0x0, 0x3f8(%rbx)
jne 0x1d821
movq (%rbx), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x4f7e7(%rip), %rdi     # 0x6cfd8
movq %r14, %rsi
callq 0xf590
leaq 0x26d61(%rip), %rsi     # 0x44561
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
callq 0xf310
leaq 0x8(%rsp), %rdi
callq 0xfd68
movb $0x1, 0x3f8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x26990
leaq 0x10(%rsp), %r14
movl $0x200, (%r14)          # imm = 0x200
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x2550b
leaq 0x40(%rsp), %r15
movq (%r15), %rax
movq (%rax), %rbp
movq 0x8(%rax), %r12
leaq 0x18(%rsp), %rdi
movq %rbx, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
callq 0x258ee
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x14e7e
movq 0x20(%rbx), %r13
movq %r14, 0x60(%rsp)
movl $0xb0, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x13dbd
movq %rax, %r14
xorl %eax, %eax
subq %rbp, %r12
cmovneq %rbp, %rax
sete %bpl
movq %r14, 0x68(%rsp)
movl 0x28(%rbx), %ecx
movb 0x2c(%rbx), %dl
andq $0x0, (%r14)
leaq 0x1bf8(%rip), %rsi      # 0x23416
movq %rsi, 0x8(%r14)
andl $0x0, 0x10(%r14)
movups 0x30(%r13), %xmm0
movups %xmm0, 0x18(%r14)
andq $0x0, 0x28(%r14)
leaq -0x1033(%rip), %rsi     # 0x2080a
movq %rsi, 0x30(%r14)
movl %ecx, 0x38(%r14)
movb %dl, 0x3c(%r14)
movq %rax, 0x40(%r14)
movq %r12, 0x48(%r14)
andl $0x0, 0x50(%r14)
leaq 0x40(%rbx), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x58(%r14)
xorps %xmm1, %xmm1
movaps 0x20(%rsp), %xmm0
movups %xmm1, 0x18(%rsp)
movups %xmm0, 0x68(%r14)
movq 0x30(%rsp), %rax
andq $0x0, 0x30(%rsp)
movq %rax, 0x78(%r14)
andq $0x0, 0x28(%rsp)
leaq 0x28(%rbx), %r15
leaq 0x28(%r13), %r12
movq %r14, %rdi
subq $-0x80, %rdi
callq 0x14776
movq %r14, 0x70(%rsp)
movb 0x2c(%rbx), %al
shrb $0x4, %al
andb %bpl, %al
movzbl %al, %eax
movl %eax, (%rsp)
pushq $0x1
popq %r9
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x20640
leaq 0x68(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x60(%rsp), %rdi
callq 0x23406
leaq 0x10(%rsp), %rdi
callq 0x2194a
leaq 0x48(%rsp), %rdi
callq 0x14e02
leaq 0x58(%rsp), %rdi
callq 0x14e02
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x23406
jmp 0x2191e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2194a
leaq 0x48(%rsp), %rdi
callq 0x14e02
jmp 0x21937
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x14e02
movq %rbx, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
xorl %eax, %eax
pushq $0x1
popq %rbp
cmpq 0x8(%r14), %r15
je 0x219c5
movl 0x8c(%rbx), %ecx
cmpl $0x2, %ecx
je 0x219aa
cmpl $0x1, %ecx
je 0x2199d
testl %ecx, %ecx
jne 0x219c0
cmpb $0x1a, (%r15)
movl %ebp, %ecx
je 0x219ba
jmp 0x219c0
xorl %ecx, %ecx
cmpb $0x31, (%r15)
sete %cl
addl %ecx, %ecx
jmp 0x219ba
movzbl (%r15), %esi
movq %rbx, %rdi
callq 0x21a34
movb $0x1, %al
xorl %ecx, %ecx
movl %ecx, 0x8c(%rbx)
incq %r15
jmp 0x21979
testb $0x1, %al
je 0x21a28
leaq 0x70(%rbx), %rsi
movq 0x4b604(%rip), %rdi     # 0x6cfd8
callq 0x1eff6
leaq 0x234d0(%rip), %rsi     # 0x44eb0
movq %rax, %rdi
callq 0xf610
leaq 0x90(%rbx), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x11d10
movq %rax, %rdi
callq 0xf310
cmpq $0x0, 0xd0(%rbx)
je 0x21a28
addq $0xc0, %rbx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2552a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::process_option_command(unsigned char)
void SocketOutput::process_option_command(uint8_t option) {
        char ch = (char)option;
        switch (ch) {
        case 'c':
        case 'C':
            settings.binary_format = (ch == 'C');
            break;
        case 'd':
        case 'D':
            settings.filter_11_17_18 = (ch == 'D');
            break;
        case 'e':
        case 'E':
            settings.avrmlat = (ch == 'E');
            break;
        case 'f':
        case 'F':
            settings.crc_disable = (ch == 'F');
            break;
        case 'g':
        case 'G':
            if (settings.radarcape)
                settings.gps_timestamps = (ch == 'G');
            else
                settings.filter_0_4_5 = (ch == 'G');
            break;
        case 'h':
        case 'H':
            settings.rts_handshake = (ch == 'H');
            break;
        case 'i':
        case 'I':
            settings.fec_disable = (ch == 'I');
            break;
        case 'j':
        case 'J':
            settings.modeac_enable = (ch == 'J');
            break;
        case 'v':
        case 'V':
            settings.verbatim = (ch == 'V');
            break;
        default:
            // unrecognized
            return;
        }
    }

// Assembly:
leal -0x43(%rsi), %eax
cmpl $0x27, %eax
ja 0x21b0e
leaq 0x231c9(%rip), %rcx     # 0x44c10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %eax, %eax
cmpb $0x43, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0x94(%rdi)
retq
xorl %eax, %eax
cmpb $0x49, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0xac(%rdi)
retq
xorl %eax, %eax
cmpb $0x48, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0xa8(%rdi)
retq
xorl %eax, %eax
cmpb $0x46, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0xa0(%rdi)
retq
xorl %eax, %eax
cmpb $0x47, %sil
sete %al
cmpl $0x0, 0x90(%rdi)
leal -0x1(%rax,%rax), %eax
jle 0x21b2a
movl %eax, 0xa4(%rdi)
retq
xorl %eax, %eax
cmpb $0x44, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0x98(%rdi)
retq
xorl %eax, %eax
cmpb $0x4a, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0xb0(%rdi)
retq
xorl %eax, %eax
cmpb $0x45, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0x9c(%rdi)
retq
cmpl $0x76, %esi
jne 0x21af6
xorl %eax, %eax
cmpb $0x56, %sil
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, 0xbc(%rdi)
retq
movl %eax, 0xb4(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketOutput::write_message(modes::MessageType, modes::TimestampType, unsigned long, unsigned char, std::vector<unsigned char, std::allocator<unsigned char>> const&)
void SocketOutput::write_message(modes::MessageType type, modes::TimestampType timestamp_type, std::uint64_t timestamp, std::uint8_t signal, const helpers::bytebuf &data) {
        if (timestamp_type == modes::TimestampType::TWELVEMEG && !settings.radarcape.off() && settings.gps_timestamps.on()) {
            // GPS timestamps were explicitly requested
            // scale 12MHz to pseudo-GPS
            std::uint64_t ns = timestamp * 1000ULL / 12ULL;
            std::uint64_t seconds = (ns / 1000000000ULL) % 86400;
            std::uint64_t nanos = ns % 1000000000ULL;
            timestamp = (seconds << 30) | nanos;
        } else if (timestamp_type == modes::TimestampType::GPS && (settings.radarcape.off() || settings.gps_timestamps.off())) {
            // beast output or 12MHz timestamps were explicitly requested
            // scale GPS to 12MHz
            std::uint64_t seconds = timestamp >> 30;
            std::uint64_t nanos = timestamp & 0x3FFFFFFF;
            std::uint64_t ns = seconds * 1000000000ULL + nanos;
            timestamp = ns * 12ULL / 1000ULL;
        }

        // if gps_timestamps is DONTCARE, we just use whatever is provided

        if (settings.binary_format) {
            write_binary(type, timestamp, signal, data);
        } else if (settings.avrmlat) {
            if (type != modes::MessageType::STATUS && type != modes::MessageType::POSITION)
                write_avrmlat(timestamp, data);
        } else {
            if (type != modes::MessageType::STATUS && type != modes::MessageType::POSITION)
                write_avr(data);
        }
    }

// Assembly:
cmpl $0x2, %edx
je 0x21ce6
cmpl $0x1, %edx
jne 0x21d1a
cmpl $0x0, 0x90(%rdi)
js 0x21d1a
cmpl $0x0, 0xa4(%rdi)
jle 0x21d1a
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
pushq $0xc
popq %r10
movq %rcx, %rax
xorl %edx, %edx
divq %r10
movq %rax, %r10
movabsq $0x2cb417800, %r11      # imm = 0x2CB417800
movq %rcx, %rax
xorl %edx, %edx
divq %r11
movl $0x15180, %ecx          # imm = 0x15180
xorl %edx, %edx
divl %ecx
movl $0x3b9aca00, %r11d      # imm = 0x3B9ACA00
movl %edx, %ecx
movq %r10, %rax
xorl %edx, %edx
divq %r11
shlq $0x1e, %rcx
orq %rdx, %rcx
jmp 0x21d1a
cmpl $0x0, 0x90(%rdi)
js 0x21cf8
cmpl $0x0, 0xa4(%rdi)
jns 0x21d1a
movq %rcx, %rax
shrq $0x1e, %rax
imulq $-0x4653600, %rax, %rax # imm = 0xFB9ACA00
addq %rcx, %rax
imulq $0xc, %rax, %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
cmpl $0x0, 0x94(%rdi)
js 0x21d34
movzbl %r8b, %eax
movq %rcx, %rdx
movl %eax, %ecx
movq %r9, %r8
jmp 0x21d5e
addl $-0x6, %esi
cmpl $0x0, 0x9c(%rdi)
js 0x21d50
cmpl $-0x3, %esi
ja 0x21d5d
movq %rcx, %rsi
movq %r9, %rdx
jmp 0x21e80
cmpl $-0x3, %esi
ja 0x21d5d
movq %r9, %rsi
jmp 0x21f80
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22004
movq 0x100(%rbx), %rdi
leaq 0x7(%rsp), %rsi
movb $0x1a, (%rsi)
callq 0x11ea8
movq 0x100(%rbx), %r13
movl %r12d, %edi
callq 0x25658
leaq 0x6(%rsp), %rsi
movb %al, (%rsi)
movq %r13, %rdi
callq 0x11ea8
cmpl $0x5, %r12d
je 0x21e48
movq 0x100(%rbx), %rdi
movq %r15, %rsi
shrq $0x28, %rsi
movl $0xff, %r12d
andl %r12d, %esi
callq 0x22286
movq 0x100(%rbx), %rdi
movq %r15, %rsi
shrq $0x20, %rsi
andl %r12d, %esi
callq 0x22286
movq 0x100(%rbx), %rdi
movl %r15d, %esi
shrl $0x18, %esi
callq 0x22286
movq 0x100(%rbx), %rdi
movl %r15d, %esi
shrl $0x10, %esi
andl %r12d, %esi
callq 0x22286
movq 0x100(%rbx), %rdi
movl %r15d, %esi
shrl $0x8, %esi
andl %r12d, %esi
callq 0x22286
movq 0x100(%rbx), %rdi
andl %r12d, %r15d
movl %r15d, %esi
callq 0x22286
movq 0x100(%rbx), %rdi
movzbl %bpl, %esi
callq 0x22286
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x21e69
movzbl (%r15), %esi
movq 0x100(%rbx), %rdi
callq 0x22286
incq %r15
jmp 0x21e4f
movq %rbx, %rdi
callq 0x2205c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x22004
movq 0x100(%rbx), %rdi
leaq 0x7(%rsp), %rsi
movb $0x40, (%rsi)
callq 0x11ea8
movq 0x100(%rbx), %rdi
movq %r15, %rsi
shrq $0x28, %rsi
movl $0xff, %ebp
andl %ebp, %esi
callq 0x222bb
movq 0x100(%rbx), %rdi
movq %r15, %rsi
shrq $0x20, %rsi
andl %ebp, %esi
callq 0x222bb
movq 0x100(%rbx), %rdi
movl %r15d, %esi
shrl $0x18, %esi
callq 0x222bb
movq 0x100(%rbx), %rdi
movl %r15d, %esi
shrl $0x10, %esi
andl %ebp, %esi
callq 0x222bb
movq 0x100(%rbx), %rdi
movl %r15d, %esi
shrl $0x8, %esi
andl %ebp, %esi
callq 0x222bb
movq 0x100(%rbx), %rdi
andl %ebp, %r15d
movl %r15d, %esi
callq 0x222bb
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x21f45
movzbl (%r15), %esi
movq 0x100(%rbx), %rdi
callq 0x222bb
incq %r15
jmp 0x21f2b
movq 0x100(%rbx), %rdi
leaq 0x6(%rsp), %rsi
movb $0x3b, (%rsi)
callq 0x11ea8
movq 0x100(%rbx), %rdi
leaq 0x5(%rsp), %rsi
movb $0xa, (%rsi)
callq 0x11ea8
movq %rbx, %rdi
callq 0x2205c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x22004
movq 0x100(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movb $0x2a, (%rsi)
callq 0x11ea8
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x21fc9
movzbl (%r15), %esi
movq 0x100(%rbx), %rdi
callq 0x222bb
incq %r15
jmp 0x21faf
movq 0x100(%rbx), %rdi
leaq 0xe(%rsp), %rsi
movb $0x3b, (%rsi)
callq 0x11ea8
movq 0x100(%rbx), %rdi
leaq 0xd(%rsp), %rsi
movb $0xa, (%rsi)
callq 0x11ea8
movq %rbx, %rdi
callq 0x2205c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x2
popq %rdi
callq 0x1b3fd
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x1a65d
testb %al, %al
je 0x2235c
leaq 0x70(%rbx), %rsi
movq 0x4ac9a(%rip), %rdi     # 0x6cfd8
callq 0x1eff6
leaq 0x22b7d(%rip), %rsi     # 0x44ec7
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
callq 0xf310
jmp 0x223ca
pushq $0x7d
popq %rdi
callq 0x15246
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x1a5ec
testb %al, %al
je 0x223ca
leaq 0x70(%rbx), %rsi
movq 0x4ac53(%rip), %rdi     # 0x6cfd8
callq 0x1eff6
leaq 0x22b4a(%rip), %rsi     # 0x44edb
movq %rax, %rdi
callq 0xf610
movq %rax, %r15
movq 0x8(%r14), %rsi
movl (%r14), %edx
movq (%rsi), %rax
movq %rsp, %r14
movq %r14, %rdi
callq *0x20(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0xf590
movq %rax, %rdi
callq 0xf310
movq %rsp, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0x223f0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xfd68
movq %rbx, %rdi
callq 0xfba0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
leaq 0x68(%rdi), %r15
xorl %eax, %eax
cmpw $0x2, 0x68(%rdi)
setne %al
leal 0x2(,%rax,8), %eax
leaq 0xc(%rsp), %r12
movl %eax, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x25686
pushq $0x1
popq %rbp
movl %ebp, (%r12)
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x256ca
movl %ebp, (%r12)
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x256ca
cmpw $0x2, 0x68(%rbx)
je 0x22564
leaq 0xc(%rsp), %rsi
movl $0x1, (%rsi)
movq %r14, %rdi
callq 0x2570e
movq %r14, %rdi
movq %r15, %rsi
callq 0x25752
movq %r14, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x25796
movq %rbx, %rdi
callq 0x22592
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26c66
leaq 0x8(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq %r14, %rsi
callq 0x25fde
movq 0x18(%rbx), %r14
movq %rsp, %rsi
movq %rsi, 0x20(%rsp)
movl $0xb0, %edi
xorl %eax, %eax
callq 0x13dbd
movq %rax, %r15
movq %rax, 0x28(%rsp)
movl 0x20(%rbx), %eax
movb 0x24(%rbx), %cl
andq $0x0, (%r15)
leaq 0x1842(%rip), %rdx      # 0x23e34
movq %rdx, 0x8(%r15)
andl $0x0, 0x10(%r15)
movups 0x30(%r14), %xmm0
movups %xmm0, 0x18(%r15)
andq $0x0, 0x28(%r15)
leaq 0xd8(%rbx), %rdx
leaq 0x37b2(%rip), %rsi      # 0x25dca
movq %rsi, 0x30(%r15)
movl %eax, 0x38(%r15)
movb %cl, 0x3c(%r15)
orl $-0x1, 0x40(%r15)
leaq 0x88(%rbx), %rax
movq %rax, 0x48(%r15)
movl 0x30(%rbx), %eax
movl %eax, 0x50(%r15)
movq %rdx, 0x58(%r15)
movq $0x1c, 0x60(%r15)
movaps (%rsp), %xmm0
movups %xmm0, 0x68(%r15)
movq 0x10(%rsp), %rax
andq $0x0, 0x10(%rsp)
movq %rax, 0x78(%r15)
andq $0x0, 0x8(%rsp)
leaq 0x20(%rbx), %r12
leaq 0x38(%rbx), %rsi
movq %r15, %rdi
subq $-0x80, %rdi
callq 0x14776
addq $0x28, %r14
movq %r15, 0x30(%rsp)
xorl %r8d, %r8d
cmpl $-0x1, 0x90(%rbx)
setne %r8b
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x25bc0
leaq 0x28(%rsp), %rax
leaq 0x10(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x20(%rsp), %rdi
callq 0x23e24
movq %rbx, %rdi
callq 0x14e02
leaq 0x40(%rsp), %rdi
callq 0x14e02
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e24
jmp 0x226ea
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x14e02
leaq 0x40(%rsp), %rdi
callq 0x14e02
movq %rbx, %rdi
callq 0xfba0
// File: /workspace/github_cpp_makefile_star2_O2/flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketConnector::close()
void SocketConnector::close() {
        running = false;
        resolver.cancel();
        reconnect_timer.cancel();
        socket.close();
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x1a0(%rdi)
addq $0x20, %rdi
callq 0x25824
leaq 0xb8(%rbx), %rdi
callq 0x13916
addq $0x68, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x201a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketConnector::schedule_reconnect()
void SocketConnector::schedule_reconnect() {
        if (running) {
            std::cerr << host << ":" << port_or_service << ": reconnecting in " << std::chrono::duration_cast<std::chrono::seconds>(reconnect_interval).count() << " seconds" << std::endl;

            auto self(shared_from_this());
            reconnect_timer.expires_from_now(reconnect_interval);
            reconnect_timer.async_wait(std::bind(&SocketConnector::resolve_and_connect, self, std::placeholders::_1));
        }
    }

// Assembly:
pushq %rbx
subq $0x30, %rsp
cmpb $0x1, 0x1a0(%rdi)
jne 0x230f3
movq %rdi, %rbx
leaq 0x128(%rdi), %rsi
movq 0x49faf(%rip), %rdi     # 0x6cfd8
callq 0xf590
leaq 0x1ffd1(%rip), %rsi     # 0x43006
movq %rax, %rdi
callq 0xf610
leaq 0x148(%rbx), %rsi
movq %rax, %rdi
callq 0xf590
leaq 0x21f01(%rip), %rsi     # 0x44f54
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
movq 0x10(%rbx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rsi
callq 0xf5f0
leaq 0x21eec(%rip), %rsi     # 0x44f67
movq %rax, %rdi
callq 0xf610
movq %rax, %rdi
callq 0xf310
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x26ddc
imulq $0xf4240, 0x10(%rbx), %rax # imm = 0xF4240
addq $0xb8, %rbx
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x13964
leaq -0x836(%rip), %rax      # 0x22886
leaq 0x20(%rsp), %rdi
movq %rax, -0x10(%rdi)
andq $0x0, -0x8(%rdi)
movq %rsp, %rsi
callq 0x25ff2
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x25830
leaq 0x28(%rsp), %rdi
callq 0x14e02
leaq 0x8(%rsp), %rdi
callq 0x14e02
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x14e02
jmp 0x2310b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x14e02
movq %rbx, %rdi
callq 0xfba0
nop