// File: /workspace/github_c_makefile_star2_O0/aremmell[P]libsir/src/sirinternal.c
// Function: sir_syslog_updated
bool _sir_syslog_updated(sirinit* si, const sir_update_config_data* data) {
#if !defined(SIR_NO_SYSTEM_LOGGERS)
    if (!_sir_validptr(si) || !_sir_validptr(data))
        return false;

    if (_sir_bittest(si->d_syslog._state.mask, SIRSL_UPDATED)) {
        bool levels   = _sir_bittest(si->d_syslog._state.mask, SIRSL_LEVELS);
        bool options  = _sir_bittest(si->d_syslog._state.mask, SIRSL_OPTIONS);
        bool category = _sir_bittest(si->d_syslog._state.mask, SIRSL_CATEGORY);
        bool identity = _sir_bittest(si->d_syslog._state.mask, SIRSL_IDENTITY);
        bool is_init  = _sir_bittest(si->d_syslog._state.mask, SIRSL_IS_INIT);
        bool is_open  = _sir_bittest(si->d_syslog._state.mask, SIRSL_IS_OPEN);

        _sir_selflog("config update: (levels: %u, options: %u, category: %u,"
                     " identity: %u, is_init: %u, is_open: %u)",
                     levels, options, category, identity, is_init, is_open);

        bool must_init = false;
# if defined(SIR_OS_LOG_ENABLED)
        /* for os_log, if initialized and open already, only need to reconfigure
         * if identity or category changed. */
        must_init = (!is_init || !is_open) || (identity || category);
# elif defined(SIR_SYSLOG_ENABLED)
        /* for syslog, if initialized and open already, only need to reconfigure
         * if identity or options changed. */
        must_init = (!is_init || !is_open) || (identity || options);
# elif defined(SIR_EVENTLOG_ENABLED)
        /* for event log, if initialized and open already, only need to reconfigure
         * if identity changed. */
        must_init = (!is_init || !is_open) || identity;
# endif
        bool init = true;
        if (must_init) {
            if (is_open) /* close first; open will fail otherwise. */
                init = _sir_syslog_close(&si->d_syslog);

            _sir_selflog("re-init...");
            _sir_eqland(init, _sir_syslog_init(si->name, &si->d_syslog));
            _sir_selflog("re-init %s", init ? "succeeded" : "failed");
        } else {
            _sir_selflog("no re-init necessary");
        }

        return init;
    }

    return false;
#else
    SIR_UNUSED(si);
    SIR_UNUSED(data);
    return false;
#endif
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x7378(%rip), %rdx      # 0x115b7
leaq 0x6e50(%rip), %rcx      # 0x11096
movl $0x428, %r8d            # imm = 0x428
callq 0x8f70
testb $0x1, %al
jne 0xa257
jmp 0xa27e
movq 0x20(%rsp), %rdi
movl $0x1, %esi
leaq 0x734f(%rip), %rdx      # 0x115b7
leaq 0x6e27(%rip), %rcx      # 0x11096
movl $0x428, %r8d            # imm = 0x428
callq 0x8f70
testb $0x1, %al
jne 0xa288
movb $0x0, 0x37(%rsp)
jmp 0xa47e
movq 0x28(%rsp), %rax
movl 0x18(%rax), %edi
movl $0x20, %esi
callq 0xbf30
testb $0x1, %al
jne 0xa2a3
jmp 0xa479
movq 0x28(%rsp), %rax
movl 0x18(%rax), %edi
movl $0x2, %esi
callq 0xbf30
andb $0x1, %al
movb %al, 0x1f(%rsp)
movq 0x28(%rsp), %rax
movl 0x18(%rax), %edi
movl $0x4, %esi
callq 0xbf30
andb $0x1, %al
movb %al, 0x1e(%rsp)
movq 0x28(%rsp), %rax
movl 0x18(%rax), %edi
movl $0x8, %esi
callq 0xbf30
andb $0x1, %al
movb %al, 0x1d(%rsp)
movq 0x28(%rsp), %rax
movl 0x18(%rax), %edi
movl $0x10, %esi
callq 0xbf30
andb $0x1, %al
movb %al, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movl 0x18(%rax), %edi
movl $0x40, %esi
callq 0xbf30
andb $0x1, %al
movb %al, 0x1b(%rsp)
movq 0x28(%rsp), %rax
movl 0x18(%rax), %edi
movl $0x1, %esi
callq 0xbf30
andb $0x1, %al
movb %al, 0x1a(%rsp)
movb 0x1f(%rsp), %al
andb $0x1, %al
movzbl %al, %esi
movb 0x1e(%rsp), %al
andb $0x1, %al
movzbl %al, %edx
movb 0x1d(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x1c(%rsp), %al
andb $0x1, %al
movzbl %al, %r8d
movb 0x1b(%rsp), %al
andb $0x1, %al
movzbl %al, %r9d
movb 0x1a(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
leaq 0x7259(%rip), %rdi      # 0x115cb
movl %eax, (%rsp)
movb $0x0, %al
callq 0x9730
movb $0x0, 0x19(%rsp)
movb $0x1, %al
testb $0x1, 0x1b(%rsp)
movb %al, 0x17(%rsp)
je 0xa3b8
movb $0x1, %al
testb $0x1, 0x1a(%rsp)
movb %al, 0x17(%rsp)
je 0xa3b8
movb $0x1, %al
testb $0x1, 0x1c(%rsp)
movb %al, 0x16(%rsp)
jne 0xa3b0
movb 0x1e(%rsp), %al
movb %al, 0x16(%rsp)
movb 0x16(%rsp), %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
movb %al, 0x19(%rsp)
movb $0x1, 0x18(%rsp)
testb $0x1, 0x19(%rsp)
je 0xa45f
testb $0x1, 0x1a(%rsp)
je 0xa3ed
movq 0x28(%rsp), %rdi
addq $0x10, %rdi
callq 0x9d50
andb $0x1, %al
movb %al, 0x18(%rsp)
leaq 0x7236(%rip), %rdi      # 0x1162a
movb $0x0, %al
callq 0x9730
movq 0x28(%rsp), %rdi
addq $0xe8, %rdi
movq 0x28(%rsp), %rsi
addq $0x10, %rsi
callq 0x97c0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x15(%rsp)
jne 0xa424
jmp 0xa42c
movb 0x18(%rsp), %al
movb %al, 0x15(%rsp)
movb 0x15(%rsp), %al
andb $0x1, %al
movb %al, 0x18(%rsp)
movb 0x18(%rsp), %cl
leaq 0x7209(%rip), %rsi      # 0x1164a
leaq 0x71f8(%rip), %rax      # 0x11640
testb $0x1, %cl
cmovneq %rax, %rsi
leaq 0x71df(%rip), %rdi      # 0x11635
movb $0x0, %al
callq 0x9730
jmp 0xa46d
leaq 0x71eb(%rip), %rdi      # 0x11651
movb $0x0, %al
callq 0x9730
movb 0x18(%rsp), %al
andb $0x1, %al
movb %al, 0x37(%rsp)
jmp 0xa47e
movb $0x0, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax)