// File: davmac314[P]dinit/src/dinit-monitor.cc
// Function: issue_var(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<stringview, std::allocator<stringview>>&, char const*, char const*)
static bool issue_var(std::string &envar, const std::unordered_set<std::string> &varset, std::vector<stringview> &command_parts,
        const char* str_set, const char* str_unset)
{
    auto eq = envar.find('=');
    if (eq == envar.npos) {
        /* unset */
        eq = envar.size();
    }
    auto *sp = &envar[0];
    sp[eq] = '\0';
    if (varset.empty() || varset.find(sp) != varset.end()) {
        if (eq == envar.size()) {
            issue_command(sp, nullptr, str_unset, command_parts, true);
        }
        else {
            issue_command(sp, &sp[eq + 1], str_set, command_parts, true);
        }
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33b0
movq %rax, -0x38(%rbp)
cmpq $-0x1, -0x38(%rbp)
jne 0x5959
movq -0x10(%rbp), %rdi
callq 0x31b0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3550
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rdi
callq 0xa430
movb %al, %cl
movb $0x0, -0x6a(%rbp)
movb $0x0, -0x7d(%rbp)
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x89(%rbp)
jne 0x5a2b
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x3510
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movb $0x1, -0x6a(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6a70
jmp 0x59dd
movq -0xa8(%rbp), %rdi
movb $0x1, -0x7d(%rbp)
leaq -0x68(%rbp), %rsi
callq 0xa480
movq %rax, -0xb0(%rbp)
jmp 0x59fa
movq -0xb0(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa4b0
movq %rax, -0x88(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xa450
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
movb %al, -0xb1(%rbp)
testb $0x1, -0x7d(%rbp)
jne 0x5a3f
jmp 0x5a48
leaq -0x68(%rbp), %rdi
callq 0x3190
testb $0x1, -0x6a(%rbp)
jne 0x5a50
jmp 0x5a59
leaq -0x69(%rbp), %rdi
callq 0x32f0
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x5a68
jmp 0x5b14
movq -0x38(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31b0
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
jne 0x5ae8
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %r8d
callq 0x51e0
jmp 0x5b0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x5ad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
testb $0x1, -0x7d(%rbp)
jne 0x5aca
jmp 0x5ad3
leaq -0x68(%rbp), %rdi
callq 0x3190
jmp 0x5ad5
testb $0x1, -0x6a(%rbp)
jne 0x5add
jmp 0x5ae6
leaq -0x69(%rbp), %rdi
callq 0x32f0
jmp 0x5b26
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rax
addq $0x1, %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %r8d
callq 0x51e0
movb $0x1, -0x1(%rbp)
jmp 0x5b18
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x3500
nop