LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: fulhax[P]ncpamixer/src/config.cpp
// Function: Config::getKeycodeNameEvents[abi:cxx11]() const
const config_map Config::getKeycodeNameEvents() const
{
    config_map keycodes{};

    for (const auto& it : config) {
        const auto kn{getKeycodeName(it.first.c_str())};
        if (kn.empty()) continue;
        keycodes[kn] = it.second;
    }
    return keycodes;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
movb $0x0, 0x87(%rsp)
xorl %esi, %esi
movl $0x30, %edx
callq 0x73d0
movq 0x20(%rsp), %rdi
callq 0x10bc0
movq 0x28(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x10bd0
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x10c00
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x10c30
testb $0x1, %al
jne 0xf63f
jmp 0xf712
leaq 0x70(%rsp), %rdi
callq 0x10c50
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x72e0
movq %rax, %rsi
leaq 0x40(%rsp), %rdi
callq 0xf270
jmp 0xf667
leaq 0x40(%rsp), %rdi
callq 0x7b80
testb $0x1, %al
jne 0xf677
jmp 0xf694
movl $0x3, 0x30(%rsp)
jmp 0xf6d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0xf743
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rsi
callq 0x10c80
movq %rax, 0x10(%rsp)
jmp 0xf6b8
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x7070
jmp 0xf6c9
movl $0x0, 0x30(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x7480
movl 0x30(%rsp), %eax
testl %eax, %eax
je 0xf6e7
jmp 0xf6e5
jmp 0xf6e9
jmp 0xf6e9
leaq 0x70(%rsp), %rdi
callq 0x10d70
jmp 0xf627
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x7480
jmp 0xf743
movb $0x1, 0x87(%rsp)
movl $0x1, 0x30(%rsp)
testb $0x1, 0x87(%rsp)
jne 0xf736
movq 0x20(%rsp), %rdi
callq 0x10da0
movq 0x18(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x10da0
movq 0x38(%rsp), %rdi
callq 0x7c40
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/config.cpp
// Function: Config::getHomeDir()
const char *Config::getHomeDir()
{
    const char *homedir = getenv("HOME");
    if (homedir != nullptr) return homedir;
    passwd pwd = {nullptr}, *result{nullptr};
    size_t bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
    if (bufsize == static_cast<size_t>(-1)) bufsize = 16384;

    std::unique_ptr<char[]> buf = std::make_unique<char[]>(bufsize);
    getpwuid_r(getuid(), &pwd, buf.get(), bufsize, &result);
    if (result == nullptr) {
        fprintf(stderr, "Unable to find home-directory\n");
        exit(EXIT_FAILURE);
    }

    homedir = result->pw_dir;
    return homedir;
}

// Assembly:
subq $0x78, %rsp
leaq 0x10c8c(%rip), %rdi     # 0x203f7
callq 0x7850
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0xf78c
movq 0x68(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0xf870
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x73d0
movq $0x0, 0x30(%rsp)
movl $0x46, %edi
callq 0x74c0
movq %rax, 0x28(%rsp)
cmpq $-0x1, 0x28(%rsp)
jne 0xf7c6
movq $0x4000, 0x28(%rsp)     # imm = 0x4000
movq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x10db0
callq 0x7390
movq 0x8(%rsp), %rdi
movl %eax, 0x10(%rsp)
callq 0x10e10
movl 0x10(%rsp), %edi
movq %rax, %rdx
movq 0x28(%rsp), %rcx
leaq 0x38(%rsp), %rsi
leaq 0x30(%rsp), %r8
callq 0x7db0
jmp 0xf80a
cmpq $0x0, 0x30(%rsp)
jne 0xf84e
movq 0x1b78f(%rip), %rax     # 0x2afa8
movq (%rax), %rdi
leaq 0x10bd9(%rip), %rsi     # 0x203fc
movb $0x0, %al
callq 0x79b0
movl $0x1, %edi
callq 0x7840
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x10e40
jmp 0xf87a
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x10e40
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x7c40
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/config.cpp
// Function: Config::getConfigFile(std::optional<std::filesystem::__cxx11::path>&)
bool Config::getConfigFile(std::optional<fs::path>& conf)
{
    if (!conf.has_value())
    {
        if (getDefaultConfigFile()) return true;
        return false;
    }

    std::error_code ec{};
    const auto config_file{conf.value()};
    if (!fs::exists(config_file, ec))
    {
        fprintf(stderr, "Unable to find config file '%s'.\n", config_file.c_str());
        return false;
    }

    full_path = fs::absolute(config_file, ec);
    return true;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x90(%rsp), %rdi
callq 0x11220
testb $0x1, %al
jne 0xfd2f
movq 0x10(%rsp), %rdi
callq 0xf890
testb $0x1, %al
jne 0xfd15
jmp 0xfd22
movb $0x1, 0xa7(%rsp)
jmp 0xfe19
movb $0x0, 0xa7(%rsp)
jmp 0xfe19
leaq 0x80(%rsp), %rdi
callq 0x10ea0
movq 0x90(%rsp), %rdi
callq 0x11240
movq %rax, %rsi
leaq 0x58(%rsp), %rdi
callq 0x11280
leaq 0x58(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x111a0
testb $0x1, %al
jne 0xfdad
movq 0x1b235(%rip), %rax     # 0x2afa8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x11210
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x106ee(%rip), %rsi     # 0x20482
movb $0x0, %al
callq 0x79b0
movb $0x0, 0xa7(%rsp)
movl $0x1, 0x54(%rsp)
jmp 0xfe0f
leaq 0x28(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x7570
jmp 0xfdc6
movq 0x10(%rsp), %rdi
addq $0x30, %rdi
leaq 0x28(%rsp), %rsi
callq 0x87f0
leaq 0x28(%rsp), %rdi
callq 0x8460
movb $0x1, 0xa7(%rsp)
movl $0x1, 0x54(%rsp)
jmp 0xfe0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x8460
jmp 0xfe2a
leaq 0x58(%rsp), %rdi
callq 0x8460
movb 0xa7(%rsp), %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x7c40
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/config.cpp
// Function: Config::getString(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string Config::getString(const char *key, const std::string &def)
{
    auto conf = config.find(key);

    if (conf == config.end()) {
        config[key] = def;
    }

    return config[key];
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x50(%rsp)
movq %rdi, %rax
movq %rax, 0x58(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movq %rcx, 0x118(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x7c50
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0xf0(%rsp), %rdi
callq 0x10940
jmp 0x101ce
movq 0x60(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x112e0
movq %rax, 0x48(%rsp)
jmp 0x101e7
movq 0x48(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x7480
leaq 0xef(%rsp), %rdi
callq 0x7760
movq 0x68(%rsp), %rdi
callq 0x11330
movq %rax, 0xd0(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x11310
testb $0x1, %al
jne 0x1023e
jmp 0x10368
movq 0x68(%rsp), %rax
movq 0x118(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x7c50
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0x10940
jmp 0x1028d
movq 0x30(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x11360
movq %rax, 0x20(%rsp)
jmp 0x102a6
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x7070
jmp 0x102b7
leaq 0xb0(%rsp), %rdi
callq 0x7480
leaq 0xaf(%rsp), %rdi
callq 0x7760
jmp 0x10368
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x1030d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x7480
leaq 0xef(%rsp), %rdi
callq 0x7760
jmp 0x1043d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x10356
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x7480
leaq 0xaf(%rsp), %rdi
callq 0x7760
jmp 0x1043d
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x87(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x7c50
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x88(%rsp), %rdi
callq 0x10940
jmp 0x103aa
movq 0x8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x11360
movq %rax, (%rsp)
jmp 0x103c2
movq (%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0x7300
jmp 0x103d2
leaq 0x88(%rsp), %rdi
callq 0x7480
leaq 0x87(%rsp), %rdi
callq 0x7760
movq 0x58(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x10430
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x7480
leaq 0x87(%rsp), %rdi
callq 0x7760
movq 0xe0(%rsp), %rdi
callq 0x7c40
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::Ui()
Ui::Ui()
{
    disconnect = false;
    running = false;
    current_tab = nullptr;
    window = nullptr;
    statusbar = nullptr;
    width = 0;
    height = 0;
    tab_index = 0;
    hide_indicator = false;
    hide_top = false;
    hide_bottom = false;
    static_bar = false;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x168f6(%rip), %rcx     # 0x2aaa0
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x20, %rax
movq %rax, %rcx
addq $0xc0, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x7950
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0x141c9
movq 0x8(%rsp), %rdi
addq $0xe0, %rdi
callq 0x7950
movq 0x8(%rsp), %rdi
addq $0x108, %rdi            # imm = 0x108
leaq 0x168ae(%rip), %rsi     # 0x2aac0
movl $0x28, %edx
callq 0x7620
movq 0x8(%rsp), %rax
movb $0x0, 0x105(%rax)
movb $0x0, 0x104(%rax)
movq $0x0, 0x138(%rax)
movq $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x130(%rax)
movb $0x0, 0x100(%rax)
movb $0x0, 0x101(%rax)
movb $0x0, 0x102(%rax)
movb $0x0, 0x103(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::checkPulseAudio()
void Ui::checkPulseAudio()
{
    if (!pulse.connected && !disconnect) {
        disconnect = true;
        delete current_tab;
        current_tab = new Fallback();
    } else if (pulse.connected && disconnect) {
        disconnect = false;
        switchTab(tab_index);
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x15a8e(%rip), %rax     # 0x2b708
testb $0x1, 0x1(%rax)
jne 0x15d1f
movq 0x18(%rsp), %rax
testb $0x1, 0x105(%rax)
jne 0x15d1f
movq 0x18(%rsp), %rax
movb $0x1, 0x105(%rax)
movq 0x138(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x15cbf
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x28, %edi
callq 0x76a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
callq 0x17080
jmp 0x15ced
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x138(%rax)
jmp 0x15d53
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0x28, %esi
callq 0x76c0
jmp 0x15d58
leaq 0x159e2(%rip), %rax     # 0x2b708
testb $0x1, 0x1(%rax)
je 0x15d51
movq 0x18(%rsp), %rax
testb $0x1, 0x105(%rax)
je 0x15d51
movq 0x18(%rsp), %rdi
movb $0x0, 0x105(%rdi)
movl 0x130(%rdi), %esi
callq 0x15a10
jmp 0x15d53
addq $0x38, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x7c40
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::draw()
void Ui::draw()
{
    werase(window);
    current_tab->draw();
    wrefresh(window);

    statusBar();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rax), %rdi
callq 0x70a0
movq 0x8(%rsp), %rax
movq 0x138(%rax), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x77b0
movq 0x8(%rsp), %rdi
callq 0x16e60
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::statusBar()
void Ui::statusBar()
{
    werase(statusbar);

    int len = 0;

    for (int i = 0; i < NUM_TABS; ++i) {
        if (tab_index == i) {
            wattron(statusbar, COLOR_PAIR(COLOR_SELECTED));
        } else {
            wattron(statusbar, COLOR_PAIR(COLOR_DEFAULT));
        }

        mvwaddstr(statusbar, 0, len, tabs[i]);
        len += strlen(tabs[i]) + 1;

        if (tab_index == i) {
            wattroff(statusbar, COLOR_PAIR(COLOR_SELECTED));
        } else {
            wattroff(statusbar, COLOR_PAIR(COLOR_DEFAULT));
        }
    }

    wrefresh(statusbar);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rax), %rdi
callq 0x70a0
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
cmpl $0x5, 0x8(%rsp)
jge 0x16f86
movq (%rsp), %rax
movl 0x130(%rax), %eax
cmpl 0x8(%rsp), %eax
jne 0x16ebe
movq (%rsp), %rax
movq 0x18(%rax), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x7360
jmp 0x16ed4
movq (%rsp), %rax
movq 0x18(%rax), %rdi
movl $0x900, %esi            # imm = 0x900
xorl %eax, %eax
movl %eax, %edx
callq 0x7360
movq (%rsp), %rax
movq 0x18(%rax), %rdi
movl 0xc(%rsp), %edx
xorl %esi, %esi
callq 0x76f0
cmpl $-0x1, %eax
jne 0x16eee
jmp 0x16f0d
movq (%rsp), %rax
movq 0x18(%rax), %rdi
movslq 0x8(%rsp), %rcx
movq 0x108(%rax,%rcx,8), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7220
movq (%rsp), %rax
movslq 0x8(%rsp), %rcx
movq 0x108(%rax,%rcx,8), %rdi
callq 0x7310
movq %rax, %rdx
movq (%rsp), %rax
addq $0x1, %rdx
movslq 0xc(%rsp), %rcx
addq %rdx, %rcx
movl %ecx, 0xc(%rsp)
movl 0x130(%rax), %eax
cmpl 0x8(%rsp), %eax
jne 0x16f5e
movq (%rsp), %rax
movq 0x18(%rax), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x78b0
jmp 0x16f74
movq (%rsp), %rax
movq 0x18(%rax), %rdi
movl $0x900, %esi            # imm = 0x900
xorl %eax, %eax
movl %eax, %edx
callq 0x78b0
jmp 0x16f76
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x16e8b
movq (%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x77b0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::run()
void Ui::run()
{
    while (running) {
        checkPulseAudio();
        draw();

        usleep(20000);

        handleInput();
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
testb $0x1, 0x104(%rax)
je 0x16feb
movq 0x8(%rsp), %rdi
callq 0x15c60
movq 0x8(%rsp), %rdi
callq 0x16e10
movl $0x4e20, %edi           # imm = 0x4E20
callq 0x7990
movq 0x8(%rsp), %rdi
callq 0x15d70
jmp 0x16fb3
addq $0x18, %rsp
retq
// File: fulhax[P]ncpamixer/src/ui/tab.hpp
// Function: Tab::Tab()
Tab()
    {
        object = nullptr;
        toggle = nullptr;
        selected_index = 0;
        selected_block = 0;
        total_blocks = 0;
        has_volume = true;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
leaq 0x138b7(%rip), %rcx     # 0x2aaf8
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x20(%rax)
movl $0x0, 0x24(%rax)
movb $0x1, 0x8(%rax)
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::getBlockSize()
int Tab::getBlockSize()
{
    int BLOCK_SIZE = 5;

    if (has_volume) {
        if (ui.hide_top) {
            BLOCK_SIZE -= 1;
        }

        if (ui.hide_bottom) {
            BLOCK_SIZE -= 1;
        }
    }

    return BLOCK_SIZE;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl $0x5, -0xc(%rsp)
testb $0x1, 0x8(%rax)
je 0x17330
leaq 0x145f9(%rip), %rax     # 0x2b8f8
testb $0x1, 0x101(%rax)
je 0x17313
movl -0xc(%rsp), %eax
subl $0x1, %eax
movl %eax, -0xc(%rsp)
leaq 0x145de(%rip), %rax     # 0x2b8f8
testb $0x1, 0x102(%rax)
je 0x1732e
movl -0xc(%rsp), %eax
subl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x17330
movl -0xc(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::handleMouseVolumeBar(PaObject*, int, int, int, int, int, int, int)
bool Tab::handleMouseVolumeBar(
    PaObject* item,
    int mousex,
    int mousey,
    int w,
    int h,
    int x,
    int y, 
    int button
)
{
    if (mousex < x || mousex >= x + w || mousey < (y - 1) || mousey >= y + 2) {
        return false;
    }

    if (button == 4) {
        item->step_volume(1);
    } else if (button == 5) {
        item->step_volume(-1);
    } else {
        item->set_volume(((mousex - x + 1) / (float)(w - x)) * 1.5f);
    }
    return true;
}

// Assembly:
subq $0x28, %rsp
movl 0x40(%rsp), %eax
movl 0x38(%rsp), %eax
movl 0x30(%rsp), %eax
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %ecx, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
movl %r9d, (%rsp)
movl 0xc(%rsp), %eax
cmpl 0x30(%rsp), %eax
jl 0x199d3
movl 0xc(%rsp), %eax
movl 0x30(%rsp), %ecx
addl 0x4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x199d3
movl 0x8(%rsp), %eax
movl 0x38(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x199d3
movl 0x8(%rsp), %eax
movl 0x38(%rsp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jl 0x199da
movb $0x0, 0x27(%rsp)
jmp 0x19a46
cmpl $0x4, 0x40(%rsp)
jne 0x199f2
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x8f80
jmp 0x19a41
cmpl $0x5, 0x40(%rsp)
jne 0x19a0a
movq 0x10(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8f80
jmp 0x19a3f
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %eax
subl 0x30(%rsp), %eax
addl $0x1, %eax
cvtsi2ss %eax, %xmm0
movl 0x4(%rsp), %eax
subl 0x30(%rsp), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss 0x7f62(%rip), %xmm1     # 0x21998
mulss %xmm1, %xmm0
callq 0x8ea0
jmp 0x19a41
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::handleMouseDropDown(PaObject*, int, int, int, int, int, int)
bool Tab::handleMouseDropDown(
    PaObject* item,
    int mousex,
    int mousey,
    int w,
    int h,
    int x,
    int y
)
{
    if (mousex < x || mousex >= x + w || mousey < y || mousey >= y + 3) {
        return false;
    }

    handleDropDown(item);

    return true;
}

// Assembly:
subq $0x38, %rsp
movl 0x48(%rsp), %eax
movl 0x40(%rsp), %eax
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movl %r9d, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x40(%rsp), %eax
jl 0x19ac5
movl 0x1c(%rsp), %eax
movl 0x40(%rsp), %ecx
addl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jge 0x19ac5
movl 0x18(%rsp), %eax
cmpl 0x48(%rsp), %eax
jl 0x19ac5
movl 0x18(%rsp), %eax
movl 0x48(%rsp), %ecx
addl $0x3, %ecx
cmpl %ecx, %eax
jl 0x19acc
movb $0x0, 0x37(%rsp)
jmp 0x19ae0
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x19150
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::handleMouseMoreUp(int, int, int, int, int, int)
bool Tab::handleMouseMoreUp(
    int mousex,
    int mousey,
    int w,
    int h,
    int x,
    int y
)
{
    if (mousex < x || mousex >= x + w || mousey < y || mousey > y) {
        return false;
    }

    handleEvents("move_up");

    return true;
}

// Assembly:
subq $0x38, %rsp
movl 0x40(%rsp), %eax
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movl %r8d, 0x18(%rsp)
movl %r9d, 0x14(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movl 0x24(%rsp), %eax
cmpl 0x14(%rsp), %eax
jl 0x19b4a
movl 0x24(%rsp), %eax
movl 0x14(%rsp), %ecx
addl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x19b4a
movl 0x20(%rsp), %eax
cmpl 0x40(%rsp), %eax
jl 0x19b4a
movl 0x20(%rsp), %eax
cmpl 0x40(%rsp), %eax
jle 0x19b51
movb $0x0, 0x37(%rsp)
jmp 0x19b70
movq (%rsp), %rdi
leaq 0x7e99(%rip), %rax      # 0x219f5
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rsi
callq 0x18720
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::handleMouseMoreDown(int, int, int, int, int, int)
bool Tab::handleMouseMoreDown(
    int mousex,
    int mousey,
    int w,
    int h,
    int x,
    int y
)
{
    if (mousex < x || mousex >= x + w || mousey < y || mousey > y) {
        return false;
    }

    handleEvents("move_down");

    return true;
}

// Assembly:
subq $0x38, %rsp
movl 0x40(%rsp), %eax
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movl %r8d, 0x18(%rsp)
movl %r9d, 0x14(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movl 0x24(%rsp), %eax
cmpl 0x14(%rsp), %eax
jl 0x19bda
movl 0x24(%rsp), %eax
movl 0x14(%rsp), %ecx
addl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x19bda
movl 0x20(%rsp), %eax
cmpl 0x40(%rsp), %eax
jl 0x19bda
movl 0x20(%rsp), %eax
cmpl 0x40(%rsp), %eax
jle 0x19be1
movb $0x0, 0x37(%rsp)
jmp 0x19c00
movq (%rsp), %rdi
leaq 0x7e11(%rip), %rax      # 0x219fd
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rsi
callq 0x18720
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::dropDown(int, int, std::map<unsigned int, PaObject*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, PaObject*>>>, unsigned int, unsigned int, unsigned int)
uint32_t Tab::dropDown(
    int x,
    int y,
    std::map<uint32_t, PaObject *> objects,
    uint32_t current,
    uint32_t width,
    uint32_t height
)
{
    if (objects.empty()) {
        return -1;
    }

    std::map<uint32_t, std::string> tmp;
    std::for_each(
        objects.begin(),
        objects.end(),
    [&tmp](std::pair<const uint32_t, PaObject *> const & obj) {
        tmp[obj.first] = obj.second->name;
    }
    );

    return dropDown(x, y, tmp, current, width, height);
}

// Assembly:
subq $0xe8, %rsp
movq %rdx, 0x20(%rsp)
movl %edi, %eax
movq 0x20(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movl %eax, 0xe0(%rsp)
movl %esi, 0xdc(%rsp)
movq %rdi, 0xd0(%rsp)
movl %ecx, 0xcc(%rsp)
movl %r8d, 0xc8(%rsp)
movl %r9d, 0xc4(%rsp)
callq 0xd2f0
testb $0x1, %al
jne 0x19c60
jmp 0x19c70
movl $0xffffffff, 0xe4(%rsp) # imm = 0xFFFFFFFF
jmp 0x19d92
leaq 0x90(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1b420
movq 0x28(%rsp), %rdi
callq 0xd1b0
movq 0x28(%rsp), %rdi
movq %rax, 0x88(%rsp)
callq 0xd200
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x80(%rsp)
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x1ac60
movq %rax, 0x18(%rsp)
jmp 0x19cd4
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0xe0(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0xdc(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1b520
jmp 0x19d08
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edi
movl 0xcc(%rsp), %ecx
movl 0xc8(%rsp), %r8d
movl 0xc4(%rsp), %r9d
leaq 0x30(%rsp), %rdx
callq 0x19f70
movl %eax, 0x4(%rsp)
jmp 0x19d37
movl 0x4(%rsp), %eax
movl %eax, 0xe4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1b550
leaq 0x90(%rsp), %rdi
callq 0x1b550
jmp 0x19d92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x19d83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1b550
leaq 0x90(%rsp), %rdi
callq 0x1b550
jmp 0x19da1
movl 0xe4(%rsp), %eax
addq $0xe8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x7c40
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::dropDown(int, int, std::vector<PaObjectAttribute*, std::allocator<PaObjectAttribute*>>, unsigned int, unsigned int, unsigned int)
uint32_t Tab::dropDown(
    int x,
    int y,
    std::vector<PaObjectAttribute *> attributes,
    uint32_t current,
    uint32_t width,
    uint32_t height
)
{
    if (attributes.empty()) {
        return -1;
    }

    std::map<uint32_t, std::string> tmp;

    for (uint32_t i = 0; i < attributes.size(); i++) {
        tmp[i] = attributes[i]->description;
    }

    return dropDown(x, y, tmp, current, width, height);
}

// Assembly:
subq $0xd8, %rsp
movq %rdx, 0x28(%rsp)
movl %edi, %eax
movq 0x28(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movl %eax, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movq %rdi, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movl %r8d, 0xb8(%rsp)
movl %r9d, 0xb4(%rsp)
callq 0x1b3d0
testb $0x1, %al
jne 0x19e00
jmp 0x19e10
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x19f53
leaq 0x80(%rsp), %rdi
callq 0x1b420
movl $0x0, 0x7c(%rsp)
movq 0x30(%rsp), %rdi
movl 0x7c(%rsp), %eax
movq %rax, 0x20(%rsp)
callq 0x92c0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x19eaf
movq 0x30(%rsp), %rdi
movl 0x7c(%rsp), %eax
movl %eax, %esi
callq 0x92e0
movq (%rax), %rax
addq $0x107, %rax            # imm = 0x107
movq %rax, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x7c(%rsp), %rsi
callq 0x1b430
movq %rax, 0x18(%rsp)
jmp 0x19e7c
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x7920
jmp 0x19e8d
jmp 0x19e8f
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0x19e25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x19f44
movl 0xd0(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0xcc(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x1b520
jmp 0x19ed9
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edi
movl 0xbc(%rsp), %ecx
movl 0xb8(%rsp), %r8d
movl 0xb4(%rsp), %r9d
leaq 0x38(%rsp), %rdx
callq 0x19f70
movl %eax, 0x4(%rsp)
jmp 0x19f08
movl 0x4(%rsp), %eax
movl %eax, 0xd4(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1b550
leaq 0x80(%rsp), %rdi
callq 0x1b550
jmp 0x19f53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1b550
leaq 0x80(%rsp), %rdi
callq 0x1b550
jmp 0x19f62
movl 0xd4(%rsp), %eax
addq $0xd8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x7c40
nopl (%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::selectBox(int, int, int, bool)
void Tab::selectBox(int w, int px, int py, bool selected)
{
    if (selected) {
        wattron(ui.window, COLOR_PAIR(COLOR_SELECTED));
    } else {
        wattron(ui.window, COLOR_PAIR(COLOR_DEFAULT));
    }

    mvwaddstr(ui.window, py + 1, px + 2, "Digital Stereo (HDMI) Output");

    if (selected) {
        wattroff(ui.window, COLOR_PAIR(COLOR_SELECTED));
    } else {
        wattroff(ui.window, COLOR_PAIR(COLOR_DEFAULT));
    }

    borderBox(w, 2, px, py);
}

// Assembly:
subq $0x18, %rsp
movb %cl, %al
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
andb $0x1, %al
movb %al, 0xb(%rsp)
testb $0x1, 0xb(%rsp)
je 0x1acfa
leaq 0x10c12(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x7360
jmp 0x1ad13
leaq 0x10bf7(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl $0x900, %esi            # imm = 0x900
xorl %eax, %eax
movl %eax, %edx
callq 0x7360
leaq 0x10bde(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
addl $0x1, %esi
movl 0x10(%rsp), %edx
addl $0x2, %edx
callq 0x76f0
cmpl $-0x1, %eax
jne 0x1ad38
jmp 0x1ad54
leaq 0x10bb9(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
leaq 0x6db0(%rip), %rsi      # 0x21afa
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7220
testb $0x1, 0xb(%rsp)
je 0x1ad76
leaq 0x10b96(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x78b0
jmp 0x1ad8f
leaq 0x10b7b(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl $0x900, %esi            # imm = 0x900
xorl %eax, %eax
movl %eax, %edx
callq 0x78b0
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x2, %esi
callq 0x184b0
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::fillW(int, int, int, int, char const*)
void Tab::fillW(int w, int h, int offset_x, int offset_y, const char *str)
{
    int wo = (w - offset_x);

    wattron(ui.window, COLOR_PAIR(COLOR_BORDER));

    for (int i = 0; i < wo; i++) {
        mvwaddstr(ui.window, offset_y, offset_x + i, str);
    }

    wattroff(ui.window, COLOR_PAIR(COLOR_BORDER));
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movl 0x24(%rsp), %eax
subl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x10b1c(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl $0xd00, %esi            # imm = 0xD00
xorl %eax, %eax
movl %eax, %edx
callq 0x7360
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x1ae4a
leaq 0x10af1(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl 0x18(%rsp), %esi
movl 0x1c(%rsp), %edx
addl 0x8(%rsp), %edx
callq 0x76f0
cmpl $-0x1, %eax
jne 0x1ae23
jmp 0x1ae3d
leaq 0x10ace(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7220
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x1adf6
leaq 0x10aa7(%rip), %rax     # 0x2b8f8
movq 0x10(%rax), %rdi
movl $0xd00, %esi            # imm = 0xD00
xorl %eax, %eax
movl %eax, %edx
callq 0x78b0
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::getVolumeColor(int)
unsigned int Tab::getVolumeColor(int p)
{
    if (p < 33) {
        return COLOR_VOLUME_LOW;
    } else if (p < 66) {
        return COLOR_VOLUME_MID;
    } else {
        return COLOR_VOLUME_HIGH;
    }
}

// Assembly:
movl %edi, -0x8(%rsp)
cmpl $0x21, -0x8(%rsp)
jge 0x1ae85
movl $0x4, -0x4(%rsp)
jmp 0x1ae9e
cmpl $0x42, -0x8(%rsp)
jge 0x1ae96
movl $0x5, -0x4(%rsp)
jmp 0x1ae9e
movl $0x6, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::getBarColor(int)
unsigned int Tab::getBarColor(int p)
{
    if (p < 33) {
        return COLOR_BAR_LOW;
    } else if (p < 66) {
        return COLOR_BAR_MID;
    } else {
        return COLOR_BAR_HIGH;
    }
}

// Assembly:
movl %edi, -0x8(%rsp)
cmpl $0x21, -0x8(%rsp)
jge 0x1aec5
movl $0x1, -0x4(%rsp)
jmp 0x1aede
cmpl $0x42, -0x8(%rsp)
jge 0x1aed6
movl $0x2, -0x4(%rsp)
jmp 0x1aede
movl $0x3, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: fulhax[P]ncpamixer/src/ui/tabs/configuration.cpp
// Function: Configuration::Configuration()
Configuration::Configuration()
{
    object = &pulse.PA_CARDS;
    toggle = nullptr;

    selected_index = pulse.exists(*object, -1);

    has_volume = false;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x17230
movq 0x8(%rsp), %rax
leaq 0xbcbc(%rip), %rcx      # 0x2ac40
movq %rcx, (%rax)
leaq 0xc77a(%rip), %rcx      # 0x2b708
addq $0xc8, %rcx
movq %rcx, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq 0x10(%rax), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1b110
jmp 0x1efb1
leaq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xb900
movl %eax, 0x4(%rsp)
jmp 0x1efc6
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movl %ecx, 0xc(%rax)
leaq 0x20(%rsp), %rdi
callq 0xd070
movq 0x8(%rsp), %rax
movb $0x0, 0x8(%rax)
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0x1f012
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0xd070
movq 0x8(%rsp), %rdi
callq 0x1b890
movq 0x18(%rsp), %rdi
callq 0x7c40
nopw %cs:(%rax,%rax)
// File: miklhh[P]tetris/src/draw.cpp
// Function: draw_box(int, int, int, int, int, int, SDL_Renderer*, int)
void draw_box(
    int             x_px,
    int             y_px,
    int             w_px,
    int             h_px,
    color_t         color_forth,
    color_t         color_back,
    SDL_Renderer*   renderer,
    int             margin
)
{
	/* Create rectangles. */
	SDL_Rect rectangle_outer;
	SDL_Rect rectangle_inner;

	/* Set parameters. */
	rectangle_outer.h = h_px;
	rectangle_outer.w = w_px;
	rectangle_outer.x = x_px;
	rectangle_outer.y = y_px;

	rectangle_inner.h = h_px - 2 * margin;
	rectangle_inner.w = w_px - 2 * margin;
	rectangle_inner.x = x_px + margin;
	rectangle_inner.y = y_px + margin;

	/* Draw outer rectangle. */
	SetColor(color_back, renderer);
	SDL_RenderFillRect(renderer, &rectangle_outer);
	SDL_RenderDrawRect(renderer, &rectangle_outer);


	/* Draw inner rectangle. */
	SetColor(color_forth, renderer);
	SDL_RenderFillRect(renderer, &rectangle_inner);
	SDL_RenderDrawRect(renderer, &rectangle_inner);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl %r9d, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x10(%rbp), %eax
movl 0x18(%rbp), %ecx
shll %ecx
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
movl 0x18(%rbp), %ecx
shll %ecx
subl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x4(%rbp), %eax
addl 0x18(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x8(%rbp), %eax
addl 0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x18(%rbp), %edi
movq 0x10(%rbp), %rsi
callq 0x2520
movq 0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x20e0
movq 0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2140
movl -0x14(%rbp), %edi
movq 0x10(%rbp), %rsi
callq 0x2520
movq 0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x20e0
movq 0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2140
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: miklhh[P]tetris/src/draw.cpp
// Function: SetColor(int, SDL_Renderer*)
static void SetColor(int color, SDL_Renderer* renderer)
{
	switch (color)
	{
	case COLOR_BLUE:
		SDL_SetRenderDrawColor(renderer, 0, 0, 255, 0);
		break;

	case COLOR_RED:
		SDL_SetRenderDrawColor(renderer, 255, 0, 0, 0);
		break;

	case COLOR_GREEN:
		SDL_SetRenderDrawColor(renderer, 0, 255, 0, 0);
		break;

	case COLOR_WHITE:
		SDL_SetRenderDrawColor(renderer, 255, 255, 255, 0);
		break;

	case COLOR_BLACK:
		SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
		break;

	case COLOR_GREY:
		SDL_SetRenderDrawColor(renderer, 110, 110, 80, 0);
		break;

	case COLOR_DARK_GREY:
		SDL_SetRenderDrawColor(renderer, 25, 25, 20, 0);
		break;

	case COLOR_TRANS_WHITE:
		SDL_SetRenderDrawColor(renderer, 240, 240, 240, 210);
		break;

	default:
		SDL_SetRenderDrawColor(renderer, 255, 255, 255, 0);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x8, %rax
ja 0x2624
movq -0x18(%rbp), %rax
leaq 0x2ab9(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
xorl %r8d, %r8d
movl $0xff, %ecx
movl %r8d, %esi
movl %r8d, %edx
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
movl $0xff, %esi
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
xorl %r8d, %r8d
movl $0xff, %edx
movl %r8d, %esi
movl %r8d, %ecx
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
movl $0xff, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
movl $0x6e, %edx
movl $0x50, %ecx
xorl %r8d, %r8d
movl %edx, %esi
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
movl $0x19, %edx
movl $0x14, %ecx
xorl %r8d, %r8d
movl %edx, %esi
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
movl $0xf0, %ecx
movl $0xd2, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x21f0
jmp 0x2639
movq -0x10(%rbp), %rdi
movl $0xff, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x21f0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: miklhh[P]tetris/src/draw.cpp
// Function: draw_block(block_t, int, int)
void draw_block(block_t block, int tile_x, int tile_y)
{
	extern int block_width;
	extern int block_height;
	extern SDL_Renderer* renderer;

	for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
	{
		for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
		{
			if (block.structure.tile[y][x] == FILLED)
			{
				draw_box(
					(tile_x + x) * block_width,
					(tile_y + y) * block_width,
					block_width,
					block_height,
					block.color,
					COLOR_BLOCK_BACKGROUND,
					renderer
				);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x4, -0xc(%rbp)
jge 0x270f
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x26ff
movq -0x18(%rbp), %rax
addq $0x10, %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x26ef
movq -0x18(%rbp), %rax
movl -0x4(%rbp), %edi
addl -0x10(%rbp), %edi
leaq 0x64e2(%rip), %rcx      # 0x8b88
imull (%rcx), %edi
movl -0x8(%rbp), %esi
addl -0xc(%rbp), %esi
leaq 0x64d2(%rip), %rcx      # 0x8b88
imull (%rcx), %esi
leaq 0x64c8(%rip), %rcx      # 0x8b88
movl (%rcx), %edx
leaq 0x64c3(%rip), %rcx      # 0x8b8c
movl (%rcx), %ecx
movl (%rax), %r8d
leaq 0x64a3(%rip), %rax      # 0x8b78
movq (%rax), %rax
movl $0x8, %r9d
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x2460
jmp 0x26f1
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x266e
jmp 0x2701
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x265d
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: miklhh[P]tetris/src/draw.cpp
// Function: draw_block(block_t*, int, int)
void draw_block(block_t * block, int tile_x, int tile_y)
{
    extern int block_width;
    extern int block_height;
    extern SDL_Renderer* renderer;

    for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
    {
        for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
        {
            if (block->structure.tile[y][x] == FILLED)
            {
                draw_box(
                    (tile_x + x) * block_width,
                    (tile_y + y) * block_width,
                    block_width,
                    block_height,
                    block->color,
                    COLOR_BLOCK_BACKGROUND,
                    renderer
                );
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x27eb
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x27db
movq -0x8(%rbp), %rax
addq $0x10, %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x27cb
movl -0xc(%rbp), %edi
addl -0x18(%rbp), %edi
leaq 0x640a(%rip), %rax      # 0x8b88
imull (%rax), %edi
movl -0x10(%rbp), %esi
addl -0x14(%rbp), %esi
leaq 0x63fa(%rip), %rax      # 0x8b88
imull (%rax), %esi
leaq 0x63f0(%rip), %rax      # 0x8b88
movl (%rax), %edx
leaq 0x63eb(%rip), %rax      # 0x8b8c
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl (%rax), %r8d
leaq 0x63c7(%rip), %rax      # 0x8b78
movq (%rax), %rax
movl $0x8, %r9d
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x2460
jmp 0x27cd
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x274a
jmp 0x27dd
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2739
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: miklhh[P]tetris/src/exit_game.cpp
// Function: exit_game(SDL_Window*, SDL_Renderer*)
void exit_game(SDL_Window* window, SDL_Renderer* renderer)
{
    if (window != NULL)
    {
        SDL_DestroyWindow(window);
    }
    if (renderer != NULL)
    {
        SDL_DestroyRenderer(renderer);
    }
    SDL_Quit();
    std::cout << "SDL-resources returned to system." << std::endl;
    
    #ifdef _WIN32
    system("pause");
    #endif
    
    exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2820
movq -0x8(%rbp), %rdi
callq 0x2030
cmpq $0x0, -0x10(%rbp)
je 0x2830
movq -0x10(%rbp), %rdi
callq 0x20c0
callq 0x2070
movq 0x579c(%rip), %rdi      # 0x7fd8
leaq 0x27e5(%rip), %rsi      # 0x5028
callq 0x21a0
movq %rax, %rdi
movq 0x5776(%rip), %rsi      # 0x7fc8
callq 0x21d0
xorl %edi, %edi
callq 0x21e0
nop
// File: miklhh[P]tetris/src/game.cpp
// Function: setup_game()
void setup_game()
{
    /* Set random seed. */
    srand((unsigned int)time(NULL));

    /* Setup a 'fresh' gamefield. */
	for (int width = 0; width < GRID_WIDTH; width++)
	{
		for (int height = 0; height < GRID_HEIGHT; height++)
		{
			field[height][width].tile      = EMPTY;
			field[height][width].color_f   = COLOR_BACKGROUND_FORTH;
			field[height][width].color_b   = COLOR_BACKGROUND_BACK;
		}
	}

    /* Set variables. */
    game_over     = false;
    current_block = block_spawn();
    next_block    = block_spawn();
    set_iteration_timer(800);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movl %eax, %edi
callq 0x2170
movl %eax, %edi
callq 0x2190
movl $0x0, -0x4(%rbp)
cmpl $0xa, -0x4(%rbp)
jge 0x296c
movl $0x0, -0x8(%rbp)
cmpl $0x14, -0x8(%rbp)
jge 0x295c
movslq -0x8(%rbp), %rcx
leaq 0x587f(%rip), %rax      # 0x8170
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movslq -0x8(%rbp), %rcx
leaq 0x585b(%rip), %rax      # 0x8170
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x7, (%rax)
movslq -0x8(%rbp), %rcx
leaq 0x5838(%rip), %rax      # 0x8170
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x6, 0x4(%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x28e0
jmp 0x295e
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x28cf
movb $0x0, 0x615d(%rip)      # 0x8ad0
movl $0x7, %edi
movl $0x4, %esi
xorl %edx, %edx
movl $0x3, %ecx
callq 0x29c0
movq %rax, 0x6148(%rip)      # 0x8ad8
movl $0x7, %edi
movl $0x4, %esi
xorl %edx, %edx
movl $0x3, %ecx
callq 0x29c0
movq %rax, 0x6133(%rip)      # 0x8ae0
movl $0x320, %edi            # imm = 0x320
callq 0x2b50
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: miklhh[P]tetris/src/game.cpp
// Function: set_iteration_timer(int)
void set_iteration_timer(int time_ms)
{
    if (time_ms == 0)
    {
        current_iteration_wait_time_ms = iteration_wait_time_level_ms;
    }
    else
    {
        iteration_wait_time_level_ms = time_ms;
        current_iteration_wait_time_ms = time_ms;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x2b6b
movl 0x5f91(%rip), %eax      # 0x8af4
movl %eax, 0x5f87(%rip)      # 0x8af0
jmp 0x2b7d
movl -0x4(%rbp), %eax
movl %eax, 0x5f80(%rip)      # 0x8af4
movl -0x4(%rbp), %eax
movl %eax, 0x5f73(%rip)      # 0x8af0
popq %rbp
retq
nop
// File: miklhh[P]tetris/src/game.cpp
// Function: block_move(block_t*, int)
void block_move(block_t* block, direction_t direction)
{
	switch (direction)
	{
	case DIRECTION_LEFT:
		block->position.x += -1;
		break;

	case DIRECTION_RIGHT:
		block->position.x += 1;
		break;

	case DIRECTION_UP:
		block->position.y += -1;
		break;

	case DIRECTION_DOWN:
		block->position.y += 1;
		break;

	default:
		std::cout << "Error, tried to move block in non defined direction. " << std::endl;
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x2bec
movq -0x18(%rbp), %rax
leaq 0x24c1(%rip), %rcx      # 0x5068
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x2c0e
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x2c0e
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x2c0e
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x2c0e
movq 0x53e5(%rip), %rdi      # 0x7fd8
leaq 0x26e3(%rip), %rsi      # 0x52dd
callq 0x21a0
movq %rax, %rdi
movq 0x53bf(%rip), %rsi      # 0x7fc8
callq 0x21d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: miklhh[P]tetris/src/game.cpp
// Function: block_rotate(block_t*, bool)
void block_rotate(block_t* block, rotation_t counter_clockwise)
{
	/* Switch statement for all the blocks. */
	switch (block->block_type)
	{
	case BLOCK_I:
		/* Rotate normaly within all the four tiles.*/
		rotate_block_matrix(block, counter_clockwise, 4);
		break;

	case BLOCK_J:
		/* Rotate normaly within the upper left three tiles. */
		rotate_block_matrix(block, counter_clockwise, 3);
		break;

	case BLOCK_L:
		/* Rotate normaly within the upper left three tiles. */
		rotate_block_matrix(block, counter_clockwise, 3);
		break;

	case BLOCK_O:
		/* Do not rotate this block at all. */
		break;

	case BLOCK_S:
		/* Rotate normaly within the upper left three tiles. */
		rotate_block_matrix(block, counter_clockwise, 3);
		break;

	case BLOCK_T:
		/* Rotate normaly within the upper left three tiles. */
		rotate_block_matrix(block, counter_clockwise, 3);
		break;

	case BLOCK_Z:
		/* Rotate normaly within the upper left three tiles. */
		rotate_block_matrix(block, counter_clockwise, 3);
		break;

	default:
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x6, %rax
ja 0x2cef
movq -0x18(%rbp), %rax
leaq 0x2424(%rip), %rcx      # 0x5078
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movl $0x4, %edx
andb $0x1, %al
movzbl %al, %esi
callq 0x2d00
jmp 0x2cf1
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movl $0x3, %edx
andb $0x1, %al
movzbl %al, %esi
callq 0x2d00
jmp 0x2cf1
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movl $0x3, %edx
andb $0x1, %al
movzbl %al, %esi
callq 0x2d00
jmp 0x2cf1
jmp 0x2cf1
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movl $0x3, %edx
andb $0x1, %al
movzbl %al, %esi
callq 0x2d00
jmp 0x2cf1
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movl $0x3, %edx
andb $0x1, %al
movzbl %al, %esi
callq 0x2d00
jmp 0x2cf1
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movl $0x3, %edx
andb $0x1, %al
movzbl %al, %esi
callq 0x2d00
jmp 0x2cf1
jmp 0x2cf1
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)