LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movss %xmm0, 0xc(%rsp)
movl %esi, %ebx
movq %rdi, %r14
movq 0x50(%rdi), %rax
leaq 0x40(%rdi), %r15
cmpq %r15, %rax
je 0x9087
movq 0x28(%rax), %rcx
cmpl %ebx, 0x21c(%rcx)
jne 0x907d
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x228(%rcx)
movq %rax, %rdi
callq 0x6450
jmp 0x905e
movq 0x80(%r14), %rax
leaq 0x70(%r14), %r15
cmpq %r15, %rax
je 0x90bb
movq 0x28(%rax), %rcx
cmpl %ebx, 0x21c(%rcx)
jne 0x90b1
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x228(%rcx)
movq %rax, %rdi
callq 0x6450
jmp 0x9092
movq 0xb0(%r14), %rax
addq $0xa0, %r14
cmpq %r14, %rax
je 0x90f2
movq 0x28(%rax), %rcx
cmpl %ebx, 0x21c(%rcx)
jne 0x90e8
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x228(%rcx)
movq %rax, %rdi
callq 0x6450
jmp 0x90c9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movl %esi, %ecx
movq %rdi, %rbx
leaq 0x3c(%rsp), %r14
movb $0x1, 0x8(%r14)
movabsq $0x1900000005, %rax     # imm = 0x1900000005
movq %rax, (%r14)
movabsq $0x400000000, %rax      # imm = 0x400000000
andq $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
orl $-0x1, 0xc(%rsp)
leaq 0x7245(%rip), %rdx      # 0x1038a
xorl %r15d, %r15d
leaq 0x20(%rsp), %rdi
pushq $0x10
popq %rsi
xorl %eax, %eax
callq 0x69c0
movq 0x150(%rbx), %rdi
leaq 0x7228(%rip), %rsi      # 0x1038d
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x64f0
testq %rax, %rax
je 0x91c3
movq %rax, %r14
cmpl $-0x1, %ebp
je 0x9186
movq %r14, %rdi
movl %ebp, %esi
callq 0x67b0
leaq -0x279(%rip), %rsi      # 0x8f14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6530
leaq 0x20(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl $0x2a00, %ecx           # imm = 0x2A00
callq 0x6320
testl %eax, %eax
js 0x91b8
movq %r14, %r15
jmp 0x91c3
movq %r14, %rdi
callq 0x6740
xorl %r15d, %r15d
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/config.cpp
// Function: Config::getKeycodeName[abi:cxx11](char const*)
std::string Config::getKeycodeName(const char *keycode)
{
    if (keycode == nullptr) return {};
    if (keycode[0] == 0) return {};
    if (memcmp(keycode, KEY, KEY_SIZE) != 0) return {};
    if (strlen(keycode) < KEY_SIZE + 2) return {};
    const auto key_val{keycode + KEY_SIZE + 1};
    const auto is_vt100{key_val[0] == 'f' && key_val[1] == '.'};
    int k{0};
    try { k = std::stoi((is_vt100) ? key_val + 2 : key_val); }
    catch (const std::exception&) { return{}; }
    if (is_vt100) return { "VT100_F" + std::to_string(k - 79) };
    return {keyname(k)};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x96da
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x96da
leaq 0x6d1e(%rip), %rsi      # 0x103db
pushq $0x7
popq %rdx
movq %r14, %rdi
callq 0x65f0
testl %eax, %eax
jne 0x96da
movq %r14, %rdi
callq 0x62a0
cmpq $0x8, %rax
ja 0x96f8
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%r14), %rsi
cmpb $0x66, 0x8(%r14)
jne 0x9716
cmpb $0x2e, 0x9(%r14)
leaq 0xa(%r14), %rax
sete %r14b
cmoveq %rax, %rsi
jmp 0x9719
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xa1f6
leaq 0x8(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0xa1da
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x62b0
testb %r14b, %r14b
je 0x977b
addl $-0x4f, %ebp
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0xa255
leaq 0x6c82(%rip), %rsi      # 0x103e3
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa231
leaq 0x8(%rsp), %rdi
callq 0x62b0
jmp 0x96ea
movl %ebp, %edi
callq 0x6850
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa1f6
jmp 0x96ea
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x62b0
movq %r14, %rdi
callq 0x6ac0
movq %rdx, %r15
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x62b0
jmp 0x97c4
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0x97a4
movq %r14, %rdi
callq 0x6280
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
callq 0x69e0
jmp 0x96ea
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movq %rsi, %r14
movq 0x18(%rsi), %r15
addq $0x8, %r14
leaq 0x8(%rsp), %r12
cmpq %r14, %r15
je 0x9879
movq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x969c
cmpq $0x0, 0x10(%rsp)
je 0x9864
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa2ae
leaq 0x40(%r15), %rsi
movq %rax, %rdi
callq 0x6350
movq %r12, %rdi
callq 0x62b0
movq %r15, %rdi
callq 0x66b0
movq %rax, %r15
jmp 0x9834
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x989a
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x62b0
movq %rbx, %rdi
callq 0xa9aa
movq %r14, %rdi
callq 0x6ac0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x6b2f(%rip), %rdi      # 0x103eb
callq 0x6710
movq %rax, %rbx
testq %rax, %rax
jne 0x9945
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
pushq $0x46
popq %rdi
callq 0x6420
cmpq $-0x1, %rax
movl $0x4000, %r15d          # imm = 0x4000
cmovneq %rax, %r15
movq %r15, %rdi
callq 0x6040
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x6360
movq %r12, (%rsp)
callq 0x6310
movl %eax, %edi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x6c10
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x9954
movq 0x20(%rax), %rbx
movq %rsp, %rdi
callq 0xa314
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xe645(%rip), %rax      # 0x17fa0
movq (%rax), %rcx
leaq 0x6a8b(%rip), %rdi      # 0x103f0
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x6bb0
pushq $0x1
popq %rdi
callq 0x6700
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa314
movq %rbx, %rdi
callq 0x6ac0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
cmpb $0x0, 0x28(%rsi)
je 0x9ca4
movq %rsi, %rbx
leaq 0x28(%rsp), %r15
andl $0x0, (%r15)
callq 0x63a0
movq %rax, 0x8(%r15)
movq %rbx, %rdi
callq 0xa47c
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa48c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa445
movl %eax, %ebx
testb %al, %al
je 0x9cb5
leaq 0x38(%rsp), %rdi
movq %rsp, %rsi
leaq 0x28(%rsp), %rdx
callq 0x64b0
addq $0x30, %r14
leaq 0x38(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x70de
movq %r15, %rdi
callq 0x6ffc
movq %rsp, %rdi
callq 0x6ffc
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x998c
movq 0xe2e4(%rip), %rax      # 0x17fa0
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x67ac(%rip), %rsi      # 0x10476
xorl %eax, %eax
callq 0x6860
jmp 0x9c90
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6ffc
movq %rbx, %rdi
callq 0x6ac0
// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/config.cpp
// Function: Config::readConfig()
bool Config::readConfig()
{
    FILE *f = fopen(full_path.c_str(), "rb");
    if (f == nullptr) {
        fprintf(stderr, "Unable to open config file '%s'.\n", full_path.c_str());
        return false;
    }

    while (feof(f) == 0) {
      char line[MAX_LINE] = {0};
      bool instring = false;
      std::string key;
      std::string val;
      std::string *current = &key;

      if (fgets(&line[0], MAX_LINE, f) == nullptr) {
        break;
      }

      char *tmp = &line[0];

      while (*tmp != '\0' && *tmp != '\n' && *tmp != '\r') {
        if (*tmp == '=') {
          current = &val;
        } else if (*tmp == '#') {
          break;
        } else if (*tmp == '"') {
          instring = !instring;
        } else if (*tmp != ' ' || instring) {
          current->append(tmp, 1);
        }

        tmp++;
      }

      if (key.length() > 0) {
        config[key] = val;
      }
    }

    fclose(f);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x8(%rsp)
movq 0x30(%rdi), %rdi
leaq 0x676d(%rip), %rsi      # 0x10498
callq 0x66e0
movq %rax, %rbx
testq %rax, %rax
je 0x9e71
leaq 0x30(%rsp), %r12
pushq $0x1
popq %rbp
movq %rbx, %rdi
callq 0x68f0
testl %eax, %eax
jne 0x9e51
movl $0x12c, %edx            # imm = 0x12C
leaq 0x50(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x6360
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
xorl %ecx, %ecx
movb %cl, 0x20(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb %cl, 0x40(%rsp)
movq %r15, %rdi
movl $0x12c, %esi            # imm = 0x12C
movq %rbx, %rdx
callq 0x6940
testq %rax, %rax
je 0x9e3d
xorl %r14d, %r14d
leaq 0x10(%rsp), %r13
movzbl (%r15), %eax
cmpl $0x20, %eax
je 0x9de0
cmpl $0x22, %eax
je 0x9df6
cmpl $0x3d, %eax
je 0x9ddb
testl %eax, %eax
je 0x9e04
cmpl $0xa, %eax
je 0x9e04
cmpl $0xd, %eax
je 0x9e04
cmpl $0x23, %eax
jne 0x9de6
jmp 0x9e04
movq %r12, %r13
jmp 0x9dff
testb $0x1, %r14b
je 0x9dfc
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x60a0
jmp 0x9dff
xorb $0x1, %r14b
jmp 0x9dff
xorl %r14d, %r14d
incq %r15
jmp 0x9db3
cmpq $0x0, 0x18(%rsp)
je 0x9e26
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xa2ae
movq %rax, %rdi
movq %r12, %rsi
callq 0x6350
movq %r12, %rdi
callq 0x62b0
leaq 0x10(%rsp), %rdi
callq 0x62b0
jmp 0x9d44
leaq 0x30(%rsp), %rdi
callq 0x62b0
leaq 0x10(%rsp), %rdi
callq 0x62b0
movq %rbx, %rdi
callq 0x65b0
testq %rbx, %rbx
setne %al
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe128(%rip), %rax      # 0x17fa0
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdx
leaq 0x6610(%rip), %rsi      # 0x1049b
xorl %eax, %eax
callq 0x6860
jmp 0x9e59
jmp 0x9e96
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x62b0
leaq 0x10(%rsp), %rdi
callq 0x62b0
movq %rbx, %rdi
callq 0x6ac0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0xa1f6
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xadba
movq %rax, %r13
leaq 0x10(%rsp), %rdi
callq 0x62b0
leaq 0x8(%r14), %rax
cmpq %rax, %r13
jne 0x9f38
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0xa1f6
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xa4c6
movq %rax, %rdi
movq %r12, %rsi
callq 0x6350
leaq 0x10(%rsp), %rdi
callq 0x62b0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0xa1f6
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xa4c6
movq %rbx, %rdi
movq %rax, %rsi
callq 0x67d0
leaq 0x10(%rsp), %rdi
callq 0x62b0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x9f85
jmp 0x9f8a
jmp 0x9f85
jmp 0x9f8a
movq %rax, %rbx
jmp 0x9f97
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x62b0
movq %rbx, %rdi
callq 0x6ac0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
leaq 0xcaf1(%rip), %rax      # 0x17ab0
movq %rax, (%rdi)
pushq $0x30
popq %rax
leaq (%rdi,%rax), %rcx
movq %rcx, -0x10(%rdi,%rax)
andq $0x0, -0x8(%rdi,%rax)
movb $0x0, (%rdi,%rax)
addq $0x20, %rax
cmpq $0xf0, %rax
jne 0xafc5
leaq 0xf0(%rdi), %rax
movq %rax, 0xe0(%rdi)
andq $0x0, 0xe8(%rdi)
movb $0x0, 0xf0(%rdi)
movups 0xcab8(%rip), %xmm0     # 0x17ac0
movups %xmm0, 0x108(%rdi)
movups 0xcaba(%rip), %xmm0     # 0x17ad0
movups %xmm0, 0x118(%rdi)
movq 0xcabc(%rip), %rax      # 0x17ae0
movq %rax, 0x128(%rdi)
andq $0x0, 0x138(%rdi)
andl $0x0, 0x130(%rdi)
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
andl $0x0, 0x100(%rdi)
andw $0x0, 0x104(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::switchTab(int)
void Ui::switchTab(int index)
{
    if (disconnect) {
        return;
    }

    delete current_tab;

    tab_index = index;

    switch (index) {
        default:
        case TAB_PLAYBACK:
            tab_index = TAB_PLAYBACK;
            current_tab = new Playback();
            break;

        case TAB_RECORDING:
            current_tab = new Recording();
            break;

        case TAB_OUTPUT:
            current_tab = new Output();
            break;

        case TAB_INPUT:
            current_tab = new Input();
            break;

        case -1:
        case TAB_CONFIGURATION:
            tab_index = TAB_CONFIGURATION;
            current_tab = new Configuration();
            break;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x105(%rdi)
jne 0xbbf2
movl %esi, %r14d
movq %rdi, %rbx
movq 0x138(%rdi), %rdi
testq %rdi, %rdi
je 0xbb53
movq (%rdi), %rax
callq *0x8(%rax)
movl %r14d, 0x130(%rbx)
incl %r14d
cmpl $0x5, %r14d
ja 0xbb92
leaq 0x5b3a(%rip), %rax      # 0x116a4
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x4, 0x130(%rbx)
pushq $0x28
popq %rdi
callq 0x65c0
movq %rax, %r14
movq %rax, %rdi
callq 0xf194
jmp 0xbbeb
andl $0x0, 0x130(%rbx)
pushq $0x28
popq %rdi
callq 0x65c0
movq %rax, %r14
movq %rax, %rdi
callq 0xef80
jmp 0xbbeb
pushq $0x28
popq %rdi
callq 0x65c0
movq %rax, %r14
movq %rax, %rdi
callq 0xf008
jmp 0xbbeb
pushq $0x28
popq %rdi
callq 0x65c0
movq %rax, %r14
movq %rax, %rdi
callq 0xf094
jmp 0xbbeb
pushq $0x28
popq %rdi
callq 0x65c0
movq %rax, %r14
movq %rax, %rdi
callq 0xf114
movq %r14, 0x138(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0xbc02
jmp 0xbc02
jmp 0xbc02
jmp 0xbc02
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x65d0
movq %rbx, %rdi
callq 0x6ac0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbx
movq %rdi, %rbx
leaq 0xca15(%rip), %rcx      # 0x18638
movb 0x105(%rdi), %al
cmpb $0x0, 0x1(%rcx)
je 0xbc49
testb %al, %al
je 0xbc96
movb $0x0, 0x105(%rbx)
movl 0x130(%rbx), %esi
movq %rbx, %rdi
popq %rbx
jmp 0xbb2a
testb %al, %al
jne 0xbc96
movb $0x1, 0x105(%rbx)
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0xbc66
movq (%rdi), %rax
callq *0x8(%rax)
pushq $0x28
popq %rdi
callq 0x65c0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
movb $0x1, 0x8(%rax)
leaq 0xbfe8(%rip), %rcx      # 0x17c70
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x138(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::draw()
void Ui::draw()
{
    werase(window);
    current_tab->draw();
    wrefresh(window);

    statusBar();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x6080
movq 0x138(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x10(%rbx), %rdi
callq 0x6680
movq %rbx, %rdi
popq %rbx
jmp 0xc408
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x6080
xorl %r15d, %r15d
pushq $-0x1
popq %rbp
xorl %r14d, %r14d
cmpq $0x5, %r15
je 0xc4b5
movl 0x130(%rbx), %eax
xorl %esi, %esi
cmpq %rax, %r15
sete %sil
movq 0x18(%rbx), %rdi
shll $0x8, %esi
addl $0x900, %esi            # imm = 0x900
xorl %edx, %edx
callq 0x62e0
movq 0x18(%rbx), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xc477
movq 0x18(%rbx), %rdi
movq 0x108(%rbx,%r15,8), %rsi
movl %ebp, %edx
callq 0x61f0
movq 0x108(%rbx,%r15,8), %rdi
callq 0x62a0
addl %eax, %r14d
incl %r14d
movl 0x130(%rbx), %eax
xorl %esi, %esi
cmpq %rax, %r15
sete %sil
movq 0x18(%rbx), %rdi
shll $0x8, %esi
addl $0x900, %esi            # imm = 0x900
xorl %edx, %edx
callq 0x6760
incq %r15
jmp 0xc424
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6680
// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::run()
void Ui::run()
{
    while (running) {
        checkPulseAudio();
        draw();

        usleep(20000);

        handleInput();
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x104(%rbx)
jne 0xc4f9
movq %rbx, %rdi
callq 0xbc18
movq %rbx, %rdi
callq 0xc3dc
movl $0x4e20, %edi           # imm = 0x4E20
callq 0x6840
movq %rbx, %rdi
callq 0xbc98
jmp 0xc4cc
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::borderBox(int, int, int, int)
void Tab::borderBox(int w, int h, int px, int py)
{
    wattron(ui.window, COLOR_PAIR(COLOR_BORDER));

    mvwvline(ui.window, py, px, ACS_VLINE, h);
    mvwvline(ui.window, py, px + w, ACS_VLINE, h);

    mvwhline(ui.window, py, px, ACS_HLINE, w);
    mvwhline(ui.window, py + h, px, ACS_HLINE, w);

    mvwhline(ui.window, py, px, ACS_ULCORNER, 1);
    mvwhline(ui.window, py, px + w, ACS_URCORNER, 1);

    mvwhline(ui.window, py + h, px, ACS_LLCORNER, 1);
    mvwhline(ui.window, py + h, px + w, ACS_LRCORNER, 1);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %r14d
movl %esi, %ebx
movl %edi, %r12d
leaq 0xb98b(%rip), %r13      # 0x18828
movq 0x10(%r13), %rdi
movl $0xd00, %esi            # imm = 0xD00
xorl %edx, %edx
callq 0x62e0
movq 0x10(%r13), %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xced9
movq 0x10(%r13), %rdi
movq 0xb064(%rip), %rax      # 0x17f30
movl 0x1e0(%rax), %esi
movl %ebx, %edx
callq 0x6750
movq 0x10(%r13), %rdi
leal (%r14,%r12), %ebp
movl %r15d, %esi
movl %ebp, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xcf08
movq 0x10(%r13), %rdi
movq 0xb035(%rip), %rax      # 0x17f30
movl 0x1e0(%rax), %esi
movl %ebx, %edx
callq 0x6750
movq 0x10(%r13), %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xcf35
movq 0x10(%r13), %rdi
movq 0xb009(%rip), %rax      # 0x17f30
movl 0x1c4(%rax), %esi
movl %r12d, %edx
callq 0x6560
movq 0x10(%r13), %rdi
addl %r15d, %ebx
movl %ebx, %esi
movl %r14d, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xcf64
movq 0x10(%r13), %rdi
movq 0xafda(%rip), %rax      # 0x17f30
movl 0x1c4(%rax), %esi
movl %r12d, %edx
callq 0x6560
movq 0x10(%r13), %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xcf91
movq 0x10(%r13), %rdi
movq 0xafad(%rip), %rax      # 0x17f30
movl 0x1b0(%rax), %esi
pushq $0x1
popq %rdx
callq 0x6560
movq 0x10(%r13), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xcfbd
movq 0x10(%r13), %rdi
movq 0xaf81(%rip), %rax      # 0x17f30
movl 0x1ac(%rax), %esi
pushq $0x1
popq %rdx
callq 0x6560
movq 0x10(%r13), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xcfe9
movq 0x10(%r13), %rdi
movq 0xaf55(%rip), %rax      # 0x17f30
movl 0x1b4(%rax), %esi
pushq $0x1
popq %rdx
callq 0x6560
movq 0x10(%r13), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xd014
movq 0x10(%r13), %rdi
movq 0xaf2a(%rip), %rax      # 0x17f30
movl 0x1a8(%rax), %esi
pushq $0x1
popq %rdx
callq 0x6560
movq 0x10(%r13), %rdi
movl $0xd00, %esi            # imm = 0xD00
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6760
// File: /workspace/github_cpp_makefile_star2_O2/fulhax[P]ncpamixer/src/ui/tab.cpp
// Function: Tab::handleDropDown(PaObject*)
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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movb 0x8(%rdi), %r15b
leaq 0xb2af(%rip), %rax      # 0x18828
movzbl 0x101(%rax), %ecx
andl $0x1, %ecx
xorl $0x5, %ecx
movzbl 0x102(%rax), %edx
subl %edx, %ecx
testb %r15b, %r15b
pushq $0x5
popq %r12
cmovnel %ecx, %r12d
testq %rsi, %rsi
je 0xd699
movq %rsi, %rbx
movq 0x18(%rdi), %rsi
movl 0x20(%rdi), %r14d
movl 0x24(%rdi), %r13d
testq %rsi, %rsi
je 0xd618
leaq 0x18(%rsp), %rdi
callq 0xe628
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
decl %r13d
imull %r12d, %r13d
imull %r12d, %r14d
cmpl %r14d, %r13d
cmovll %r13d, %r14d
pushq $-0x1
popq %rdi
leaq 0x18(%rsp), %rdx
movl %r14d, %esi
movl %eax, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xdada
movl %eax, %ebp
leaq 0x18(%rsp), %rdi
callq 0x92e2
cmpl $-0x1, %ebp
je 0xd699
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7436
jmp 0xd699
movl 0x8(%rax), %ebp
leaq 0x238(%rbx), %rsi
movq %rsp, %rdi
callq 0xe564
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
decl %r13d
imull %r12d, %r13d
imull %r12d, %r14d
cmpl %r14d, %r13d
cmovll %r13d, %r14d
leal 0x2(%r14), %esi
movzbl %r15b, %edi
negl %edi
orl $0x1, %edi
addl $-0x3, %ebp
xorl %ecx, %ecx
testb %r15b, %r15b
cmovnel %r14d, %esi
cmovnel %ecx, %ebp
movq %rsp, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0xdbe2
movl %eax, %ebp
movq %rsp, %rdi
callq 0x7530
cmpl $-0x1, %ebp
je 0xd699
movl %ebp, %eax
movq 0x238(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x746c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7530
jmp 0xd6c2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x92e2
movq %rbx, %rdi
callq 0x6ac0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbx
movl 0x18(%rsp), %r9d
movl 0x10(%rsp), %eax
movl %edx, %edi
subl %eax, %edi
setge %r10b
leal (%rax,%r8), %r11d
cmpl %edx, %r11d
setg %dl
andb %r10b, %dl
leal -0x1(%r9), %r10d
cmpl %ecx, %r10d
setle %r10b
addl $0x2, %r9d
cmpl %ecx, %r9d
setg %bl
andb %r10b, %bl
andb %dl, %bl
cmpb $0x1, %bl
jne 0xda15
movl 0x20(%rsp), %ecx
cmpl $0x5, %ecx
je 0xd9e4
cmpl $0x4, %ecx
jne 0xd9f3
pushq $0x1
jmp 0xd9e6
pushq $-0x1
popq %rax
movq %rsi, %rdi
movl %eax, %esi
callq 0x73c0
jmp 0xda15
incl %edi
cvtsi2ss %edi, %xmm0
subl %eax, %r8d
cvtsi2ss %r8d, %xmm1
divss %xmm1, %xmm0
mulss 0x3f5b(%rip), %xmm0     # 0x11968
movq %rsi, %rdi
callq 0x7322
movl %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %r15d
movq (%rdx), %rax
movq 0x8(%rdx), %rsi
cmpq %rsi, %rax
je 0xdcc5
movq %rdx, %r13
movl %edi, %r12d
movl %ecx, 0xc(%rsp)
movl %r8d, 0x10(%rsp)
movl %r9d, 0x14(%rsp)
leaq 0x20(%rsp), %rdx
andl $0x0, (%rdx)
andq $0x0, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
andq $0x0, 0x20(%rdx)
xorl %edx, %edx
leaq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %rbp
movl %edx, 0x8(%rsp)
movl %edx, %edx
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rdx, %rsi
jbe 0xdc80
movq (%rax,%rdx,8), %r14
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xe5b2
addq $0x107, %r14            # imm = 0x107
movq %rax, %rdi
movq %r14, %rsi
callq 0x6b90
movl 0x8(%rsp), %edx
incl %edx
movq (%r13), %rax
movq 0x8(%r13), %rsi
jmp 0xdc3d
leaq 0x48(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe806
leaq 0x48(%rsp), %rdx
movl %r12d, %edi
movl %r15d, %esi
movl 0xc(%rsp), %ecx
movl 0x10(%rsp), %r8d
movl 0x14(%rsp), %r9d
callq 0xdd00
movl %eax, %ebx
leaq 0x48(%rsp), %rdi
callq 0xea9c
leaq 0x18(%rsp), %rdi
callq 0xea9c
jmp 0xdcc8
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xea9c
jmp 0xdced
jmp 0xdcea
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xea9c
movq %rbx, %rdi
callq 0x6ac0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %edi, %r15d
subl %edx, %r15d
leaq 0xa464(%rip), %r13      # 0x18828
movq 0x10(%r13), %rdi
xorl %r12d, %r12d
movl $0xd00, %esi            # imm = 0xD00
xorl %edx, %edx
callq 0x62e0
testl %r15d, %r15d
cmovlel %r12d, %r15d
pushq $-0x1
popq %r12
movq 0x10(%r13), %rdi
subl $0x1, %r15d
jb 0xe40f
movl %ebp, %esi
movl %r14d, %edx
callq 0x6610
cmpl $-0x1, %eax
je 0xe40a
movq 0x10(%r13), %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x61f0
incl %r14d
jmp 0xe3e2
movl $0xd00, %esi            # imm = 0xD00
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6760
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rdi)
movups %xmm0, 0x18(%rdi)
movb $0x1, 0x8(%rdi)
leaq 0x8a8c(%rip), %rax      # 0x17c40
movq %rax, (%rdi)
movl $0xc8, %esi
addq 0x8dd5(%rip), %rsi      # 0x17f98
movq %rsi, 0x10(%rdi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xe628
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x858e
movl %eax, 0xc(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x92e2
movb $0x0, 0x8(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x92e2
movq %rbx, %rdi
callq 0x6ac0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq 0x50(%rsp), %rbx
movl 0x58(%rsp), %eax
leaq 0x18(%rsp), %r15
movl %ecx, 0xc(%r15)
movl %edx, 0x8(%r15)
movl %edi, (%r15)
movl %esi, 0x4(%r15)
leal (%rax,%rax), %r8d
subl %r8d, %ecx
leaq 0x8(%rsp), %r14
movl %ecx, 0xc(%r14)
subl %r8d, %edx
movl %edx, 0x8(%r14)
addl %eax, %edi
movl %edi, (%r14)
addl %esi, %eax
movl %eax, 0x4(%r14)
movl %r9d, %edi
movq %rbx, %rsi
callq 0x2464
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2464
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpl $0x8, %edi
ja 0x247b
movl %edi, %eax
leaq 0x1b92(%rip), %rcx      # 0x4004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rsi, %rdi
movl $0xff, %esi
movl $0xff, %edx
jmp 0x2498
pushq $0x6e
popq %rdx
pushq $0x50
jmp 0x24a4
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0xff, %ecx
jmp 0x24e8
pushq $0x19
popq %rdx
pushq $0x14
popq %rcx
movq %rsi, %rdi
movl %edx, %esi
jmp 0x24e8
movq %rsi, %rdi
movl $0xf0, %esi
movl $0xf0, %edx
movl $0xf0, %ecx
movl $0xd2, %r8d
jmp 0x21d0
movq %rsi, %rdi
movl $0xff, %esi
jmp 0x24e4
movq %rsi, %rdi
xorl %esi, %esi
movl $0xff, %edx
jmp 0x24e6
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
jmp 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
leaq 0x60(%rsp), %r15
movl -0x10(%r15), %ebp
movl %edi, %r12d
xorl %ecx, %ecx
pushq $0x8
popq %r14
cmpq $0x4, %rcx
je 0x2582
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
leal (%rcx,%rax), %r13d
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x2574
cmpl $0x1, (%r15,%rbx,4)
jne 0x256f
leaq 0x4621(%rip), %rax      # 0x6b60
movl (%rax), %edx
leal (%r12,%rbx), %edi
imull %edx, %edi
movl %edx, %esi
imull %r13d, %esi
leaq 0x460f(%rip), %rax      # 0x6b64
movl (%rax), %ecx
movl %ebp, %r8d
movl %r14d, %r9d
pushq $0x2
leaq 0x45ea(%rip), %rax      # 0x6b50
pushq (%rax)
callq 0x23cc
popq %rax
popq %rcx
incq %rbx
jmp 0x252b
movq 0x10(%rsp), %rcx
incq %rcx
addq $0x10, %r15
jmp 0x2515
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, %r14
leaq 0x10(%rdi), %r15
movl %esi, %r12d
xorl %ecx, %ecx
pushq $0x8
popq %rbp
cmpq $0x4, %rcx
je 0x2620
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
leal (%rcx,%rax), %r13d
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x2612
cmpl $0x1, (%r15,%rbx,4)
jne 0x260d
leaq 0x4583(%rip), %rax      # 0x6b60
movl (%rax), %edx
leal (%r12,%rbx), %edi
imull %edx, %edi
movl %edx, %esi
imull %r13d, %esi
leaq 0x4571(%rip), %rax      # 0x6b64
movl (%rax), %ecx
movl (%r14), %r8d
movl %ebp, %r9d
pushq $0x2
leaq 0x454c(%rip), %rax      # 0x6b50
pushq (%rax)
callq 0x23cc
popq %rax
popq %rcx
incq %rbx
jmp 0x25c9
movq 0x10(%rsp), %rcx
incq %rcx
addq $0x10, %r15
jmp 0x25b3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x263e
callq 0x2030
testq %rbx, %rbx
je 0x264b
movq %rbx, %rdi
callq 0x20a0
callq 0x2070
movq 0x3981(%rip), %rdi      # 0x5fd8
leaq 0x19ca(%rip), %rsi      # 0x4028
callq 0x2190
movq %rax, %rdi
callq 0x20b0
xorl %edi, %edi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x2150
movl %eax, %edi
callq 0x2180
leaq 0x3a8b(%rip), %rax      # 0x6150
pushq $0x8
popq %rcx
movabsq $0x600000007, %rdx      # imm = 0x600000007
cmpq $0xa, %rbx
je 0x26fc
movq %rcx, %rsi
cmpq $0x968, %rsi            # imm = 0x968
je 0x26f3
andl $0x0, (%rax,%rsi)
movq %rdx, -0x8(%rax,%rsi)
addq $0x78, %rsi
jmp 0x26db
incq %rbx
addq $0xc, %rax
jmp 0x26d2
pushq $0x7
popq %rbx
pushq $0x4
popq %rbp
pushq $0x3
popq %r14
movl %ebx, %edi
movl %ebp, %esi
xorl %edx, %edx
movl %r14d, %ecx
callq 0x2746
movq %rax, 0x4395(%rip)      # 0x6ab0
movl %ebx, %edi
movl %ebp, %esi
xorl %edx, %edx
movl %r14d, %ecx
callq 0x2746
movq %rax, 0x4388(%rip)      # 0x6ab8
movl $0x320, %eax            # imm = 0x320
movl %eax, 0x4391(%rip)      # 0x6acc
movl %eax, 0x4387(%rip)      # 0x6ac8
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]tetris/src/game.cpp
// Function: rotate_block_matrix(block_t*, bool, int)
static void rotate_block_matrix(block_t* block, bool counter_clockwise, int matrix_size)
{
    /* Create a new block structure and initialize it to EMPTY. */
    block_struct_t rotated_block_structure;
    for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
    {
        for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
        {
            rotated_block_structure.tile[y][x] = EMPTY;
        }
    }
	
	if (counter_clockwise) 
	{
		/* Counter closewise rotation. */
		for (int y = 0; y < (matrix_size); y++)
		{
			for (int x = 0; x < (matrix_size); x++)
			{
				rotated_block_structure.tile[(matrix_size-1) - x][y] = block->structure.tile[y][x];
			}
		}
	}
	else
	{
		/* Clockwise rotation. */
		for (int y = 0; y < (matrix_size); y++)
		{
			for (int x = 0; x < (matrix_size); x++)
			{
				rotated_block_structure.tile[x][(matrix_size-1) - y] = block->structure.tile[y][x];
			}
		}
	}

	/* Give the rotated structure to the block. */
	block->structure = rotated_block_structure;
}

// Assembly:
pushq %rbx
leaq -0x40(%rsp), %rax
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x29af
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x29a6
andl $0x0, (%rax,%r8,4)
incq %r8
jmp 0x2996
incq %rcx
addq $0x10, %rax
jmp 0x298d
leaq 0x10(%rdi), %rax
xorl %ecx, %ecx
testl %edx, %edx
cmovgl %edx, %ecx
movl %edx, %r8d
testb %sil, %sil
je 0x2a00
decl %edx
xorl %esi, %esi
cmpq %rcx, %rsi
je 0x2a39
movl %edx, %r9d
xorl %r10d, %r10d
cmpq %r10, %r8
je 0x29f7
movl (%rax,%r10,4), %r11d
movslq %r9d, %r9
movq %r9, %rbx
shlq $0x4, %rbx
addq %rsp, %rbx
addq $-0x40, %rbx
movl %r11d, (%rbx,%rsi,4)
incq %r10
decl %r9d
jmp 0x29d1
incq %rsi
addq $0x10, %rax
jmp 0x29c6
shlq $0x2, %r8
decl %edx
xorl %esi, %esi
cmpq %rcx, %rsi
je 0x2a39
movslq %edx, %r9
leaq (%rsp,%r9,4), %r9
addq $-0x40, %r9
xorl %r10d, %r10d
cmpq %r10, %r8
je 0x2a2e
movl (%rax,%r10), %r11d
movl %r11d, (%r9,%r10,4)
addq $0x4, %r10
jmp 0x2a1b
incq %rsi
addq $0x10, %rax
decl %edx
jmp 0x2a08
movups -0x40(%rsp), %xmm0
movups -0x30(%rsp), %xmm1
movups -0x20(%rsp), %xmm2
movups -0x10(%rsp), %xmm3
movups %xmm3, 0x40(%rdi)
movups %xmm2, 0x30(%rdi)
movups %xmm1, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]tetris/src/game.cpp
// Function: test_rotation(block_t*, bool)
collision_t test_rotation(block_t* block, rotation_t counter_clockwise)
{
	/* Make a copy of the block and rotate the copy. */
	block_t block_copy = *block;
	block_rotate(&block_copy, counter_clockwise);

	/* Test if any part of the copied block interfears with the taken boxes on the field. 
	 * Also test if the copied block interfears with the wall. Return accordingly. */
	collision_t collision = NO_COLLISION;
	
	/* Test for collision with other boxes. */
	for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
	{
		for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
		{
			if (block_copy.structure.tile[y][x] == FILLED   &&
				field[y + block_copy.position.y][x + block_copy.position.x].tile == TAKEN)
			{
				collision = COLLISION_BLOCK;
			}
		}
	}

	/* Test for collision with left side wall. */
	for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
	{
		for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
		{
			if (block_copy.structure.tile[y][x] == FILLED   &&
				x + block_copy.position.x < 0)
			{
				collision = COLLISION_WALL_R;
			}
		}
	}

	/* Test for collision with the right side wall. */
	for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
	{
		for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
		{
			if (block_copy.structure.tile[y][x] == FILLED   &&
				x + block_copy.position.x > GRID_WIDTH - 1)
			{
				collision = COLLISION_WALL_R;
			}
		}
	}
	return collision;
}

// Assembly:
subq $0x58, %rsp
movl %esi, %eax
movq %rdi, %rsi
pushq $0x14
popq %rcx
leaq 0x8(%rsp), %rdx
movq %rdx, %rdi
rep  movsl (%rsi), %es:(%rdi)
movq %rdx, %rdi
movl %eax, %esi
callq 0x2963
leaq 0x18(%rsp), %rcx
movslq -0x4(%rcx), %rax
movslq -0x8(%rcx), %rdx
imulq $0x78, %rax, %rax
imulq $0xc, %rdx, %rsi
addq %rax, %rsi
leaq 0x36b2(%rip), %rax      # 0x6150
addq %rax, %rsi
addq $0x8, %rsi
xorl %edi, %edi
pushq $0x5
popq %r8
movq %rcx, %r9
xorl %eax, %eax
cmpq $0x4, %rdi
je 0x2ae7
movq %rsi, %r10
xorl %r11d, %r11d
cmpq $0x4, %r11
je 0x2ada
cmpl $0x1, (%r9,%r11,4)
jne 0x2ad1
cmpl $0x1, (%r10)
cmovel %r8d, %eax
incq %r11
addq $0xc, %r10
jmp 0x2abc
incq %rdi
addq $0x10, %r9
addq $0x78, %rsi
jmp 0x2ab0
movq %rdx, %rdi
negq %rdi
xorl %r8d, %r8d
pushq $0x2
popq %rsi
movq %rcx, %r9
cmpq $0x4, %r8
je 0x2b26
xorl %r10d, %r10d
cmpq $0x4, %r10
je 0x2b1d
cmpq %rdi, %r10
movl %eax, %r11d
cmovll %esi, %r11d
cmpl $0x1, (%r9,%r10,4)
cmovel %r11d, %eax
incq %r10
jmp 0x2aff
incq %r8
addq $0x10, %r9
jmp 0x2af6
pushq $0x9
popq %rdi
subq %rdx, %rdi
xorl %edx, %edx
cmpq $0x4, %rdx
je 0x2b5e
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x2b55
cmpq %rdi, %r8
movl %eax, %r9d
cmovgl %esi, %r9d
cmpl $0x1, (%rcx,%r8,4)
cmovel %r9d, %eax
incq %r8
jmp 0x2b37
incq %rdx
addq $0x10, %rcx
jmp 0x2b2e
addq $0x58, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]tetris/src/game.cpp
// Function: remove_row(int)
void remove_row(int row)
{
    for (int x = 0; x < GRID_WIDTH; x++)
    {
        field[row][x].tile     = EMPTY;
        field[row][x].color_f  = COLOR_BACKGROUND_FORTH;
        field[row][x].color_b  = COLOR_BACKGROUND_BACK;
    }
}

// Assembly:
movslq %edi, %rax
imulq $0x78, %rax, %rcx
leaq 0x3442(%rip), %rax      # 0x6150
addq %rcx, %rax
pushq $0x8
popq %rcx
movabsq $0x600000007, %rdx      # imm = 0x600000007
cmpq $0x80, %rcx
je 0x2d36
andl $0x0, (%rax,%rcx)
movq %rdx, -0x8(%rax,%rcx)
addq $0xc, %rcx
jmp 0x2d1e
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]tetris/src/game.cpp
// Function: move_field_down(int, int)
void move_field_down(int row, int n)
{
    for (int y = row - 1; y >= 0; y--)
    {
        for (int x = 0; x < GRID_WIDTH; x++)
        {
            field[y + n][x].tile = field[y][x].tile;
            field[y + n][x].color_f = field[y][x].color_f;
            field[y + n][x].color_b = field[y][x].color_b;
        }
    }
}

// Assembly:
movslq %edi, %rax
movslq %esi, %rdx
imulq $0x78, %rax, %rcx
leaq 0x3408(%rip), %rsi      # 0x6150
addq %rsi, %rcx
addq $-0x70, %rcx
addq %rax, %rdx
imulq $0x78, %rdx, %rdx
addq %rsi, %rdx
addq $-0x70, %rdx
pushq $0xa
popq %rsi
testq %rax, %rax
jle 0x2d99
decq %rax
movq %rdx, %rdi
movq %rcx, %r8
movq %rsi, %r9
subq $0x1, %r9
jb 0x2d8f
movl (%r8), %r10d
movl %r10d, (%rdi)
movq -0x8(%r8), %r10
movq %r10, -0x8(%rdi)
addq $0xc, %r8
addq $0xc, %rdi
jmp 0x2d71
addq $-0x78, %rcx
addq $-0x78, %rdx
jmp 0x2d60
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]tetris/src/game.cpp
// Function: test_row_full(int)
bool test_row_full(int row)
{
    bool res = true;
    for (int x = 0; x < GRID_WIDTH; x++)
    {
        if (field[row][x].tile == EMPTY)
        {
            res = false;
            break;
        }
    }
    return res;
}

// Assembly:
movslq %edi, %rax
imulq $0x78, %rax, %rax
leaq 0x33a8(%rip), %rcx      # 0x6150
addq %rcx, %rax
addq $0x8, %rax
xorl %edx, %edx
movq %rdx, %rcx
cmpq $0xa, %rdx
je 0x2dc7
leaq 0x1(%rcx), %rdx
cmpl $0x0, (%rax)
leaq 0xc(%rax), %rax
jne 0x2db1
cmpq $0xa, %rcx
setae %al
retq