// File: ridiculousfish[P]docopt_fish/docopt_fish.cpp
// Function: docopt_fish::docopt_impl::suggest_value_completion(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&) const
suggestion_list_t suggest_value_completion(const string_t &partial_arg) const {
        if (partial_arg.size() < 2 || partial_arg.front() != '-')
            return {};
        
        suggestion_list_t suggestions;

        rstring_t long_name, short_name;
        const size_t short_name_len = 2; // like -D
        const size_t equals_pos = partial_arg.find('=');
        if (equals_pos != string_t::npos) {
            assert(equals_pos < partial_arg.size());
            // For example, we look like --foo=bar
            // Look for a value-carrying option with this long name (--foo)
            long_name = rstring_t(partial_arg, 0, equals_pos);
        } else {
            // We will try matching as an unseparated short option, like -D<Value>
            short_name = rstring_t(partial_arg, 0, short_name_len);
        }
        
        for (const option_t &opt : this->all_options) {
            if (! opt.has_value())
                continue;
            
            if (! long_name.empty()) {
                if (long_name == opt.names[option_t::single_long] ||
                    long_name == opt.names[option_t::double_long]) {
                    suggestions.push_back(suggestion_for(opt.value, this->names_to_metadata, equals_pos + 1));
                    break;
                }
            }
            
            if (! short_name.empty() && short_name == opt.names[option_t::single_short]) {
                suggestions.push_back(suggestion_for(opt.value, this->names_to_metadata, short_name_len));
                break;
            }
        }
        return suggestions;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x1f8(%rbp)
movq %rdi, %rax
movq %rax, -0x1f0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8230
cmpq $0x2, %rax
jb 0x13830
movq -0x18(%rbp), %rdi
callq 0x8190
cmpl $0x2d, (%rax)
je 0x13854
movq -0x1f8(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x8180
movq -0x1f8(%rbp), %rdi
callq 0x13d90
jmp 0x13baa
movq -0x1f8(%rbp), %rdi
movb $0x0, -0x19(%rbp)
callq 0x13d90
leaq -0x38(%rbp), %rdi
callq 0xbe70
jmp 0x1386f
leaq -0x60(%rbp), %rdi
callq 0xbe70
jmp 0x1387a
movq $0x2, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movl $0x3d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x82d0
movq %rax, -0x70(%rbp)
cmpq $-0x1, -0x70(%rbp)
je 0x1392f
movq -0x70(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8230
movq %rax, %rcx
movq -0x200(%rbp), %rax
cmpq %rcx, %rax
jae 0x138c8
jmp 0x138f8
leaq 0x38006(%rip), %rdi     # 0x4b8d5
leaq 0x377b2(%rip), %rsi     # 0x4b088
movl $0x4aa, %edx            # imm = 0x4AA
leaq 0x38013(%rip), %rcx     # 0x4b8f5
callq 0x81e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x13b9c
movq -0x18(%rbp), %rsi
movq -0x70(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x88(%rbp), %rdi
callq 0xc430
jmp 0x13912
movq -0x88(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x1396b
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0xa0(%rbp), %rdi
movl $0x2, %ecx
callq 0xc430
jmp 0x1394a
movq -0xa0(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x1e8(%rbp), %rax
addq $0x68, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x14c00
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x14c30
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x14c60
testb $0x1, %al
jne 0x139bf
jmp 0x13b84
leaq -0xb0(%rbp), %rdi
callq 0xc8c0
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0xc8e0
testb $0x1, %al
jne 0x139e7
jmp 0x13b73
leaq -0x38(%rbp), %rdi
callq 0xbe30
testb $0x1, %al
jne 0x13aca
movq -0xc0(%rbp), %rdi
movl $0x1, %esi
callq 0x14d00
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x14ca0
movb %al, -0x201(%rbp)
jmp 0x13a1d
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x13a5a
jmp 0x13a29
movq -0xc0(%rbp), %rdi
movl $0x2, %esi
callq 0x14d00
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x14ca0
movb %al, -0x202(%rbp)
jmp 0x13a4e
movb -0x202(%rbp), %al
testb $0x1, %al
jne 0x13a5a
jmp 0x13ac8
movq -0x1e8(%rbp), %rdx
movq -0xc0(%rbp), %rsi
addq $0x48, %rsi
subq $-0x80, %rdx
movq -0x70(%rbp), %rcx
incq %rcx
leaq -0x150(%rbp), %rdi
callq 0xaeb0
jmp 0x13a85
movq -0x1f8(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x13f90
jmp 0x13a9a
leaq -0x150(%rbp), %rdi
callq 0x111c0
jmp 0x13b84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x111c0
jmp 0x13b9c
jmp 0x13aca
leaq -0x60(%rbp), %rdi
callq 0xbe30
testb $0x1, %al
jne 0x13b71
movq -0xc0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x14d00
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
callq 0x14ca0
movb %al, -0x203(%rbp)
jmp 0x13aff
movb -0x203(%rbp), %al
testb $0x1, %al
jne 0x13b0b
jmp 0x13b71
movq -0x1e8(%rbp), %rdx
movq -0xc0(%rbp), %rsi
addq $0x48, %rsi
subq $-0x80, %rdx
leaq -0x1e0(%rbp), %rdi
movl $0x2, %ecx
callq 0xaeb0
jmp 0x13b34
movq -0x1f8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x13f90
jmp 0x13b49
leaq -0x1e0(%rbp), %rdi
callq 0x111c0
jmp 0x13b84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x111c0
jmp 0x13b9c
jmp 0x13b73
leaq -0xb0(%rbp), %rdi
callq 0x14d30
jmp 0x139a3
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x13b9a
movq -0x1f8(%rbp), %rdi
callq 0x13c10
jmp 0x13baa
movq -0x1f8(%rbp), %rdi
callq 0x13c10
jmp 0x13bba
movq -0x1f0(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x85d0
nopw %cs:(%rax,%rax)
nopl (%rax)