// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::update_source_output(pa_source_output_info const*)
void Pa::update_source_output(const pa_source_output_info *info)
{
    std::lock_guard<std::mutex> lk(inputMtx);

    // https://github.com/pulseaudio/pavucontrol/blob/master/src/mainwindow.cc#L802
    const char *app;

    if ((app = pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_ID))) {
        if (strcmp(app, "org.PulseAudio.pavucontrol") == 0
            || strcmp(app, "org.gnome.VolumeControl") == 0
            || strcmp(app, "org.kde.kmixd") == 0
            || strcmp(app, "ncpamixer") == 0) {
            return;
        }
    }

    PaSourceOutput *p;

    if (PA_SOURCE_OUTPUTS.count(info->index) == 0) {
        p = new PaSourceOutput;
        PA_SOURCE_OUTPUTS[info->index] = p;
        p->monitor_stream = nullptr;
    } else {
        p = reinterpret_cast<PaSourceOutput *>(PA_SOURCE_OUTPUTS[info->index]);
    }

    p->index = info->index;
    p->source = info->source;
    p->channels = info->channel_map.channels;
    p->monitor_index = info->source;
    p->volume = (const pa_volume_t) pa_cvolume_avg(&info->volume);
    p->mute = info->mute;

    strncpy(p->name, info->name, sizeof(p->name) - 1);

    const auto app_name = pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME);
    p->app_name = (app_name != NULL) ? app_name : "Module";

    notify_update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x100(%rdi), %rbx
movq %rbx, %rdi
callq 0x92ce
movq 0xd0(%r15), %rdi
leaq 0x7c01(%rip), %rsi      # 0x102a3
callq 0x6520
movq %rax, %r12
testq %rax, %rax
je 0x870b
leaq 0x7c79(%rip), %rsi      # 0x1032f
movq %r12, %rdi
callq 0x6830
testl %eax, %eax
je 0x87fd
leaq 0x7c7d(%rip), %rsi      # 0x1034a
movq %r12, %rdi
callq 0x6830
testl %eax, %eax
je 0x87fd
leaq 0x7c7e(%rip), %rsi      # 0x10362
movq %r12, %rdi
callq 0x6830
testl %eax, %eax
je 0x87fd
leaq 0x7b9e(%rip), %rsi      # 0x10299
movq %r12, %rdi
callq 0x6830
testl %eax, %eax
je 0x87fd
leaq 0x98(%r14), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x9266
testq %rax, %rax
je 0x8732
movq %r13, %rdi
movq %r15, %rsi
callq 0x9280
movq (%rax), %r12
jmp 0x875e
movl $0x2a8, %edi            # imm = 0x2A8
callq 0x65c0
movq %rax, %r12
movq %rax, %rdi
callq 0x7bf0
movq %r13, %rdi
movq %r15, %rsi
callq 0x9280
movq %r12, (%rax)
andq $0x0, 0x220(%r12)
movl (%r15), %eax
movl %eax, 0xc(%r12)
movl 0x18(%r15), %eax
movl %eax, 0x2a0(%r12)
movzbl 0x28(%r15), %ecx
movl %ecx, 0x210(%r12)
movl %eax, 0x21c(%r12)
leaq 0xdc(%r15), %rdi
callq 0x6a30
movl %eax, 0x214(%r12)
cmpl $0x0, 0x160(%r15)
setne 0x218(%r12)
leaq 0x10(%r12), %rdi
movq 0x8(%r15), %rsi
movl $0xfe, %edx
callq 0x6330
movq 0xd0(%r15), %rdi
leaq 0x7abb(%rip), %rsi      # 0x10288
callq 0x6520
testq %rax, %rax
leaq 0x7b94(%rip), %rsi      # 0x10370
cmovneq %rax, %rsi
addq $0x280, %r12            # imm = 0x280
movq %r12, %rdi
callq 0x6b90
movq 0xf8(%r14), %rax
testq %rax, %rax
je 0x87fd
callq *%rax
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x64c0
movq %rax, %r14
movl $0x2a8, %esi            # imm = 0x2A8
movq %r12, %rdi
callq 0x65d0
jmp 0x8827
jmp 0x8824
jmp 0x8824
movq %rax, %r14
movq %rbx, %rdi
callq 0x64c0
movq %r14, %rdi
callq 0x6ac0
nop