// File: 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
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0xd8(%rbp)
movq %rsi, %rax
addq $0x54, %rax
movq %rax, -0xe0(%rbp)
addq $0xb4, %rsi
leaq -0x68(%rbp), %rdi
callq 0x19a70
movq -0xe0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x19f70
movq -0xd8(%rbp), %rax
cmpl $0x2, 0x50(%rax)
sete %al
leaq -0x38(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x1b130
leaq -0x38(%rbp), %rdi
addq $0x4, %rdi
movl $0x1, %esi
callq 0x1b160
movq -0xd8(%rbp), %rdi
movq (%rdi), %rax
leaq -0x38(%rbp), %rsi
callq *0x40(%rax)
movq -0xd8(%rbp), %rsi
addq $0x84, %rsi
leaq -0x38(%rbp), %rdi
callq 0x1aa70
testb $0x1, %al
jne 0x1cfc9
jmp 0x1cfce
jmp 0x1d17a
leaq -0x90(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x1a3a0
movq -0xe8(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x21450
jmp 0x1cff7
leaq -0x90(%rbp), %rdi
callq 0x14790
leaq -0xb0(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x214c0
movq -0xd8(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movb %al, -0xe9(%rbp)
jmp 0x1d039
leaq -0xb0(%rbp), %rdi
callq 0x214f0
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x1d054
jmp 0x1d171
movq -0xd8(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0xd0(%rbp), %rdi
callq *%rax
jmp 0x1d06d
movq 0xedf64(%rip), %rdi     # 0x10afd8
leaq -0xd0(%rbp), %rsi
callq 0x12770
movq %rax, -0x100(%rbp)
jmp 0x1d089
movq -0x100(%rbp), %rdi
leaq 0x96236(%rip), %rsi     # 0xb32cd
callq 0x12800
movq %rax, -0x108(%rbp)
jmp 0x1d0a5
movq -0x108(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1ac40
movq %rax, -0x110(%rbp)
jmp 0x1d0be
movq -0x110(%rbp), %rdi
movq 0xede4c(%rip), %rsi     # 0x10af18
callq 0x128b0
jmp 0x1d0d3
leaq -0xd0(%rbp), %rdi
callq 0x13198
movq -0xd8(%rbp), %rdi
addq $0x84, %rdi
leaq -0x38(%rbp), %rsi
movl $0x30, %edx
callq 0x12700
jmp 0x1d171
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x14790
jmp 0x1d18c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x214f0
jmp 0x1d183
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x1d183
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x13198
jmp 0x1d183
leaq -0x78(%rbp), %rdi
callq 0x214f0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
leaq -0x78(%rbp), %rdi
callq 0x214f0
movq -0x98(%rbp), %rdi
callq 0x12f70
nopl (%rax,%rax)