LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: rpavlik[P]edid-decode/calc-gtf-cvt.cpp
// Function: edid_state::edid_gtf_mode(unsigned int, timings&)
void edid_state::edid_gtf_mode(unsigned refresh, struct timings &t)
{
	unsigned hratio = t.hratio;
	unsigned vratio = t.vratio;
	t = calc_gtf_mode(t.hact, t.vact, refresh, t.interlaced);
	t.hratio = hratio;
	t.vratio = vratio;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %edx
movl 0x4(%rax), %ecx
movl -0xc(%rbp), %eax
cvtsi2sd %rax, %xmm0
movq -0x18(%rbp), %rax
movb 0x18(%rax), %al
leaq -0x74(%rbp), %rdi
movl $0x1, %r9d
xorl %r8d, %r8d
movsd 0x1815(%rip), %xmm1     # 0x2f040
movsd 0x1815(%rip), %xmm2     # 0x2f048
movsd 0x1815(%rip), %xmm3     # 0x2f050
movsd 0x1815(%rip), %xmm4     # 0x2f058
andb $0x1, %al
movzbl %al, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x2cff0
movq -0x18(%rbp), %rdi
leaq -0x74(%rbp), %rsi
movl $0x54, %edx
callq 0x42a0
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: rpavlik[P]edid-decode/calc-gtf-cvt.cpp
// Function: edid_state::edid_cvt_mode(unsigned int, timings&)
void edid_state::edid_cvt_mode(unsigned refresh, struct timings &t)
{
	unsigned hratio = t.hratio;
	unsigned vratio = t.vratio;

	t = calc_cvt_mode(t.hact, t.vact, refresh, t.rb & ~RB_ALT, t.interlaced,
			  false, t.rb & RB_ALT);
	t.hratio = hratio;
	t.vratio = vratio;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %edx
movl 0x4(%rax), %ecx
movl -0xc(%rbp), %eax
cvtsi2sd %rax, %xmm0
movq -0x18(%rbp), %rax
movl 0x14(%rax), %r8d
andl $0xffffff7f, %r8d       # imm = 0xFFFFFF7F
movq -0x18(%rbp), %rax
movb 0x18(%rax), %al
movq -0x18(%rbp), %rdi
movl 0x14(%rdi), %edi
andl $0x80, %edi
cmpl $0x0, %edi
setne %dil
xorl %r9d, %r9d
movzbl %dil, %r9d
andl $0x1, %r9d
movq %rsp, %rdi
movl %r9d, 0x8(%rdi)
movl $0x0, (%rdi)
movzbl %al, %r9d
andl $0x1, %r9d
leaq -0x74(%rbp), %rdi
callq 0x2d890
movq -0x18(%rbp), %rdi
leaq -0x74(%rbp), %rsi
movl $0x54, %edx
callq 0x42a0
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x90, %rsp
popq %rbp
retq
// File: 0918nobita[P]algorithm/polynomial1.cc
// Function: main
int main() {
  int X0, N;
  std::cin >> X0 >> N;
  std::vector<int> S(N);

  for (int i = 0; i < N; i++) {
    int a;
    std::cin >> a;
    S[i] = a * std::pow(X0, i);
  }

  std::cout << std::accumulate(S.begin(), S.end(), 0) << std::endl;

  return EXIT_SUCCESS;
}

// Assembly:
subq $0x98, %rsp
movl $0x0, 0x94(%rsp)
movq 0x2d77(%rip), %rdi      # 0x3fe0
leaq 0x90(%rsp), %rsi
callq 0x1070
movq %rax, %rdi
leaq 0x8c(%rsp), %rsi
callq 0x1070
movslq 0x8c(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x1420
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0x1430
jmp 0x12b8
leaq 0x6f(%rsp), %rdi
callq 0x14b0
movl $0x0, 0x58(%rsp)
movl 0x58(%rsp), %eax
cmpl 0x8c(%rsp), %eax
jge 0x1389
movq 0x2cfe(%rip), %rdi      # 0x3fe0
leaq 0x54(%rsp), %rsi
callq 0x1070
jmp 0x12ee
cvtsi2sdl 0x54(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x90(%rsp), %edi
movl 0x58(%rsp), %esi
callq 0x14c0
movsd %xmm0, 0x28(%rsp)
jmp 0x1312
movsd 0x28(%rsp), %xmm1
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x1c(%rsp)
movslq 0x58(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x14e0
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x12ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x6f(%rsp), %rdi
callq 0x14b0
jmp 0x1411
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x15c0
jmp 0x1411
leaq 0x70(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1560
movq 0x10(%rsp), %rdi
movq %rax, 0x48(%rsp)
callq 0x1590
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x1500
movl %eax, 0x18(%rsp)
jmp 0x13c3
movl 0x18(%rsp), %esi
movq 0x2c02(%rip), %rdi      # 0x3fd0
callq 0x10e0
movq %rax, 0x8(%rsp)
jmp 0x13da
movq 0x8(%rsp), %rdi
movq 0x2bda(%rip), %rsi      # 0x3fc0
callq 0x10c0
jmp 0x13ed
movl $0x0, 0x94(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x15c0
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x1100
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pulsemixer.cpp
// Function: version()
void version()
{
    if (strlen(GIT_VERSION) > 0) {
        printf("ncpamixer git v%s\n", GIT_VERSION);
    } else {
        printf("ncpamixer v%s\n", FALLBACK_VERSION);
    }

    printf("Build type: %s\n", BUILD_TYPE);
    printf("Build date: %s\n", BUILD_DATE);
    printf("\n");

}

// Assembly:
pushq %rax
leaq 0x19c08(%rip), %rdi     # 0x21b90
callq 0x7310
cmpq $0x0, %rax
jbe 0x7faa
leaq 0x180ae(%rip), %rdi     # 0x20048
leaq 0x19bef(%rip), %rsi     # 0x21b90
movb $0x0, %al
callq 0x7090
jmp 0x7fbf
leaq 0x180aa(%rip), %rdi     # 0x2005b
leaq 0x1808c(%rip), %rsi     # 0x20044
movb $0x0, %al
callq 0x7090
leaq 0x180a4(%rip), %rdi     # 0x2006a
leaq 0x19bd5(%rip), %rsi     # 0x21ba2
movb $0x0, %al
callq 0x7090
leaq 0x1809f(%rip), %rdi     # 0x2007a
leaq 0x19bce(%rip), %rsi     # 0x21bb0
movb $0x0, %al
callq 0x7090
leaq 0x1850a(%rip), %rdi     # 0x204fa
movb $0x0, %al
callq 0x7090
popq %rax
retq
nopl (%rax)
// File: fulhax[P]ncpamixer/src/pulsemixer.cpp
// Function: help()
void help()
{
    version();

    printf("-c --config=CONFIG_FILE     Set custom location for config\n");
    printf("-t --tab=TAB                Open on given tab. Choices: "
           "(p)layback (default), (r)ecording, (o)utput, (i)nput, (c)onfiguration\n");
    printf("-h --help                   Print this help screen\n");
    printf("-v --version                Print version info\n");
}

// Assembly:
pushq %rax
callq 0x7f80
leaq 0x1807d(%rip), %rdi     # 0x2008a
movb $0x0, %al
callq 0x7090
leaq 0x180ab(%rip), %rdi     # 0x200c6
movb $0x0, %al
callq 0x7090
leaq 0x1811c(%rip), %rdi     # 0x20145
movb $0x0, %al
callq 0x7090
leaq 0x18142(%rip), %rdi     # 0x20179
movb $0x0, %al
callq 0x7090
popq %rax
retq
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::PaObject()
PaObject::PaObject() : type(pa_object_t::SINK)
{
    index = 0;
    memset(name, 0, sizeof(name));
    memset(pa_name, 0, sizeof(pa_name));
    channels = 0;
    mute = false;
    monitor_index = 0;
    monitor_stream = nullptr;
    peak = 0;
    pa_set_volume = nullptr;
    pa_set_mute = nullptr;
    pa_move = nullptr;
    pa_set_active_attribute = nullptr;
    pa_set_default = nullptr;
    active_attribute = nullptr;
    is_default = false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x21b66(%rip), %rax     # 0x2a810
addq $0x10, %rax
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
addq $0x238, %rdi            # imm = 0x238
callq 0x9250
movq 0x8(%rsp), %rdi
movl $0x0, 0xc(%rdi)
addq $0x10, %rdi
xorl %esi, %esi
movl $0xff, %edx
callq 0x73d0
movq 0x8(%rsp), %rdi
addq $0x10f, %rdi            # imm = 0x10F
xorl %esi, %esi
movl $0xff, %edx
callq 0x73d0
movq 0x8(%rsp), %rax
movl $0x0, 0x210(%rax)
movb $0x0, 0x218(%rax)
movl $0x0, 0x21c(%rax)
movq $0x0, 0x220(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x228(%rax)
movq $0x0, 0x250(%rax)
movq $0x0, 0x258(%rax)
movq $0x0, 0x260(%rax)
movq $0x0, 0x268(%rax)
movq $0x0, 0x270(%rax)
movq $0x0, 0x230(%rax)
movb $0x0, 0x20e(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::set_volume(float)
void PaObject::set_volume(float perc)
{

    if (pa_set_volume != nullptr) {
        pa_threaded_mainloop_lock(pulse.pa_ml);

        int vol = (PA_VOLUME_NORM * perc);
        pa_cvolume cvol;

        pa_cvolume_init(&cvol);
        pa_cvolume_set(&cvol, channels, vol);


        pa_operation *o = pa_set_volume(
                              pulse.pa_ctx,
                              index,
                              &cvol,
                              NULL,
                              NULL
                          );
        pa_operation_unref(o);
        pa_threaded_mainloop_unlock(pulse.pa_ml);
    }
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movss %xmm0, 0x9c(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x250(%rax)
je 0x8f73
leaq 0x2282f(%rip), %rax     # 0x2b708
movq 0x158(%rax), %rdi
callq 0x70e0
movss 0x172e7(%rip), %xmm0    # 0x201d4
mulss 0x9c(%rsp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, 0x98(%rsp)
leaq 0x14(%rsp), %rdi
callq 0x7b00
movq (%rsp), %rax
movl 0x210(%rax), %esi
movl 0x98(%rsp), %edx
leaq 0x14(%rsp), %rdi
callq 0x7cd0
movq (%rsp), %rcx
movq 0x250(%rcx), %rax
leaq 0x227d0(%rip), %rdx     # 0x2b708
movq 0x150(%rdx), %rdi
movl 0xc(%rcx), %esi
leaq 0x14(%rsp), %rdx
xorl %ecx, %ecx
movl %ecx, %r8d
movq %r8, %rcx
callq *%rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x77a0
leaq 0x227a1(%rip), %rax     # 0x2b708
movq 0x158(%rax), %rdi
callq 0x71c0
addq $0xa8, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::step_volume(int)
void PaObject::step_volume(int dir)
{
    if (volume < 0x400 && dir == -1) {
        set_volume(0);
        return;
    }

    set_volume(static_cast<float>(volume + (0x400 * dir)) / PA_VOLUME_NORM);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x400, 0x214(%rax)     # imm = 0x400
jae 0x8fb7
cmpl $-0x1, 0xc(%rsp)
jne 0x8fb7
movq (%rsp), %rdi
xorps %xmm0, %xmm0
callq 0x8ea0
jmp 0x8fe0
movq (%rsp), %rdi
movl 0x214(%rdi), %eax
movl 0xc(%rsp), %ecx
shll $0xa, %ecx
addl %ecx, %eax
cvtsi2ss %rax, %xmm0
movss 0x171fd(%rip), %xmm1    # 0x201d4
divss %xmm1, %xmm0
callq 0x8ea0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::toggle_mute()
void PaObject::toggle_mute()
{
    if (pa_set_mute != nullptr) {
        pa_operation *o = pa_set_mute(
                              pulse.pa_ctx,
                              index,
                              !mute,
                              NULL,
                              NULL
                          );
        pa_operation_unref(o);
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x258(%rax)
je 0x9050
movq (%rsp), %rcx
movq 0x258(%rcx), %rax
leaq 0x226ea(%rip), %rdx     # 0x2b708
movq 0x150(%rdx), %rdi
movl 0xc(%rcx), %esi
movb 0x218(%rcx), %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %edx
xorl %ecx, %ecx
movl %ecx, %r8d
movq %r8, %rcx
callq *%rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x77a0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::move(unsigned int)
void PaObject::move(uint32_t dest)
{
    if (pa_move != nullptr) {
        pa_operation *o = pa_move(
                              pulse.pa_ctx,
                              index,
                              dest,
                              NULL,
                              NULL
                          );
        pa_operation_unref(o);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x260(%rax)
je 0x90bb
movq 0x8(%rsp), %rcx
movq 0x260(%rcx), %rax
leaq 0x22674(%rip), %rdx     # 0x2b708
movq 0x150(%rdx), %rdi
movl 0xc(%rcx), %esi
movl 0x1c(%rsp), %edx
xorl %ecx, %ecx
movl %ecx, %r8d
movq %r8, %rcx
callq *%rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x77a0
addq $0x28, %rsp
retq
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::set_active_attribute(char const*)
void PaObject::set_active_attribute(const char *name)
{
    if (pa_set_active_attribute != nullptr) {
        pa_operation *o = pa_set_active_attribute(
                              pulse.pa_ctx,
                              index,
                              name,
                              NULL,
                              NULL
                          );
        pa_operation_unref(o);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x268(%rax)
je 0x911d
movq 0x8(%rsp), %rcx
movq 0x268(%rcx), %rax
leaq 0x22613(%rip), %rdx     # 0x2b708
movq 0x150(%rdx), %rdi
movl 0xc(%rcx), %esi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
movl %ecx, %r8d
movq %r8, %rcx
callq *%rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x77a0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::set_default(char const*)
void PaObject::set_default(const char *name)
{
    if (pa_set_default != nullptr) {
        pa_operation *o = pa_set_default(
                              pulse.pa_ctx,
                              name,
                              NULL,
                              NULL
                          );
        pa_operation_unref(o);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x270(%rax)
je 0x9187
movq 0x8(%rsp), %rax
movq 0x270(%rax), %rax
leaq 0x225a3(%rip), %rcx     # 0x2b708
movq 0x150(%rcx), %rdi
movq 0x18(%rsp), %rsi
xorl %ecx, %ecx
movq %rcx, %rdx
callq *%rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x77a0
addq $0x28, %rsp
retq
nopl (%rax)
// File: fulhax[P]ncpamixer/src/pa_object.cpp
// Function: PaObject::getRelation()
uint32_t PaObject::getRelation()
{
    if (active_attribute != nullptr) {
        for (uint32_t j = 0; j < attributes.size(); j++) {
            int current = strcmp(attributes[j]->name, active_attribute->name);

            if (current == 0) {
                return j;
            }
        }
    }

    return -1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x230(%rax)
je 0x923a
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movq %rax, (%rsp)
addq $0x238, %rdi            # imm = 0x238
callq 0x92c0
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x9238
movq 0x8(%rsp), %rdi
addq $0x238, %rdi            # imm = 0x238
movl 0x14(%rsp), %eax
movl %eax, %esi
callq 0x92e0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq (%rcx), %rdi
addq $0x8, %rdi
movq 0x230(%rax), %rsi
addq $0x8, %rsi
callq 0x7980
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0x9229
movl 0x14(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x9242
jmp 0x922b
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x91b9
jmp 0x923a
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_card.cpp
// Function: PaCard::PaCard()
PaCard::PaCard()
{
    type = pa_object_t::CARD;
    monitor_stream = nullptr;
    pa_set_active_attribute = pa_context_set_card_profile_by_index;
    pa_set_volume = nullptr;
    pa_set_mute = nullptr;
    pa_move = nullptr;
    active_attribute = nullptr;
    pa_set_default = nullptr;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8c90
movq 0x8(%rsp), %rax
leaq 0x2124c(%rip), %rcx     # 0x2a850
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x4, 0x8(%rax)
movq $0x0, 0x220(%rax)
movq 0x21944(%rip), %rcx     # 0x2af68
movq %rcx, 0x268(%rax)
movq $0x0, 0x250(%rax)
movq $0x0, 0x258(%rax)
movq $0x0, 0x260(%rax)
movq $0x0, 0x230(%rax)
movq $0x0, 0x270(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_card.cpp
// Function: PaCard::updateProfiles(pa_card_profile_info*, unsigned int)
void PaCard::updateProfiles(pa_card_profile_info *pa_profiles, uint32_t n_profile)
{
    clearAttributes();

    for (uint32_t i = 0; i < n_profile; i++) {
        PaObjectAttribute *p = new PaObjectAttribute;
        snprintf(p->name, sizeof(p->name), "%s", pa_profiles[i].name);
        snprintf(
            p->description,
            sizeof(p->description),
            "%s",
            pa_profiles[i].description
        );
        attributes.push_back(p);
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x8dd0
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x9750
movl $0x208, %edi            # imm = 0x208
callq 0x76a0
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
callq 0x9760
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movl $0xff, %esi
leaq 0x18275(%rip), %rdx     # 0x21965
movb $0x0, %al
callq 0x7b20
movq 0x18(%rsp), %rdi
addq $0x107, %rdi            # imm = 0x107
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movl $0xff, %esi
leaq 0x18242(%rip), %rdx     # 0x21965
movb $0x0, %al
callq 0x7b20
movq 0x10(%rsp), %rdi
addq $0x238, %rdi            # imm = 0x238
leaq 0x18(%rsp), %rsi
callq 0x9780
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x9699
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: fulhax[P]ncpamixer/src/pa_sink.cpp
// Function: PaSink::PaSink()
PaSink::PaSink()
{
    type = pa_object_t::SINK;
    monitor_stream = nullptr;

    pa_set_volume = &pa_context_set_sink_volume_by_index;
    pa_set_mute = &pa_context_set_sink_mute_by_index;
    pa_move = nullptr;
    pa_set_active_attribute = &pa_context_set_sink_port_by_index;
    pa_set_default = &pa_context_set_default_sink;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8c90
movq 0x8(%rsp), %rax
leaq 0x208e4(%rip), %rcx     # 0x2a8c8
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
movq $0x0, 0x220(%rax)
movq 0x20fdc(%rip), %rcx     # 0x2afe0
movq %rcx, 0x250(%rax)
movq 0x20fae(%rip), %rcx     # 0x2afc0
movq %rcx, 0x258(%rax)
movq $0x0, 0x260(%rax)
movq 0x20fad(%rip), %rcx     # 0x2afd8
movq %rcx, 0x268(%rax)
movq 0x20f1f(%rip), %rcx     # 0x2af58
movq %rcx, 0x270(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_sink.cpp
// Function: PaSink::updatePorts(pa_sink_port_info**, unsigned int)
void PaSink::updatePorts(pa_sink_port_info **info, uint32_t n_ports)
{
    clearAttributes();

    for (uint32_t i = 0; i < n_ports; i++) {
        auto *p = new PaPort;

        snprintf(p->name, sizeof(p->name), "%s", info[i]->name);
        snprintf(
            p->description,
            sizeof(p->description),
            "%s",
            info[i]->description
        );
        attributes.push_back(p);
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8dd0
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0xa132
movl $0x210, %edi            # imm = 0x210
callq 0x76a0
movq %rax, %rdi
movq %rdi, (%rsp)
callq 0xa140
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rcx
movl $0xff, %esi
leaq 0x1789a(%rip), %rdx     # 0x21965
movb $0x0, %al
callq 0x7b20
movq 0x18(%rsp), %rdi
addq $0x107, %rdi            # imm = 0x107
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movl $0xff, %esi
leaq 0x1786a(%rip), %rdx     # 0x21965
movb $0x0, %al
callq 0x7b20
movq 0x8(%rsp), %rdi
addq $0x238, %rdi            # imm = 0x238
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rsi
callq 0xa170
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xa079
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_input.cpp
// Function: PaInput::PaInput()
PaInput::PaInput()
{
    type = pa_object_t::INPUT;
    monitor_stream = nullptr;
    pa_set_volume = &pa_context_set_sink_input_volume;
    pa_set_mute = &pa_context_set_sink_input_mute;
    pa_move = &pa_context_move_sink_input_by_index;
    pa_set_active_attribute = nullptr;
    pa_set_default = nullptr;

    sink = 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8c90
movq 0x8(%rsp), %rdi
leaq 0x203d4(%rip), %rax     # 0x2a948
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x280, %rdi            # imm = 0x280
callq 0x7950
movq 0x8(%rsp), %rax
movl $0x1, 0x8(%rax)
movq $0x0, 0x220(%rax)
movq 0x20a23(%rip), %rcx     # 0x2afc8
movq %rcx, 0x250(%rax)
movq 0x209c5(%rip), %rcx     # 0x2af78
movq %rcx, 0x258(%rax)
movq 0x20987(%rip), %rcx     # 0x2af48
movq %rcx, 0x260(%rax)
movq $0x0, 0x268(%rax)
movq $0x0, 0x270(%rax)
movl $0x0, 0x278(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: fulhax[P]ncpamixer/src/pa_source.cpp
// Function: PaSource::PaSource()
PaSource::PaSource()
{
    type = pa_object_t::SOURCE;
    monitor_stream = nullptr;

    pa_set_volume = &pa_context_set_source_volume_by_index;
    pa_set_mute = &pa_context_set_source_mute_by_index ;
    pa_move = nullptr;
    pa_set_active_attribute = &pa_context_set_source_port_by_index;
    pa_set_default = &pa_context_set_default_source;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8c90
movq 0x8(%rsp), %rax
leaq 0x202cc(%rip), %rcx     # 0x2a990
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x2, 0x8(%rax)
movq $0x0, 0x220(%rax)
movq 0x208ac(%rip), %rcx     # 0x2af90
movq %rcx, 0x250(%rax)
movq 0x20826(%rip), %rcx     # 0x2af18
movq %rcx, 0x258(%rax)
movq $0x0, 0x260(%rax)
movq 0x2081d(%rip), %rcx     # 0x2af28
movq %rcx, 0x268(%rax)
movq 0x20837(%rip), %rcx     # 0x2af50
movq %rcx, 0x270(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_source.cpp
// Function: PaSource::updatePorts(pa_source_port_info**, unsigned int)
void PaSource::updatePorts(pa_source_port_info **info, uint32_t n_ports)
{
    clearAttributes();

    for (uint32_t i = 0; i < n_ports; i++) {
        PaPort *p = new PaPort;
        snprintf(p->name, sizeof(p->name), "%s", info[i]->name);
        snprintf(
            p->description,
            sizeof(p->description),
            "%s",
            info[i]->description
        );
        attributes.push_back(p);
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8dd0
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0xa812
movl $0x210, %edi            # imm = 0x210
callq 0x76a0
movq %rax, %rdi
movq %rdi, (%rsp)
callq 0xa140
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rcx
movl $0xff, %esi
leaq 0x171ba(%rip), %rdx     # 0x21965
movb $0x0, %al
callq 0x7b20
movq 0x18(%rsp), %rdi
addq $0x107, %rdi            # imm = 0x107
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movl $0xff, %esi
leaq 0x1718a(%rip), %rdx     # 0x21965
movb $0x0, %al
callq 0x7b20
movq 0x8(%rsp), %rdi
addq $0x238, %rdi            # imm = 0x238
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rsi
callq 0xa170
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xa759
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa_source_output.cpp
// Function: PaSourceOutput::PaSourceOutput()
PaSourceOutput::PaSourceOutput()
{
    type = pa_object_t::SOURCE_OUTPUT;
    monitor_stream = nullptr;

    pa_set_volume = &pa_context_set_source_output_volume;
    pa_set_mute = &pa_context_set_source_output_mute;
    pa_move = &pa_context_move_source_output_by_index;
    pa_set_active_attribute = nullptr;
    pa_set_default = nullptr;

    source = 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xa550
movq 0x8(%rsp), %rax
leaq 0x20154(%rip), %rcx     # 0x2a9d8
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x3, 0x8(%rax)
movq $0x0, 0x220(%rax)
movq 0x206e4(%rip), %rcx     # 0x2af88
movq %rcx, 0x250(%rax)
movq 0x206fe(%rip), %rcx     # 0x2afb0
movq %rcx, 0x258(%rax)
movq 0x20650(%rip), %rcx     # 0x2af10
movq %rcx, 0x260(%rax)
movq $0x0, 0x268(%rax)
movq $0x0, 0x270(%rax)
movl $0x0, 0x2a0(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::Pa()
Pa::Pa()
{
    notify_update_cb = nullptr;
    pa_ml = nullptr;
    pa_api  = nullptr;
    pa_init = false;
    pa_ctx = nullptr;
    reconnect_running = false;
    connected = false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x8, %rdi
callq 0xd050
movq 0x8(%rsp), %rdi
addq $0x38, %rdi
callq 0xd050
movq 0x8(%rsp), %rdi
addq $0x68, %rdi
callq 0xd050
movq 0x8(%rsp), %rdi
addq $0x98, %rdi
callq 0xd050
movq 0x8(%rsp), %rdi
addq $0xc8, %rdi
callq 0xd050
movq 0x8(%rsp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0xd060
movq 0x8(%rsp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0xd060
movq 0x8(%rsp), %rdi
addq $0x170, %rdi            # imm = 0x170
callq 0xd060
movq 0x8(%rsp), %rax
movq $0x0, 0xf8(%rax)
movq $0x0, 0x158(%rax)
movq $0x0, 0x160(%rax)
movb $0x0, 0x168(%rax)
movq $0x0, 0x150(%rax)
movb $0x0, (%rax)
movb $0x0, 0x1(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::clearAllPaObjects()
void Pa::clearAllPaObjects()
{
    deletePaobjects(&PA_SOURCE_OUTPUTS);
    deletePaobjects(&PA_INPUTS);
    deletePaobjects(&PA_SOURCES);
    deletePaobjects(&PA_SINKS);
    deletePaobjects(&PA_CARDS);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq %rdi, %rsi
addq $0x98, %rsi
callq 0xab90
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
addq $0x8, %rsi
callq 0xab90
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
addq $0x68, %rsi
callq 0xab90
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
addq $0x38, %rsi
callq 0xab90
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
addq $0xc8, %rsi
callq 0xab90
addq $0x18, %rsp
retq
nop
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::exitPa()
void Pa::exitPa()
{
    if (pa_ctx) {
        pa_context_disconnect(pa_ctx);
        pa_threaded_mainloop_stop(pa_ml);
        pa_threaded_mainloop_free(pa_ml);
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x150(%rax)
je 0xab80
movq 0x8(%rsp), %rax
movq 0x150(%rax), %rdi
callq 0x7c70
movq 0x8(%rsp), %rax
movq 0x158(%rax), %rdi
callq 0x7d20
movq 0x8(%rsp), %rax
movq 0x158(%rax), %rdi
callq 0x74b0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::deletePaobjects(std::map<unsigned int, PaObject*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, PaObject*>>>*)
void Pa::deletePaobjects(std::map<uint32_t, PaObject *> *objects)
{
    std::lock_guard<std::mutex> lk(inputMtx);

    for (auto i = objects->begin(); i != objects->end(); ) {
        delete i->second;
        i = objects->erase(i);
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rsi
addq $0x100, %rsi            # imm = 0x100
leaq 0x40(%rsp), %rdi
callq 0xd180
movq 0x48(%rsp), %rdi
callq 0xd1b0
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
callq 0xd200
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xd1e0
testb $0x1, %al
jne 0xabe7
jmp 0xac59
leaq 0x38(%rsp), %rdi
callq 0xd230
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0xac0b
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0xd250
movq %rax, (%rsp)
jmp 0xac2a
movq (%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0xabc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xd290
jmp 0xac68
leaq 0x40(%rsp), %rdi
callq 0xd290
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x7c40
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::do_reconnect(Pa*)
void Pa::do_reconnect(Pa *pa)
{
    if (pa->reconnect_running || pa->connected) {
        return;
    }

    pa->reconnect_running = true;
    pa->clearAllPaObjects();

    while (!pa->connected) {
        pa->pa_connect();
        usleep(500000);
    }

    pa->reconnect_running = false;
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
testb $0x1, (%rax)
jne 0xac98
movq (%rsp), %rax
testb $0x1, 0x1(%rax)
je 0xac9a
jmp 0xacd5
movq (%rsp), %rax
movb $0x1, (%rax)
movq (%rsp), %rdi
callq 0xaac0
movq (%rsp), %rax
movb 0x1(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xacb9
jmp 0xacce
movq (%rsp), %rdi
callq 0xace0
movl $0x7a120, %edi          # imm = 0x7A120
callq 0x7990
jmp 0xacaa
movq (%rsp), %rax
movb $0x0, (%rax)
popq %rax
retq
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::ctx_state_cb(pa_context*, void*)
void Pa::ctx_state_cb(pa_context *ctx, void *instance)
{
    int state = pa_context_get_state(ctx);
    Pa *pa = reinterpret_cast<Pa *>(instance);

    switch (state) {
        case PA_CONTEXT_READY: {
            pa_operation *o = pa_context_subscribe(
                                  pa->pa_ctx,
                                  (pa_subscription_mask_t)
                                  (PA_SUBSCRIPTION_MASK_SINK |
                                   PA_SUBSCRIPTION_MASK_SOURCE |
                                   PA_SUBSCRIPTION_MASK_SINK_INPUT |
                                   PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT |
                                   PA_SUBSCRIPTION_MASK_CARD |
                                   PA_SUBSCRIPTION_MASK_SERVER
                                  ), &Pa::ctx_success_cb, instance);
            pa->wait_on_pa_operation(o);
            pa_operation_unref(o);
            pa->fetchPaobjects();

            pa->connectionMtx.lock();
            pa->connected = true;
            pa->connectionMtx.unlock();
            break;
        }

        case PA_CONTEXT_FAILED:
            pa->connectionMtx.lock();
            pa->connected = false;
            pa_context_unref(pa->pa_ctx);
            pa->pa_ctx = nullptr;
            pa->connectionMtx.unlock();
            pa->reconnect();
            break;


        case PA_CONTEXT_UNCONNECTED:
        case PA_CONTEXT_CONNECTING:
        case PA_CONTEXT_AUTHORIZING:
        case PA_CONTEXT_SETTING_NAME:
        case PA_CONTEXT_TERMINATED:
            break;
    }

    return;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x7af0
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movq %rax, 0x8(%rsp)
subq $0x6, %rax
ja 0xb08f
movq 0x8(%rsp), %rax
leaq 0x15297(%rip), %rcx     # 0x2024c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rax
movq 0x150(%rax), %rdi
movq 0x28(%rsp), %rcx
movl $0x28f, %esi            # imm = 0x28F
leaq 0x4a5(%rip), %rdx       # 0xb480
callq 0x7a30
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xb650
movq 0x10(%rsp), %rdi
callq 0x77a0
movq 0x18(%rsp), %rdi
callq 0xb4c0
movq 0x18(%rsp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0xd500
movq 0x18(%rsp), %rax
movb $0x1, 0x1(%rax)
movq 0x18(%rsp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0xd170
jmp 0xb08f
movq 0x18(%rsp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0xd500
movq 0x18(%rsp), %rax
movb $0x0, 0x1(%rax)
movq 0x18(%rsp), %rax
movq 0x150(%rax), %rdi
callq 0x7a40
movq 0x18(%rsp), %rax
movq $0x0, 0x150(%rax)
movq 0x18(%rsp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0xd170
movq 0x18(%rsp), %rdi
callq 0xaee0
jmp 0xb08f
jmp 0xb08f
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::init()
bool Pa::init()
{
    pa_init = true;

    pa_ml = pa_threaded_mainloop_new();

    if (!pa_ml) {
        fprintf(stderr, "Unable to create PA main loop.\n");
        exit(EXIT_FAILURE);
        return false;
    }

    pa_api  = pa_threaded_mainloop_get_api(pa_ml);

    if (pa_threaded_mainloop_start(pa_ml) < 0) {
        fprintf(stderr, "Unable to start PA mainloop.\n");
        pa_context_disconnect(pa_ctx);
        pa_context_unref(pa_ctx);
        pa_threaded_mainloop_unlock(pa_ml);
        pa_ctx = nullptr;
        exit(EXIT_FAILURE);
        return false;
    }

    return pa_connect();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x1, 0x168(%rax)
callq 0x7b70
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x158(%rax)
cmpq $0x0, 0x158(%rax)
jne 0xb3ca
movq 0x1fbf9(%rip), %rax     # 0x2afa8
movq (%rax), %rdi
leaq 0x14f44(%rip), %rsi     # 0x202fd
movb $0x0, %al
callq 0x79b0
movl $0x1, %edi
callq 0x7840
movq 0x8(%rsp), %rax
movq 0x158(%rax), %rdi
callq 0x7960
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x160(%rax)
movq 0x158(%rax), %rdi
callq 0x7560
cmpl $0x0, %eax
jge 0xb460
movq 0x1fba6(%rip), %rax     # 0x2afa8
movq (%rax), %rdi
leaq 0x14f11(%rip), %rsi     # 0x2031d
movb $0x0, %al
callq 0x79b0
movq 0x8(%rsp), %rax
movq 0x150(%rax), %rdi
callq 0x7c70
movq 0x8(%rsp), %rax
movq 0x150(%rax), %rdi
callq 0x7a40
movq 0x8(%rsp), %rax
movq 0x158(%rax), %rdi
callq 0x71c0
movq 0x8(%rsp), %rax
movq $0x0, 0x150(%rax)
movl $0x1, %edi
callq 0x7840
movq 0x8(%rsp), %rdi
callq 0xace0
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::fetchPaobjects()
void Pa::fetchPaobjects()
{

    //pa_threaded_mainloop_lock(pa_ml);
    pa_operation *o;

    // get cards
    o = pa_context_get_card_info_list(pa_ctx, &Pa::ctx_cardlist_cb, this);
    wait_on_pa_operation(o);
    pa_operation_unref(o);

    // source list cb
    o = pa_context_get_source_info_list(pa_ctx, &Pa::ctx_sourcelist_cb, this);
    wait_on_pa_operation(o);
    pa_operation_unref(o);

    // Sink devices list cb
    o = pa_context_get_sink_info_list(pa_ctx, &Pa::ctx_sinklist_cb, this);
    wait_on_pa_operation(o);
    pa_operation_unref(o);

    // Sink input list (application) cb
    o = pa_context_get_sink_input_info_list(pa_ctx, &Pa::ctx_inputlist_cb, this);
    wait_on_pa_operation(o);
    pa_operation_unref(o);

    // source outputs list cb
    o = pa_context_get_source_output_info_list(
            pa_ctx,
            &Pa::ctx_sourceoutputlist_cb,
            this
        );
    wait_on_pa_operation(o);
    pa_operation_unref(o);

    // Get server info
    o = pa_context_get_server_info(pa_ctx, &Pa::ctx_serverinfo_cb, this);
    wait_on_pa_operation(o);
    pa_operation_unref(o);

    //pa_threaded_mainloop_unlock(pa_ml);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdx
movq %rdx, (%rsp)
movq 0x150(%rdx), %rdi
leaq 0x130(%rip), %rsi       # 0xb610
callq 0x7d70
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
callq 0xb650
movq 0x8(%rsp), %rdi
callq 0x77a0
movq (%rsp), %rdx
movq 0x150(%rdx), %rdi
leaq 0x17c(%rip), %rsi       # 0xb690
callq 0x7a60
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
callq 0xb650
movq 0x8(%rsp), %rdi
callq 0x77a0
movq (%rsp), %rdx
movq 0x150(%rdx), %rdi
leaq 0x188(%rip), %rsi       # 0xb6d0
callq 0x7540
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
callq 0xb650
movq 0x8(%rsp), %rdi
callq 0x77a0
movq (%rsp), %rdx
movq 0x150(%rdx), %rdi
leaq 0x194(%rip), %rsi       # 0xb710
callq 0x7ce0
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
callq 0xb650
movq 0x8(%rsp), %rdi
callq 0x77a0
movq (%rsp), %rdx
movq 0x150(%rdx), %rdi
leaq 0x1a0(%rip), %rsi       # 0xb750
callq 0x7bc0
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
callq 0xb650
movq 0x8(%rsp), %rdi
callq 0x77a0
movq (%rsp), %rdx
movq 0x150(%rdx), %rdi
leaq 0x1ac(%rip), %rsi       # 0xb790
callq 0x7680
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
callq 0xb650
movq 0x8(%rsp), %rdi
callq 0x77a0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::ctx_cardlist_cb(pa_context*, pa_card_info const*, int, void*)
void Pa::ctx_cardlist_cb(pa_context *ctx, const pa_card_info *info,
                         int eol,
                         void *instance)
{
    Pa *pa = reinterpret_cast<Pa *>(instance);

    if (!eol) {
        pa->update_card(info);
    }

    return;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0xb645
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xc1f0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::remove_paobject(std::map<unsigned int, PaObject*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, PaObject*>>>*, unsigned int)
void Pa::remove_paobject(std::map<uint32_t, PaObject *> *objects,
                         uint32_t index)
{
    std::lock_guard<std::mutex> lk(inputMtx);

    for (auto i = objects->begin(); i != objects->end(); i++) {
        if (i->first == index) {
            delete i->second;
            i = objects->erase(i);
            return;
        }
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movq 0x60(%rsp), %rsi
addq $0x100, %rsi            # imm = 0x100
leaq 0x48(%rsp), %rdi
callq 0xd180
movq 0x58(%rsp), %rdi
callq 0xd1b0
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
callq 0xd200
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xd1e0
testb $0x1, %al
jne 0xb82e
jmp 0xb8d2
leaq 0x40(%rsp), %rdi
callq 0xd230
movl (%rax), %eax
cmpl 0x54(%rsp), %eax
jne 0xb8ba
leaq 0x40(%rsp), %rdi
callq 0xd230
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0xb864
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0xd250
movq %rax, (%rsp)
jmp 0xb883
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x1, 0x18(%rsp)
jmp 0xb8da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xd290
jmp 0xb8e9
jmp 0xb8bc
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
callq 0xd2b0
movq %rax, 0x10(%rsp)
jmp 0xb807
movl $0x0, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xd290
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x7c40
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::exists(std::map<unsigned int, PaObject*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, PaObject*>>>, unsigned int)
uint32_t Pa::exists(std::map<uint32_t, PaObject *> objects, uint32_t index)
{
    if (objects.empty()) {
        return -1;
    }

    if ((objects.find(index) == objects.end())) {
        index = objects.begin()->first;
    }

    return index;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
callq 0xd2f0
testb $0x1, %al
jne 0xb91c
jmp 0xb926
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xb982
movq (%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0xd330
movq (%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0xd200
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd310
testb $0x1, %al
jne 0xb95c
jmp 0xb97a
movq (%rsp), %rdi
callq 0xd1b0
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
callq 0xd230
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::set_defaults(pa_server_info const*)
void Pa::set_defaults(const pa_server_info *info)
{
    std::lock_guard<std::mutex> lk(inputMtx);

    for (auto &s : PA_SINKS) {
        if (!strcmp(s.second->pa_name, info->default_sink_name)) {
            s.second->is_default = true;
        } else {
            s.second->is_default = false;
        }
    }

    for (auto &s : PA_SOURCES) {
        if (!strcmp(s.second->pa_name, info->default_source_name)) {
            s.second->is_default = true;
        } else {
            s.second->is_default = false;
        }
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rsi
movq %rsi, 0x8(%rsp)
addq $0x100, %rsi            # imm = 0x100
leaq 0x50(%rsp), %rdi
callq 0xd180
movq 0x8(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0xd1b0
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0xd200
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xd1e0
testb $0x1, %al
jne 0xb9fa
jmp 0xba5c
leaq 0x40(%rsp), %rdi
callq 0xd360
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdi
addq $0x10f, %rdi            # imm = 0x10F
movq 0x58(%rsp), %rax
movq 0x30(%rax), %rsi
callq 0x7980
cmpl $0x0, %eax
jne 0xba3e
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movb $0x1, 0x20e(%rax)
jmp 0xba4e
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movb $0x0, 0x20e(%rax)
jmp 0xba50
leaq 0x40(%rsp), %rdi
callq 0xd380
jmp 0xb9e5
movq 0x8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0xd1b0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0xd200
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xd1e0
testb $0x1, %al
jne 0xba9d
jmp 0xbaff
leaq 0x20(%rsp), %rdi
callq 0xd360
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
addq $0x10f, %rdi            # imm = 0x10F
movq 0x58(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x7980
cmpl $0x0, %eax
jne 0xbae1
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movb $0x1, 0x20e(%rax)
jmp 0xbaf1
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movb $0x0, 0x20e(%rax)
jmp 0xbaf3
leaq 0x20(%rsp), %rdi
callq 0xd380
jmp 0xba88
leaq 0x50(%rsp), %rdi
callq 0xd290
addq $0x68, %rsp
retq
nop
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::create_monitor_stream_for_paobject(PaObject*)
void Pa::create_monitor_stream_for_paobject(PaObject *po)
{
    if (po->monitor_stream != nullptr) {
        pa_stream_disconnect(po->monitor_stream);
        po->monitor_stream = nullptr;
    }

	po->monitor_stream = create_monitor_stream_for_source
		(po->monitor_index, po->type == pa_object_t::INPUT ? po->index : -1);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x220(%rax)
je 0xc188
movq 0x18(%rsp), %rax
movq 0x220(%rax), %rdi
callq 0x7cb0
movq 0x18(%rsp), %rax
movq $0x0, 0x220(%rax)
movq 0x18(%rsp), %rax
movl 0x21c(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x1, 0x8(%rax)
jne 0xc1b0
movq 0x18(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0xc1bb
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x8(%rsp)
jmp 0xc1bb
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %edx
callq 0xce80
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x220(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::updatePeakByDeviceId(unsigned int, float)
void Pa::updatePeakByDeviceId(uint32_t index, float peak)
{
    for (auto &s : PA_SINKS) {
        if (s.second->monitor_index == index) {
            s.second->peak = peak;
        }
    }

    for (auto &s : PA_SOURCES) {
        if (s.second->monitor_index == index) {
            s.second->peak = peak;
        }
    }

    for (auto &s : PA_SOURCE_OUTPUTS) {
        if (s.second->monitor_index == index) {
            s.second->peak = peak;
        }
    }
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movss %xmm0, 0x68(%rsp)
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
addq $0x38, %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0xd1b0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0xd200
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xd1e0
testb $0x1, %al
jne 0xcd18
jmp 0xcd61
leaq 0x58(%rsp), %rdi
callq 0xd360
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x21c(%rax), %eax
cmpl 0x6c(%rsp), %eax
jne 0xcd53
movss 0x68(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movss %xmm0, 0x228(%rax)
jmp 0xcd55
leaq 0x58(%rsp), %rdi
callq 0xd380
jmp 0xcd03
movq (%rsp), %rax
addq $0x68, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0xd1b0
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0xd200
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xd1e0
testb $0x1, %al
jne 0xcda1
jmp 0xcdea
leaq 0x38(%rsp), %rdi
callq 0xd360
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x21c(%rax), %eax
cmpl 0x6c(%rsp), %eax
jne 0xcddc
movss 0x68(%rsp), %xmm0
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movss %xmm0, 0x228(%rax)
jmp 0xcdde
leaq 0x38(%rsp), %rdi
callq 0xd380
jmp 0xcd8c
movq (%rsp), %rax
addq $0x98, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0xd1b0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0xd200
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd1e0
testb $0x1, %al
jne 0xce2c
jmp 0xce75
leaq 0x18(%rsp), %rdi
callq 0xd360
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x21c(%rax), %eax
cmpl 0x6c(%rsp), %eax
jne 0xce67
movss 0x68(%rsp), %xmm0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movss %xmm0, 0x228(%rax)
jmp 0xce69
leaq 0x18(%rsp), %rdi
callq 0xd380
jmp 0xce17
addq $0x78, %rsp
retq
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/pa.cpp
// Function: Pa::create_monitor_stream_for_source(unsigned int, unsigned int)
pa_stream *Pa::create_monitor_stream_for_source(uint32_t source_index,
        uint32_t stream_index = -1)
{
    pa_stream *s;
    char t[16];
    pa_buffer_attr attr;
    pa_sample_spec ss;
    pa_stream_flags_t flags;

    ss.channels = 1;
    ss.format = PA_SAMPLE_FLOAT32;
    ss.rate = 25;

    memset(&attr, 0, sizeof(attr));
    attr.fragsize = sizeof(float);
    attr.maxlength = (uint32_t) - 1;

    snprintf(t, sizeof(t), "%u", source_index);

    if (!(s = pa_stream_new(pa_ctx, "Peak detect", &ss, NULL))) {
        return NULL;
    }

    if (stream_index != (uint32_t) - 1) {
        pa_stream_set_monitor_stream(s, stream_index);
    }

    pa_stream_set_read_callback(s, &Pa::read_callback, this);

    flags = (pa_stream_flags_t)(PA_STREAM_DONT_MOVE | PA_STREAM_PEAK_DETECT |
                                PA_STREAM_ADJUST_LATENCY);

    if (pa_stream_connect_record(s, t, &attr, flags) < 0) {
        pa_stream_unref(s);
        return NULL;
    }

    return s;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movl %edx, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movb $0x1, 0x18(%rsp)
movl $0x5, 0x10(%rsp)
movl $0x19, 0x14(%rsp)
leaq 0x1c(%rsp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x73d0
movl $0x4, 0x2c(%rsp)
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
leaq 0x30(%rsp), %rdi
movl 0x54(%rsp), %ecx
movl $0x10, %esi
leaq 0x134b1(%rip), %rdx     # 0x20396
movb $0x0, %al
callq 0x7b20
movq (%rsp), %rax
movq 0x150(%rax), %rdi
leaq 0x1349b(%rip), %rsi     # 0x20399
leaq 0x10(%rsp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x75b0
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
jne 0xcf22
movq $0x0, 0x60(%rsp)
jmp 0xcf90
cmpl $-0x1, 0x50(%rsp)
je 0xcf37
movq 0x48(%rsp), %rdi
movl 0x50(%rsp), %esi
callq 0x7900
movq (%rsp), %rdx
movq 0x48(%rsp), %rdi
leaq -0x4d7(%rip), %rsi      # 0xca70
callq 0x7600
movl $0x2a00, 0xc(%rsp)      # imm = 0x2A00
movq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movl 0xc(%rsp), %ecx
leaq 0x1c(%rsp), %rdx
callq 0x73a0
cmpl $0x0, %eax
jge 0xcf86
movq 0x48(%rsp), %rdi
callq 0x7890
movq $0x0, 0x60(%rsp)
jmp 0xcf90
movq 0x48(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nopw (%rax,%rax)