LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirinternal.c
// Function: sir_syslogid
bool _sir_syslogid(sirinit* si, const sir_update_config_data* data) {
    bool retval = _sir_validptr(si) && _sir_validptr(data);

    if (retval) {
        bool cur_ok = _sir_validstrnofail(si->d_syslog.identity);
        if (!cur_ok || 0 != strncmp(si->d_syslog.identity, data->sl_identity, SIR_MAX_SYSLOG_ID)) {
            _sir_selflog("updating %s identity from '%s' to '%s'", SIR_DESTNAME_SYSLOG,
                si->d_syslog.identity, data->sl_identity);
            (void)_sir_strncpy(si->d_syslog.identity, SIR_MAX_SYSLOG_ID, data->sl_identity,
                strnlen(data->sl_identity, SIR_MAX_SYSLOG_ID));
            _sir_setbitshigh(&si->d_syslog._state.mask, SIRSL_UPDATED | SIRSL_IDENTITY);
            retval = _sir_syslog_updated(si, data);
            _sir_setbitslow(&si->d_syslog._state.mask, SIRSL_UPDATED | SIRSL_IDENTITY);
        } else {
            _sir_selflog("skipped superfluous update of %s identity: '%s'", SIR_DESTNAME_SYSLOG,
                si->d_syslog.identity);
        }
    }

    return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x39eb(%rip), %rdx      # 0x9c00
pushq $0x1
popq %rsi
movl $0x184, %ecx            # imm = 0x184
callq 0x5923
testb %al, %al
je 0x6298
leaq 0x39d3(%rip), %rdx      # 0x9c00
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x184, %ecx            # imm = 0x184
callq 0x5923
testb %al, %al
je 0x6298
leaq 0x28(%rbx), %r15
cmpb $0x0, 0x28(%rbx)
movq 0x18(%r14), %r12
je 0x6263
movl $0x80, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x20a0
testl %eax, %eax
je 0x62a6
movl $0x80, %esi
movq %r12, %rdi
callq 0x21c0
movl $0x80, %esi
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %rcx
callq 0x5401
orb $0x30, 0x18(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x613a
andb $-0x31, 0x18(%rbx)
jmp 0x629a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb $0x1, %al
jmp 0x629a
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirinternal.c
// Function: sir_syslogcat
bool _sir_syslogcat(sirinit* si, const sir_update_config_data* data) {
    bool retval = _sir_validptr(si) && _sir_validptr(data);

    if (retval) {
        bool cur_ok = _sir_validstrnofail(si->d_syslog.category);
        if (!cur_ok || 0 != strncmp(si->d_syslog.category, data->sl_category, SIR_MAX_SYSLOG_CAT)) {
            _sir_selflog("updating %s category from '%s' to '%s'", SIR_DESTNAME_SYSLOG,
                si->d_syslog.category, data->sl_category);
            (void)_sir_strncpy(si->d_syslog.category, SIR_MAX_SYSLOG_CAT, data->sl_category,
                strnlen(data->sl_category, SIR_MAX_SYSLOG_CAT));
            _sir_setbitshigh(&si->d_syslog._state.mask, SIRSL_UPDATED | SIRSL_CATEGORY);
            retval = _sir_syslog_updated(si, data);
            _sir_setbitslow(&si->d_syslog._state.mask, SIRSL_UPDATED | SIRSL_CATEGORY);
        } else {
            _sir_selflog("skipped superfluous update of %s category: '%s'", SIR_DESTNAME_SYSLOG,
                si->d_syslog.identity);
        }
    }

    return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3917(%rip), %rdx      # 0x9c0e
pushq $0x1
popq %rsi
movl $0x19a, %ecx            # imm = 0x19A
callq 0x5923
testb %al, %al
je 0x637e
leaq 0x38ff(%rip), %rdx      # 0x9c0e
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x19a, %ecx            # imm = 0x19A
callq 0x5923
testb %al, %al
je 0x637e
leaq 0xa8(%rbx), %r15
cmpb $0x0, 0xa8(%rbx)
movq 0x20(%r14), %r12
je 0x6349
pushq $0x40
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x20a0
testl %eax, %eax
je 0x638a
pushq $0x40
popq %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x5401
orb $0x28, 0x18(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x613a
andb $-0x29, 0x18(%rbx)
jmp 0x6380
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x1, %al
jmp 0x6380
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirinternal.c
// Function: sir_writeinit
bool _sir_writeinit(const sir_update_config_data* data, sirinit_update update) {
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity() || !_sir_validupdatedata(data) || !_sir_validfnptr(update))
        return false;

    _SIR_LOCK_SECTION(sirconfig, _cfg, SIRMI_CONFIG, false);

    bool updated = update(&_cfg->si, data);
    if (!updated)
        _sir_selflog("error: update routine failed!");

    _SIR_UNLOCK_SECTION(SIRMI_CONFIG);
    return updated;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x387e(%rip), %rsi      # 0x9c1d
leaq 0x3800(%rip), %rdx      # 0x9ba6
movl $0x80010000, %edi       # imm = 0x80010000
movl $0x1b0, %ecx            # imm = 0x1B0
callq 0x3138
callq 0x5f4b
testb %al, %al
je 0x641b
leaq 0x3858(%rip), %rsi      # 0x9c1d
leaq 0x37da(%rip), %rdx      # 0x9ba6
movq %r14, %rdi
movl $0x1b2, %ecx            # imm = 0x1B2
callq 0x516d
testb %al, %al
je 0x641b
xorl %edi, %edi
callq 0x5c53
testq %rax, %rax
je 0x63fe
movq %rax, %rdi
movq %r14, %rsi
callq *%rbx
movl %eax, %ebx
xorl %edi, %edi
callq 0x5df7
movl %ebx, %eax
jmp 0x641d
leaq 0x3818(%rip), %rsi      # 0x9c1d
leaq 0x379a(%rip), %rdx      # 0x9ba6
movl $0x800f0000, %edi       # imm = 0x800F0000
movl $0x1b5, %ecx            # imm = 0x1B5
callq 0x3138
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirinternal.c
// Function: sir_msec_since
double _sir_msec_since(const sir_time* when, sir_time* out) {
    if (!_sir_validptr(out))
        return 0.0;
#if !defined(__WIN__)
    out->sec = 0;
    out->msec = 0L;

    bool gettime = _sir_clock_gettime(SIR_INTERVALCLOCK, &out->sec, &out->msec);
    SIR_ASSERT(gettime);

    if (!_sir_validptrnofail(when) || !gettime || (out->sec < when->sec ||
        (out->sec == when->sec && out->msec < when->msec)))
        return 0.0;

    return ((((double)out->sec) * 1e3) + (double)out->msec) -
           ((((double)when->sec) * 1e3) + (double)when->msec);
#else /* __WIN__ */
    SIR_ASSERT(_sir_perfcntr_freq.QuadPart > 0LL);

    if (_sir_perfcntr_freq.QuadPart <= 0LL)
        (void)QueryPerformanceFrequency(&_sir_perfcntr_freq);

    (void)QueryPerformanceCounter(&out->counter);

    if (!_sir_validptrnofail(when) || out->counter.QuadPart <= when->counter.QuadPart)
        return 0.0;

    double msec_ratio = ((double)_sir_perfcntr_freq.QuadPart) / 1e3;
    return ((double)(out->counter.QuadPart - when->counter.QuadPart)) / msec_ratio;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x31fd(%rip), %rdx      # 0x9d1f
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x4d9, %ecx            # imm = 0x4D9
callq 0x5923
xorpd %xmm0, %xmm0
testb %al, %al
je 0x6bbe
leaq 0x8(%r14), %r15
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
pushq $0x7
popq %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6a92
testq %rbx, %rbx
je 0x6bba
testb %al, %al
je 0x6bba
movq (%r14), %rdx
movq (%rbx), %rax
cmpq %rax, %rdx
xorpd %xmm0, %xmm0
jl 0x6bbe
sete %dil
movq (%r15), %rsi
movq 0x8(%rbx), %rcx
cmpq %rcx, %rsi
setl %r8b
testb %r8b, %dil
jne 0x6bbe
cvtsi2sd %rdx, %xmm0
cvtsi2sd %rsi, %xmm4
movsd 0x2ff6(%rip), %xmm1     # 0x9b90
mulsd %xmm1, %xmm0
cvtsi2sd %rax, %xmm2
cvtsi2sd %rcx, %xmm3
addsd %xmm4, %xmm0
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
subsd %xmm2, %xmm0
jmp 0x6bbe
xorpd %xmm0, %xmm0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirinternal.c
// Function: sir_formattedlevelstr
const char* _sir_formattedlevelstr(sir_level level) {
    static const size_t low  = 0;
    static const size_t high = SIR_NUMLEVELS - 1;

    const char* retval = SIR_UNKNOWN;

    _SIR_DECLARE_BIN_SEARCH(low, high);
    _SIR_BEGIN_BIN_SEARCH()

    if (sir_level_to_str_map[_mid].level == level) {
        retval = sir_level_to_str_map[_mid].fmt;
        break;
    }

    _SIR_ITERATE_BIN_SEARCH((sir_level_to_str_map[_mid].level < level ? 1 : -1));
    _SIR_END_BIN_SEARCH();

    return retval;
}

// Assembly:
pushq $0x3
popq %rdx
pushq $0x7
popq %r8
xorl %esi, %esi
leaq 0x8818(%rip), %rcx      # 0xf440
leaq 0x2758(%rip), %rax      # 0x9387
movq %rdx, %r10
shlq $0x4, %r10
movzwl (%rcx,%r10), %r9d
cmpw %di, %r9w
je 0x6c7c
cmpq %r8, %rsi
je 0x6c83
cmpw %di, %r9w
setb %r10b
leaq -0x1(%rdx), %r9
cmpq %rsi, %r9
setb %r11b
orb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x6c70
cmpq %r8, %rdx
jae 0x6c83
incq %rdx
movq %rdx, %rsi
movq %r8, %r9
leaq (%r9,%rsi), %rdx
shrq %rdx
movq %r9, %r8
jmp 0x6c2f
addq %r10, %rcx
movq 0x8(%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirmutex.c
// Function: sir_mutexcreate
bool _sir_mutexcreate(sir_mutex* mutex) {
    if (_sir_validptr(mutex)) {
        pthread_mutexattr_t attr;
        int op = pthread_mutexattr_init(&attr);
        if (0 == op) {
            op = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
            if (0 == op) {
                op = pthread_mutex_init(mutex, &attr);
                if (0 == op)
                    return true;
            }
        }

        (void)_sir_handleerr(op);
    }

    return false;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x2a91(%rip), %rsi      # 0x9dc0
pushq $0x27
popq %rdx
callq 0x738f
testb %al, %al
je 0x7383
leaq 0xc(%rsp), %rdi
callq 0x23f0
testl %eax, %eax
jne 0x736b
leaq 0xc(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x2170
testl %eax, %eax
jne 0x736b
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x2420
testl %eax, %eax
je 0x738b
leaq 0x2a4e(%rip), %rsi      # 0x9dc0
leaq 0x2a58(%rip), %rdx      # 0x9dd1
pushq $0x33
popq %rcx
movl %eax, %edi
callq 0x3231
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movb $0x1, %al
jmp 0x7385
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirmutex.c
// Function: sir_mutexlock
bool _sir_mutexlock(sir_mutex* mutex) {
    if (_sir_validptr(mutex)) {
        int op = pthread_mutex_lock(mutex);
        return 0 == op ? true : _sir_handleerr(op);
    }

    return false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x2a1e(%rip), %rsi      # 0x9ddc
pushq $0x3a
popq %rdx
callq 0x738f
testb %al, %al
je 0x73ef
movq %rbx, %rdi
callq 0x2470
testl %eax, %eax
je 0x73f3
leaq 0x29ff(%rip), %rsi      # 0x9ddc
leaq 0x29ed(%rip), %rdx      # 0x9dd1
pushq $0x3c
popq %rcx
movl %eax, %edi
popq %rbx
jmp 0x3231
xorl %eax, %eax
jmp 0x73f5
movb $0x1, %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirmutex.c
// Function: sir_mutextrylock
bool _sir_mutextrylock(sir_mutex* mutex) {
    if (_sir_validptr(mutex)) {
        int op = pthread_mutex_trylock(mutex);
        return 0 == op ? true : _sir_handleerr(op);
    }

    return false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x29e9(%rip), %rsi      # 0x9deb
pushq $0x43
popq %rdx
callq 0x738f
testb %al, %al
je 0x7433
movq %rbx, %rdi
callq 0x21e0
testl %eax, %eax
je 0x7437
leaq 0x29ca(%rip), %rsi      # 0x9deb
leaq 0x29a9(%rip), %rdx      # 0x9dd1
pushq $0x45
popq %rcx
movl %eax, %edi
popq %rbx
jmp 0x3231
xorl %eax, %eax
jmp 0x7439
movb $0x1, %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirmutex.c
// Function: sir_mutexunlock
bool _sir_mutexunlock(sir_mutex* mutex) {
    if (_sir_validptr(mutex)) {
        int op = pthread_mutex_unlock(mutex);
        return 0 == op ? true : _sir_handleerr(op);
    }

    return false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x29b7(%rip), %rsi      # 0x9dfd
pushq $0x4c
popq %rdx
callq 0x738f
testb %al, %al
je 0x7477
movq %rbx, %rdi
callq 0x22f0
testl %eax, %eax
je 0x747b
leaq 0x2998(%rip), %rsi      # 0x9dfd
leaq 0x2965(%rip), %rdx      # 0x9dd1
pushq $0x4e
popq %rcx
movl %eax, %edi
popq %rbx
jmp 0x3231
xorl %eax, %eax
jmp 0x747d
movb $0x1, %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirmutex.c
// Function: sir_mutexdestroy
bool _sir_mutexdestroy(sir_mutex* mutex) {
    if (_sir_validptr(mutex)) {
        int op = pthread_mutex_destroy(mutex);
        return 0 == op ? true : _sir_handleerr(op);
    }

    return false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x2984(%rip), %rsi      # 0x9e0e
pushq $0x55
popq %rdx
callq 0x738f
testb %al, %al
je 0x74bb
movq %rbx, %rdi
callq 0x2160
testl %eax, %eax
je 0x74bf
leaq 0x2965(%rip), %rsi      # 0x9e0e
leaq 0x2921(%rip), %rdx      # 0x9dd1
pushq $0x57
popq %rcx
movl %eax, %edi
popq %rbx
jmp 0x3231
xorl %eax, %eax
jmp 0x74c1
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_load
sirpluginid _sir_plugin_load(const char* path) {
#if !defined(SIR_NO_PLUGINS)
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity() || !_sir_validstr(path))
        return 0U;

    sir_plugin* plugin = (sir_plugin*)calloc(1, sizeof(sir_plugin));
    if (!plugin)
        return _sir_handleerr(errno);

# if !defined (__WIN__)
    plugin->handle = dlopen(path, RTLD_NOW | RTLD_LOCAL);
    if (!plugin->handle) {
        const char* err = dlerror();
        _sir_selflog("error: dlopen('%s') failed (%s)", path, _SIR_PRNSTR(err));
        _sir_plugin_destroy(&plugin);
        return _sir_handleerr(errno);
    }
# else /* __WIN__ */
    UINT old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS);
    plugin->handle      = LoadLibraryA(path);
    SetErrorMode(old_error_mode);
    if (!plugin->handle) {
        DWORD err = GetLastError();
        _sir_selflog("error: LoadLibraryA(%s) failed (%lu)", path, err);
        _sir_plugin_destroy(&plugin);
        return _sir_handlewin32err(err);
    }
# endif

    plugin->loaded = true;
    plugin->path   = strndup(path, strnlen(path, SIR_MAXPATH));

    if (!_sir_validstrnofail(plugin->path)) {
        _sir_plugin_destroy(&plugin);
        return _sir_handleerr(errno);
    }

    _sir_selflog("loaded plugin (path: '%s', addr: %p); probing...", //-V576
        plugin->path, plugin->handle);

    return _sir_plugin_probe(plugin);
#else
    SIR_UNUSED(path);
    return 0U;
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x294a(%rip), %rsi      # 0x9e20
leaq 0x2954(%rip), %rdx      # 0x9e31
pushq $0x25
popq %rcx
movl $0x80010000, %edi       # imm = 0x80010000
callq 0x3138
xorl %ebp, %ebp
callq 0x5f4b
testb %al, %al
je 0x75e3
leaq 0x2920(%rip), %rdx      # 0x9e20
pushq $0x1
popq %rsi
pushq $0x27
popq %rcx
movq %rbx, %rdi
callq 0x75ee
testb %al, %al
je 0x75e3
pushq $0x1
popq %rdi
pushq $0x68
popq %rsi
callq 0x2220
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x7578
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2240
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x75b4
movb $0x1, 0x38(%r14)
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
callq 0x21c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2200
movq %rax, (%r14)
testq %rax, %rax
je 0x7591
cmpb $0x0, (%rax)
je 0x7591
movq %r14, %rdi
callq 0x7674
movl %eax, %ebp
jmp 0x75e3
callq 0x2080
movl (%rax), %edi
leaq 0x289a(%rip), %rsi      # 0x9e20
leaq 0x28a4(%rip), %rdx      # 0x9e31
pushq $0x2c
jmp 0x75da
leaq 0x8(%rsp), %rdi
callq 0x7625
callq 0x2080
movl (%rax), %edi
leaq 0x2877(%rip), %rsi      # 0x9e20
leaq 0x2881(%rip), %rdx      # 0x9e31
pushq $0x47
jmp 0x75da
callq 0x2050
leaq 0x8(%rsp), %rdi
callq 0x7625
callq 0x2080
movl (%rax), %edi
leaq 0x284f(%rip), %rsi      # 0x9e20
leaq 0x2859(%rip), %rdx      # 0x9e31
pushq $0x34
popq %rcx
callq 0x3231
movzbl %al, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_destroy
void _sir_plugin_destroy(sir_plugin** plugin) {
#if !defined(SIR_NO_PLUGINS)
    if (_sir_validptrptr(plugin) && _sir_validptr(*plugin)) {
        bool unloaded = _sir_plugin_unload(*plugin);
        SIR_ASSERT_UNUSED(unloaded, unloaded);

        _sir_safefree(&(*plugin)->path);
        _sir_safefree(plugin);
    }
#else
    SIR_UNUSED(plugin);
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x28ae(%rip), %rsi      # 0x9ede
movl $0x144, %edx            # imm = 0x144
callq 0x7bce
testb %al, %al
je 0x7672
movq (%rbx), %rdi
leaq 0x2896(%rip), %rdx      # 0x9ede
pushq $0x1
popq %rsi
movl $0x144, %ecx            # imm = 0x144
callq 0x796e
testb %al, %al
je 0x7672
movq (%rbx), %rdi
callq 0x79a0
movq (%rbx), %rdi
callq 0x5098
movq %rbx, %rdi
popq %rbx
jmp 0x5098
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_getexport
sir_pluginexport _sir_plugin_getexport(sir_pluginhandle handle, const char* name) {
#if !defined(SIR_NO_PLUGINS)
    if (!_sir_validptr(handle) || !_sir_validstr(name))
        return NULL;

# if !defined(__WIN__)
    sir_pluginexport addr = NULL;
    *(void**)(&addr) = dlsym(handle, name);

    if (!addr) {
        const char* err = dlerror();
        _sir_selflog("error: dlsym(%p, '%s') failed (%s)", handle, name,
            _SIR_PRNSTR(err));
        (void)_sir_handleerr(errno);
        return NULL;
    }
# else /* __WIN__ */
    sir_pluginexport addr = GetProcAddress(handle, name);
    if (!addr) {
        DWORD err = GetLastError();
        _sir_selflog("error: GetProcAddress(%p, '%s') failed (%lu)", handle,
            name, err);
        (void)_sir_handlewin32err(err);
        return NULL;
    }
# endif
    _sir_selflog("successfully resolved plugin export (name: '%s', addr: %"
                 PRIxPTR")", name, (uintptr_t)addr);
    return addr;
#else
    SIR_UNUSED(handle);
    SIR_UNUSED(name);
    return NULL;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x25f4(%rip), %rdx      # 0x9e95
pushq $0x1
popq %rsi
movl $0xd7, %ecx
callq 0x796e
testb %al, %al
je 0x7901
leaq 0x25dc(%rip), %rdx      # 0x9e95
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0xd7, %ecx
callq 0x75ee
testb %al, %al
je 0x7901
movq %r14, %rdi
movq %rbx, %rsi
callq 0x23a0
testq %rax, %rax
jne 0x7903
callq 0x2050
callq 0x2080
movl (%rax), %edi
leaq 0x25a5(%rip), %rsi      # 0x9e95
leaq 0x253a(%rip), %rdx      # 0x9e31
movl $0xe2, %ecx
callq 0x3231
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_add
sirpluginid _sir_plugin_add(sir_plugin* plugin) {
#if !defined(SIR_NO_PLUGINS)
    sirpluginid retval = 0U;

    if (_sir_validptr(plugin)) {
        _SIR_LOCK_SECTION(sir_plugincache, spc, SIRMI_PLUGINCACHE, 0U);
        retval = _sir_plugin_cache_add(spc, plugin);
        _SIR_UNLOCK_SECTION(SIRMI_PLUGINCACHE);
    }

    return retval;
#else
    SIR_UNUSED(plugin);
    return 0U;
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x25a8(%rip), %rdx      # 0x9ebe
pushq $0x1
popq %rsi
movl $0x123, %ecx            # imm = 0x123
callq 0x796e
testb %al, %al
je 0x796a
pushq $0x2
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x794d
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7a00
movl %eax, %ebx
pushq $0x2
popq %rdi
callq 0x5df7
movl %ebx, %eax
jmp 0x796c
leaq 0x256a(%rip), %rsi      # 0x9ebe
leaq 0x24d6(%rip), %rdx      # 0x9e31
movl $0x800f0000, %edi       # imm = 0x800F0000
movl $0x124, %ecx            # imm = 0x124
callq 0x3138
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_cache_add
sirpluginid _sir_plugin_cache_add(sir_plugincache* spc, sir_plugin* plugin) {
#if !defined(SIR_NO_PLUGINS)
    if (!_sir_validptr(spc) || !_sir_validptr(plugin))
        return 0U;

    if (spc->count >= SIR_MAXPLUGINS) {
        (void)_sir_seterror(_SIR_E_NOROOM);
        return 0U;
    }

    const sir_plugin* existing = _sir_plugin_cache_find_id(spc, plugin->id);
    if (NULL != existing) {
        _sir_selflog("error: already have plugin (path: '%s', id: %08"PRIx32")",
            existing->path, plugin->id);
        (void)_sir_seterror(_SIR_E_DUPITEM);
        return 0U;
    }

    _sir_selflog("adding plugin (path: %s, id: %08"PRIx32"); count = %zu",
    plugin->path, plugin->id, spc->count + 1);
    spc->plugins[spc->count++] = plugin;
    return plugin->id;
#else
    SIR_UNUSED(spc);
    SIR_UNUSED(plugin);
    return 0U;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x24e0(%rip), %rdx      # 0x9ef2
pushq $0x1
popq %rsi
movl $0x15c, %ecx            # imm = 0x15C
callq 0x796e
xorl %ebx, %ebx
testb %al, %al
je 0x7a92
leaq 0x24c6(%rip), %rdx      # 0x9ef2
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x15c, %ecx            # imm = 0x15C
callq 0x796e
testb %al, %al
je 0x7a92
cmpq $0x10, 0x80(%r15)
jb 0x7a64
leaq 0x24a1(%rip), %rsi      # 0x9ef2
leaq 0x23d9(%rip), %rdx      # 0x9e31
movl $0x80060000, %edi       # imm = 0x80060000
movl $0x160, %ecx            # imm = 0x160
jmp 0x7a8d
movl 0x60(%r14), %esi
movq %r15, %rdi
callq 0x7bfb
testq %rax, %rax
je 0x7a9a
leaq 0x2476(%rip), %rsi      # 0x9ef2
leaq 0x23ae(%rip), %rdx      # 0x9e31
movl $0x80040000, %edi       # imm = 0x80040000
movl $0x168, %ecx            # imm = 0x168
callq 0x3138
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x80(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x80(%r15)
movq %r14, (%r15,%rax,8)
movl 0x60(%r14), %ebx
jmp 0x7a92
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_rem
bool _sir_plugin_rem(sirpluginid id) {
#if !defined(SIR_NO_PLUGINS)
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity())
        return false;

    _SIR_LOCK_SECTION(sir_plugincache, spc, SIRMI_PLUGINCACHE, false);
    bool retval = _sir_plugin_cache_rem(spc, id);
    _SIR_UNLOCK_SECTION(SIRMI_PLUGINCACHE);

    return retval;
#else
    SIR_UNUSED(id);
    return false;
#endif
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x240e(%rip), %rsi      # 0x9ece
leaq 0x236a(%rip), %rdx      # 0x9e31
movl $0x80010000, %edi       # imm = 0x80010000
movl $0x132, %ecx            # imm = 0x132
callq 0x3138
callq 0x5f4b
testb %al, %al
je 0x7b21
pushq $0x2
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x7b04
movq %rax, %rdi
movl %ebx, %esi
callq 0x7b25
movl %eax, %ebx
pushq $0x2
popq %rdi
callq 0x5df7
movl %ebx, %eax
jmp 0x7b23
leaq 0x23c3(%rip), %rsi      # 0x9ece
leaq 0x231f(%rip), %rdx      # 0x9e31
movl $0x800f0000, %edi       # imm = 0x800F0000
movl $0x137, %ecx            # imm = 0x137
callq 0x3138
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_cache_rem
bool _sir_plugin_cache_rem(sir_plugincache* spc, sirpluginid id) {
#if !defined(SIR_NO_PLUGINS)
    if (!_sir_validptr(spc))
        return false;

    for (size_t n = 0; n < spc->count; n++) {
        if (spc->plugins[n]->id == id) {
            _sir_selflog("removing plugin (path: '%s', id: %"PRIx32"); count = %zu",
                spc->plugins[n]->path, spc->plugins[n]->id, spc->count - 1);

            _sir_plugin_destroy(&spc->plugins[n]);

            for (size_t i = n; i < spc->count - 1; i++) {
                spc->plugins[i] = spc->plugins[i + 1];
                spc->plugins[i + 1] = NULL;
            }

            spc->count--;
            return true;
        }
    }

    return _sir_seterror(_SIR_E_NOITEM);
#else
    SIR_UNUSED(spc);
    SIR_UNUSED(id);
    return false;
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x23ea(%rip), %rdx      # 0x9f1f
pushq $0x1
popq %rsi
movl $0x197, %ecx            # imm = 0x197
callq 0x796e
testb %al, %al
je 0x7b69
movq 0x80(%rbx), %rax
xorl %r14d, %r14d
movq %rbx, %rdi
cmpq %r14, %rax
je 0x7b6d
movq (%rdi), %rcx
cmpl %ebp, 0x60(%rcx)
je 0x7b8e
incq %r14
addq $0x8, %rdi
jmp 0x7b53
xorl %eax, %eax
jmp 0x7bc9
leaq 0x23ab(%rip), %rsi      # 0x9f1f
leaq 0x22b6(%rip), %rdx      # 0x9e31
movl $0x80050000, %edi       # imm = 0x80050000
movl $0x1ab, %ecx            # imm = 0x1AB
popq %rbx
popq %r14
popq %rbp
jmp 0x3138
callq 0x7625
movq 0x80(%rbx), %rax
decq %rax
cmpq %rax, %r14
movq %rax, %rcx
cmovaq %r14, %rcx
cmpq %r14, %rcx
je 0x7bc0
movq 0x8(%rbx,%r14,8), %rdx
movq %rdx, (%rbx,%r14,8)
andq $0x0, 0x8(%rbx,%r14,8)
incq %r14
jmp 0x7ba7
movq %rax, 0x80(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_cache_find
sir_plugin* _sir_plugin_cache_find(const sir_plugincache* spc, const void* match,
    sir_plugin_pred pred) {
#if !defined(SIR_NO_PLUGINS)
    if (!_sir_validptr(spc) || !_sir_validptr(match) || !_sir_validfnptr(pred))
        return NULL;

    for (size_t n = 0; n < spc->count; n++) {
        if (pred(match, spc->plugins[n]))
            return spc->plugins[n];
    }

    return NULL;
#else
    SIR_UNUSED(spc);
    SIR_UNUSED(match);
    SIR_UNUSED(pred);
    return NULL;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x22db(%rip), %rdx      # 0x9f08
pushq $0x1
popq %rsi
movl $0x184, %ecx            # imm = 0x184
callq 0x796e
testb %al, %al
je 0x7c7a
leaq 0x22c3(%rip), %rdx      # 0x9f08
pushq $0x1
popq %rsi
movq %r15, %rdi
movl $0x184, %ecx            # imm = 0x184
callq 0x796e
testb %al, %al
je 0x7c7a
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq 0x80(%r14), %r13
jae 0x7c7d
movq (%r14,%r13,8), %rsi
movq %r15, %rdi
callq *%rbx
testb %al, %al
jne 0x7c8a
incq %r13
jmp 0x7c5f
xorl %r12d, %r12d
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14,%r13,8), %r12
jmp 0x7c7d
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirplugins.c
// Function: sir_plugin_cache_destroy
bool _sir_plugin_cache_destroy(sir_plugincache* spc) {
#if !defined(SIR_NO_PLUGINS)
    if (!_sir_validptr(spc))
        return false;

    while (spc->count > 0) {
        size_t idx = spc->count - 1;
        _sir_plugin_destroy(&spc->plugins[idx]);
        spc->plugins[idx] = NULL;
        spc->count--;
    }

    (void)memset(spc, 0, sizeof(sir_plugincache));
    return true;
#else
    SIR_UNUSED(spc);
    return false;
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2297(%rip), %rdx      # 0x9f35
pushq $0x1
popq %rsi
movl $0x1b5, %ecx            # imm = 0x1B5
callq 0x796e
movl %eax, %ebp
testb %al, %al
je 0x7cf3
movq 0x80(%rbx), %rax
testq %rax, %rax
je 0x7ce4
leaq (%rbx,%rax,8), %r14
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7625
andq $0x0, (%r14)
movq 0x80(%rbx), %rax
decq %rax
movq %rax, 0x80(%rbx)
jmp 0x7cb8
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21b0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirtextstyle.c
// Function: sir_gettextstyle
const char* _sir_gettextstyle(sir_level level) {
    static const size_t low  = 0;
    static const size_t high = SIR_NUMLEVELS - 1;

    _SIR_LOCK_SECTION(sir_text_style_data, data, SIRMI_TEXTSTYLE, NULL);
    const char* retval = SIR_UNKNOWN;

    _SIR_DECLARE_BIN_SEARCH(low, high);
    _SIR_BEGIN_BIN_SEARCH()

    if (data->map[_mid].level == level) {
        retval = data->map[_mid].str;
        break;
    }

    _SIR_ITERATE_BIN_SEARCH((data->map[_mid].level < level ? 1 : -1));
    _SIR_END_BIN_SEARCH();
    _SIR_UNLOCK_SECTION(SIRMI_TEXTSTYLE);

    return retval;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
pushq $0x3
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x7ec8
movq (%rax), %rax
pushq $0x3
popq %rcx
pushq $0x7
popq %rsi
xorl %edx, %edx
leaq 0x1507(%rip), %rbx      # 0x9387
imulq $0x3c, %rcx, %r8
movzwl (%rax,%r8), %edi
cmpw %bp, %di
je 0x7ee7
cmpq %rsi, %rdx
je 0x7ef1
cmpw %bp, %di
setb %r8b
leaq -0x1(%rcx), %rdi
cmpq %rdx, %rdi
setb %r9b
orb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x7ebc
cmpq %rsi, %rcx
jae 0x7ef1
incq %rcx
movq %rcx, %rdx
movq %rsi, %rdi
leaq (%rdi,%rdx), %rcx
shrq %rcx
movq %rdi, %rsi
jmp 0x7e80
leaq 0x211d(%rip), %rsi      # 0x9fec
leaq 0x2128(%rip), %rdx      # 0x9ffe
pushq $0x33
popq %rcx
movl $0x800f0000, %edi       # imm = 0x800F0000
callq 0x3138
xorl %ebx, %ebx
jmp 0x7ef9
addq %r8, %rax
addq $0x10, %rax
movq %rax, %rbx
pushq $0x3
popq %rdi
callq 0x5df7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirtextstyle.c
// Function: sir_settextstyle
bool _sir_settextstyle(sir_level level, const sir_textstyle* style) {
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity() || !_sir_validlevel(level))
        return false;

    _SIR_LOCK_SECTION(sir_text_style_data, data, SIRMI_TEXTSTYLE, false);
    bool updated              = false;
    static const size_t low   = 0;
    static const size_t high  = SIR_NUMLEVELS - 1;

    _SIR_DECLARE_BIN_SEARCH(low, high);
    _SIR_BEGIN_BIN_SEARCH()

    if (data->map[_mid].level == level) {
        (void)memcpy(&data->map[_mid].style, style, sizeof(sir_textstyle));
        updated = _sir_formatstyle(*data->color_mode, style, data->map[_mid].str);
        break;
    }

    _SIR_ITERATE_BIN_SEARCH((data->map[_mid].level < level ? 1 : -1));
    _SIR_END_BIN_SEARCH();
    _SIR_UNLOCK_SECTION(SIRMI_TEXTSTYLE);

    SIR_ASSERT(updated);
    return updated;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x20fb(%rip), %rsi      # 0xa00d
leaq 0x20e5(%rip), %rdx      # 0x9ffe
pushq $0x46
popq %rcx
movl $0x80010000, %edi       # imm = 0x80010000
callq 0x3138
callq 0x5f4b
testb %al, %al
je 0x7fcd
movzwl %bp, %edi
leaq 0x20d0(%rip), %rsi      # 0xa00d
leaq 0x20ba(%rip), %rdx      # 0x9ffe
pushq $0x48
popq %rcx
callq 0x532b
testb %al, %al
je 0x7fcd
pushq $0x3
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x7fb2
movq (%rax), %rcx
pushq $0x3
popq %rdx
pushq $0x7
popq %rdi
xorl %esi, %esi
imulq $0x3c, %rdx, %r8
movzwl (%rcx,%r8), %r9d
cmpw %bp, %r9w
je 0x7fdc
cmpq %rdi, %rsi
je 0x7fd8
cmpw %bp, %r9w
setb %r9b
leaq -0x1(%rdx), %r8
cmpq %rsi, %r8
setb %r10b
orb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x7fa6
cmpq %rdi, %rdx
jae 0x7fd8
incq %rdx
movq %rdx, %rsi
movq %rdi, %r8
leaq (%r8,%rsi), %rdx
shrq %rdx
movq %r8, %rdi
jmp 0x7f68
leaq 0x2054(%rip), %rsi      # 0xa00d
leaq 0x203e(%rip), %rdx      # 0x9ffe
pushq $0x4b
popq %rcx
movl $0x800f0000, %edi       # imm = 0x800F0000
callq 0x3138
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x8007
addq %r8, %rcx
movl 0x8(%rbx), %edx
movl %edx, 0xc(%rcx)
movq (%rbx), %rdx
movq %rdx, 0x4(%rcx)
movq (%rax), %rcx
movq 0x8(%rax), %rax
movl (%rax), %edi
leaq (%rcx,%r8), %rdx
addq $0x10, %rdx
movq %rbx, %rsi
callq 0x8011
movl %eax, %ebx
pushq $0x3
popq %rdi
callq 0x5df7
jmp 0x7fcf
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirtextstyle.c
// Function: sir_resettextstyles
bool _sir_resettextstyles(void) {
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity())
        return false;

    _SIR_LOCK_SECTION(sir_text_style_data, data, SIRMI_TEXTSTYLE, false);
    bool all_ok = true;
    for (size_t n = 0; n < SIR_NUMLEVELS; n++) {
        (void)memcpy(&data->map[n].style, _sir_getdefstyle(data->map[n].level),
             sizeof(sir_textstyle));
        _sir_eqland(all_ok, _sir_formatstyle(*data->color_mode, &data->map[n].style,
            data->map[n].str));
    }

    _SIR_UNLOCK_SECTION(SIRMI_TEXTSTYLE);
    return all_ok;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1da1(%rip), %rsi      # 0xa01f
leaq 0x1d79(%rip), %rdx      # 0x9ffe
pushq $0x74
popq %rcx
movl $0x80010000, %edi       # imm = 0x80010000
callq 0x3138
callq 0x5f4b
testb %al, %al
je 0x8322
pushq $0x3
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x8307
movq %rax, %r14
movb $0x1, %bl
pushq $0x10
popq %r15
cmpq $0x1f0, %r15            # imm = 0x1F0
je 0x82fd
movq (%r14), %r12
movzwl -0x10(%r12,%r15), %edi
callq 0x8200
movq (%rax), %rcx
movq %rcx, -0xc(%r12,%r15)
movl 0x8(%rax), %eax
movl %eax, -0x4(%r12,%r15)
movq (%r14), %rdx
movq 0x8(%r14), %rax
movl (%rax), %edi
leaq (%rdx,%r15), %rsi
addq $-0xc, %rsi
addq %r15, %rdx
callq 0x8011
andb %al, %bl
addq $0x3c, %r15
jmp 0x82b5
pushq $0x3
popq %rdi
callq 0x5df7
jmp 0x8324
leaq 0x1d11(%rip), %rsi      # 0xa01f
leaq 0x1ce9(%rip), %rdx      # 0x9ffe
pushq $0x79
popq %rcx
movl $0x800f0000, %edi       # imm = 0x800F0000
callq 0x3138
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirtextstyle.c
// Function: sir_setcolormode
bool _sir_setcolormode(sir_colormode mode) {
    if (!_sir_validcolormode(mode))
        return false;

    _SIR_LOCK_SECTION(sir_text_style_data, data, SIRMI_TEXTSTYLE, false);
    if (*data->color_mode != mode) {
        sir_colormode old = *data->color_mode;
        *data->color_mode = mode;
        _sir_selflog("color mode changed from %"PRId32" to %"PRId32, old, mode);

        /* when the color mode changes, it's necessary to regenerate the text styles
         * we're holding. for example in the case of downgrading color modes, the
         * styles in memory could be incompatible with the new mode. */
        if (!_sir_resettextstyles()) {
            _sir_selflog("error: failed to reset text styles!");
            _SIR_UNLOCK_SECTION(SIRMI_TEXTSTYLE);
            return false;
        }
    } else {
        _sir_selflog("skipped superfluous update of color mode: %"PRId32, mode);
    }
    _SIR_UNLOCK_SECTION(SIRMI_TEXTSTYLE);

    return true;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x1c0f(%rip), %rsi      # 0xa08f
leaq 0x1b77(%rip), %rdx      # 0x9ffe
movl $0xc4, %ecx
callq 0x53ef
testb %al, %al
je 0x84e8
pushq $0x3
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x84c1
movq 0x8(%rax), %rax
cmpl %ebx, (%rax)
je 0x84b5
movl %ebx, (%rax)
callq 0x826f
testb %al, %al
je 0x84e0
pushq $0x3
popq %rdi
callq 0x5df7
movb $0x1, %al
jmp 0x84ea
leaq 0x1bc7(%rip), %rsi      # 0xa08f
leaq 0x1b2f(%rip), %rdx      # 0x9ffe
movl $0x800f0000, %edi       # imm = 0x800F0000
movl $0xc7, %ecx
callq 0x3138
jmp 0x84e8
pushq $0x3
popq %rdi
callq 0x5df7
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_fcollect32.c
// Function: shmem_fcollect32
void shmem_fcollect32(void *dest, const void *source, size_t nelems, 
	int pe_start, int log_pe_stride, int pe_size, long* psync)
{
	const int step = 1 << log_pe_stride;
	const int pe_shift = pe_size << log_pe_stride;
	const int pe_end = pe_start + pe_shift;
	const int my_pe = __shmem.my_pe;

	const int nbytes = nelems << 2;

	const ptrdiff_t offset = nbytes * ((my_pe - pe_start) >> log_pe_stride);
	const void* target = (void*)((intptr_t)dest + offset);

	int pe = my_pe;

	do {
		shmemx_memcpy(shmem_ptr(target,pe), source, nelems*sizeof(int32_t));
		pe += step;
	} while (pe < pe_end);

	pe -= pe_shift;
	while (pe < my_pe) {
		shmemx_memcpy(shmem_ptr(target,pe), source, nelems*sizeof(int32_t));
		pe += step;
	}
	shmem_barrier(pe_start, log_pe_stride, pe_size, psync);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r10d
movq %rdx, %r15
movq %rsi, %r12
pushq $0x1
popq %r14
movl %r8d, %ecx
shll %cl, %r14d
movl %r9d, 0xc(%rsp)
movl %r9d, %edx
shll %cl, %edx
leaq 0x32ea(%rip), %rax      # 0x61f0
movl 0x4(%rax), %ebx
movl %ebx, %eax
subl %r10d, %eax
movl %r8d, 0x8(%rsp)
sarl %cl, %eax
movq 0x60(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
leal (%rdx,%r10), %ebp
imull %r15d, %eax
shll $0x2, %eax
movslq %eax, %r13
addq %rdi, %r13
shlq $0x2, %r15
movl %ebx, 0x4(%rsp)
movq %r13, %rdi
movl %ebx, %esi
callq 0x1c64
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3058
addl %r14d, %ebx
cmpl %ebp, %ebx
jl 0x2f42
subl 0x10(%rsp), %ebx
movl 0x4(%rsp), %ebp
cmpl %ebp, %ebx
jge 0x2f8a
movq %r13, %rdi
movl %ebx, %esi
callq 0x1c64
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3058
addl %r14d, %ebx
jmp 0x2f69
movq 0x20(%rsp), %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2fb0
nop
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/src/test_vec_comp.c
// Function: init_data
void
init_data (vl_size numDimensions, vl_size numSamples, float ** X, float ** Y)
{
  VlRand * rand = vl_get_rand() ;
  vl_uindex i ;
  float * Xi = *X = vl_malloc(sizeof(float) * numDimensions * numSamples) ;
  float * Yi = *Y = vl_malloc(sizeof(float) * numDimensions * numSamples) ;
  for (i = 0 ; i < numDimensions * numSamples ; ++ i) {
    *Xi++ = vl_rand_real1(rand) ;
    *Yi++ = vl_rand_real1(rand) ;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
callq 0x10b0
movq %rax, %r14
imulq %r15, %rbx
leaq (,%rbx,4), %rbp
movq %rbp, %rdi
callq 0x1080
movq %rax, %r15
movq %rax, (%r12)
movq %rbp, %rdi
callq 0x1080
movq %rax, %r12
movq %rax, (%r13)
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x1246
movq %r14, %rdi
callq 0x1255
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%r13,4)
movq %r14, %rdi
callq 0x1255
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%r13,4)
incq %r13
jmp 0x1218
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/src/test_vec_comp.c
// Function: main
int
main (int argc VL_UNUSED, char** argv VL_UNUSED)
{
  float * X ;
  float * Y ;
  vl_size numDimensions = 1000 ;
  vl_size numSamples    = 2000 ;
  float * result = vl_malloc (sizeof(float) * numSamples * numSamples) ;
  VlFloatVectorComparisonFunction f ;

  init_data (numDimensions, numSamples, &X, &Y) ;

  X+=1 ;
  Y+=1 ;

  vl_set_simd_enabled (VL_FALSE) ;
  f = vl_get_vector_comparison_function_f (VlDistanceL2) ;
  vl_tic () ;
  vl_eval_vector_comparison_on_all_pairs_f (result, numDimensions, X, numSamples, Y, numSamples, f) ;
  VL_PRINTF("Float L2 distnace: %.3f s\n", vl_toc ()) ;

  vl_set_simd_enabled (VL_TRUE) ;
  f = vl_get_vector_comparison_function_f (VlDistanceL2) ;
  vl_tic () ;
  vl_eval_vector_comparison_on_all_pairs_f (result, numDimensions, X, numSamples, Y, numSamples, f) ;
  VL_PRINTF("Float L2 distance (SIMD): %.3f s\n", vl_toc ()) ;

  X-- ;
  Y-- ;

  vl_free (X) ;
  vl_free (Y) ;
  vl_free (result) ;

  return 0 ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0xf42400, %edi         # imm = 0xF42400
callq 0x1080
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x18(%rsp), %r13
movl $0x3e8, %edi            # imm = 0x3E8
movl $0x7d0, %esi            # imm = 0x7D0
movq %r14, %rdx
movq %r13, %rcx
callq 0x11cc
movq (%r14), %r15
leaq 0x4(%r15), %r12
movq (%r13), %rax
movq %rax, 0x10(%rsp)
leaq 0x4(%rax), %r13
xorl %edi, %edi
callq 0x1090
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0x10a0
movq %rax, %r14
callq 0x1030
movq %r14, (%rsp)
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x7d0, %ecx            # imm = 0x7D0
movl $0x7d0, %r9d            # imm = 0x7D0
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %r8
callq 0x10c0
callq 0x1040
movq %rax, %r14
callq 0x1050
leaq 0xd07(%rip), %rdi       # 0x2010
movb $0x1, %al
callq *%r14
movl %ebp, %edi
callq 0x1090
movl %ebp, %edi
callq 0x10a0
movq %rax, %r14
callq 0x1030
movq %r14, (%rsp)
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x7d0, %ecx            # imm = 0x7D0
movl $0x7d0, %r9d            # imm = 0x7D0
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %r8
callq 0x10c0
callq 0x1040
movq %rax, %r14
callq 0x1050
leaq 0xcd1(%rip), %rdi       # 0x202b
movb $0x1, %al
callq *%r14
movq %r15, %rdi
callq 0x1070
movq 0x10(%rsp), %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1070
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: getgoal
long getgoal (LINE *dlp)
{
  int col, newcol, dbo, c;

  col = 0;
  dbo = 0;
  while (dbo != llength (dlp))
    {
      c = lgetc (dlp, dbo);
      newcol = col;
      if (c == '\t')
	newcol |= 0x07;
      else if (c < 0x20 || c == 0x7F)
	++newcol;
      ++newcol;
      if (newcol > curgoal)
	break;
      col = newcol;
      ++dbo;
    }
  return (dbo);
}

// Assembly:
movl 0x14(%rdi), %eax
leaq 0xa792(%rip), %rcx      # 0xcb18
movl (%rcx), %edx
xorl %ecx, %ecx
xorl %esi, %esi
cmpq %rcx, %rax
je 0x23c9
movb 0x18(%rdi,%rcx), %r8b
cmpb $0x9, %r8b
jne 0x23a1
orl $0x7, %esi
jmp 0x23bb
cmpb $0x20, %r8b
setb %r9b
cmpb $0x7f, %r8b
sete %r8b
orb %r9b, %r8b
movzbl %r8b, %r8d
addl %r8d, %esi
cmpl %edx, %esi
jge 0x23c6
incl %esi
incq %rcx
jmp 0x238c
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: backchar
int backchar (int f, int n)
{
  LINE *lp;

  if (n < 0)
    return (forwchar (f, -n));
  while (n--)
    {
      if (curwp->w_doto == 0)
	{
	  if ((lp = lback (curwp->w_dotp)) == curbp->b_linep)
	    return (FALSE);
	  curwp->w_dotp = lp;
	  curwp->w_doto = llength (lp);
	  curwp->w_flag |= WFMOVE;
	}
      else
	curwp->w_doto--;
    }
  return (TRUE);
}

// Assembly:
testl %esi, %esi
js 0x2449
leaq 0xa636(%rip), %rax      # 0xca38
movq (%rax), %rcx
leaq 0xa61c(%rip), %rax      # 0xca28
movq (%rax), %rdx
pushq $0x1
popq %rax
subl $0x1, %esi
jb 0x2452
movq 0x20(%rcx), %rdi
testq %rdi, %rdi
je 0x2429
decq %rdi
movq %rdi, 0x20(%rcx)
jmp 0x2412
movq 0x18(%rcx), %rdi
movq 0x8(%rdi), %rdi
cmpq 0x28(%rdx), %rdi
je 0x2450
movq %rdi, 0x18(%rcx)
movslq 0x14(%rdi), %rdi
movq %rdi, 0x20(%rcx)
orb $0x2, 0x3b(%rcx)
jmp 0x2412
negl %esi
jmp 0x2453
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: forwchar
int forwchar (int f, int n)
{
  if (n < 0)
    return (backchar (f, -n));
  while (n--)
    {
      if (curwp->w_doto == llength (curwp->w_dotp))
	{
	  if (curwp->w_dotp == curbp->b_linep)
	    return (FALSE);
	  curwp->w_dotp = lforw (curwp->w_dotp);
	  curwp->w_doto = 0;
	  curwp->w_flag |= WFMOVE;
	}
      else
	curwp->w_doto++;
    }
  return (TRUE);
}

// Assembly:
testl %esi, %esi
js 0x24a5
leaq 0xa5da(%rip), %rax      # 0xca38
movq (%rax), %rcx
leaq 0xa5c0(%rip), %rax      # 0xca28
movq (%rax), %rdx
pushq $0x1
popq %rax
subl $0x1, %esi
jb 0x24ae
movq 0x18(%rcx), %rdi
movq 0x20(%rcx), %r8
movslq 0x14(%rdi), %r9
cmpq %r9, %r8
jne 0x249c
cmpq 0x28(%rdx), %rdi
je 0x24ac
movq (%rdi), %rdi
movq %rdi, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
orb $0x2, 0x3b(%rcx)
jmp 0x246e
incq %r8
movq %r8, 0x20(%rcx)
jmp 0x246e
negl %esi
jmp 0x23f7
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: gotoline
int gotoline (int f, int n)
{
  char buf[10];
  char *ep;
  int l,s;

  if ((s = mlreplyt("Goto Line: ", buf, sizeof(buf), '\n')) != TRUE )
	  return s;

  if (buf[0] == '\0')
	return (ABORT);

  l = (int)strtoll(buf, &ep, 10);

  if (buf == ep || *ep != '\0' || n < 1) 
	{
	  mlwrite("Error");
	  return (FALSE);
	}

  /* first, we go to the start of the buffer */
  curwp->w_dotp = lforw (curbp->b_linep);
  curwp->w_doto = 0;
  return (forwline (f, l - 1));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movl %edi, %ebx
leaq 0x5b40(%rip), %rdi      # 0x8004
leaq 0x6(%rsp), %r14
pushq $0xa
popq %rcx
movq %r14, %rsi
movl %ecx, %edx
callq 0x3edf
movl %eax, %r15d
cmpl $0x1, %eax
jne 0x2553
cmpb $0x0, 0x6(%rsp)
je 0x254f
leaq 0x10(%rsp), %r15
pushq $0xa
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
movq (%r15), %rcx
cmpq %rcx, %r14
je 0x253c
testl %ebp, %ebp
jle 0x253c
cmpb $0x0, (%rcx)
jne 0x253c
leaq 0xa518(%rip), %rcx      # 0xca28
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
movq (%rcx), %rcx
leaq 0xa517(%rip), %rdx      # 0xca38
movq (%rdx), %rdx
movq %rcx, 0x18(%rdx)
andq $0x0, 0x20(%rdx)
decl %eax
movl %ebx, %edi
movl %eax, %esi
callq 0x2561
pushq $0x1
jmp 0x2551
leaq 0x5acd(%rip), %rdi      # 0x8010
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x3dec
jmp 0x2553
pushq $0x2
popq %r15
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: forwline
int forwline (int f, int n)
{
  LINE *dlp;

  if (n < 0)
    return (backline (f, -n));
  if ((lastflag & CFCPCN) == 0)/* Reset goal if last */
    curgoal = getccol (FALSE); /* not C-P or C-N */
  thisflag |= CFCPCN;
  dlp = curwp->w_dotp;
  while (n-- && dlp != curbp->b_linep)
    dlp = lforw (dlp);
  curwp->w_dotp = dlp;
  curwp->w_doto = getgoal (dlp);
  curwp->w_flag |= WFMOVE;
  return (TRUE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
js 0x25cc
leaq 0xa4be(%rip), %rax      # 0xca30
testb $0x1, (%rax)
jne 0x2587
xorl %edi, %edi
callq 0x59b5
leaq 0xa593(%rip), %rcx      # 0xcb18
movl %eax, (%rcx)
leaq 0xa4ca(%rip), %rax      # 0xca58
orb $0x1, (%rax)
leaq 0xa4a0(%rip), %rax      # 0xca38
movq (%rax), %r14
leaq 0x18(%r14), %rdi
leaq 0xa482(%rip), %rax      # 0xca28
movq (%rax), %rax
incl %ebx
movq (%rdi), %rdi
decl %ebx
je 0x25b8
cmpq 0x28(%rax), %rdi
jne 0x25ab
movq %rdi, 0x18(%r14)
callq 0x237c
movq %rax, 0x20(%r14)
orb $0x2, 0x3b(%r14)
jmp 0x25d5
negl %ebx
movl %ebx, %esi
callq 0x2635
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: gotobob
int gotobob (int f, int n)
{
  curwp->w_dotp = lforw (curbp->b_linep);
  curwp->w_doto = 0;
  curwp->w_flag |= WFHARD;
  return (TRUE);
}

// Assembly:
leaq 0xa441(%rip), %rax      # 0xca28
movq (%rax), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
leaq 0xa440(%rip), %rcx      # 0xca38
movq (%rcx), %rcx
movq %rax, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
orb $0x8, 0x3b(%rcx)
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: gotoeob
int gotoeob (int f, int n)
{
  curwp->w_dotp = curbp->b_linep;
  curwp->w_doto = 0;
  curwp->w_flag |= WFHARD;
  return (TRUE);
}

// Assembly:
leaq 0xa415(%rip), %rax      # 0xca28
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0xa417(%rip), %rcx      # 0xca38
movq (%rcx), %rcx
movq %rax, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
orb $0x8, 0x3b(%rcx)
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/hughbarney[P]pEmacs/basic.c
// Function: backline
int backline (int f, int n)
{
  LINE *dlp;

  if (n < 0)
    return (forwline (f, -n));
  if ((lastflag & CFCPCN) == 0)/* Reset goal if the */
    curgoal = getccol (FALSE); /* last isn't C-P, C-N */
  thisflag |= CFCPCN;
  dlp = curwp->w_dotp;
  while (n-- && lback (dlp) != curbp->b_linep)
    dlp = lback (dlp);
  curwp->w_dotp = dlp;
  curwp->w_doto = getgoal (dlp);
  curwp->w_flag |= WFMOVE;
  return (TRUE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
js 0x26a4
leaq 0xa3ea(%rip), %rax      # 0xca30
testb $0x1, (%rax)
jne 0x265b
xorl %edi, %edi
callq 0x59b5
leaq 0xa4bf(%rip), %rcx      # 0xcb18
movl %eax, (%rcx)
leaq 0xa3f6(%rip), %rax      # 0xca58
orb $0x1, (%rax)
leaq 0xa3cc(%rip), %rax      # 0xca38
movq (%rax), %r14
movq 0x18(%r14), %rcx
leaq 0xa3ae(%rip), %rax      # 0xca28
movq (%rax), %rax
incl %ebx
movq %rcx, %rdi
decl %ebx
je 0x2690
movq 0x8(%rdi), %rcx
cmpq 0x28(%rax), %rcx
jne 0x267f
movq %rdi, 0x18(%r14)
callq 0x237c
movq %rax, 0x20(%r14)
orb $0x2, 0x3b(%r14)
jmp 0x26ad
negl %ebx
movl %ebx, %esi
callq 0x2561
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq