// File: ridiculousfish[P]docopt_fish/docopt_fish.cpp
// Function: docopt_fish::docopt_impl::suggest_next_argument(std::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>>> const&, unsigned int) const
suggestion_list_t suggest_next_argument(const string_list_t &argv_with_partial, parse_flags_t flags) const {
        // Set internal flags to generate suggestions
        flags |= flag_generate_suggestions;

        // The last argument is partial
        // Remove it and store it separately
        string_list_t argv = argv_with_partial;
        string_t partial_last_arg;
        if (! argv.empty()) {
            partial_last_arg = argv.back();
            argv.pop_back();
        }
        
        // Try completing a value for the last partial argument
        // This includes both --foo=bar... and -DNDEB...
        if (! partial_last_arg.empty()) {
            suggestion_list_t value_suggestions = this->suggest_value_completion(partial_last_arg);
            if (! value_suggestions.empty()) {
                return value_suggestions;
            }
        }
        
        suggestion_t suggestion;
        arg_classification_t aclass = argv_classifier_t::classify_arguments(argv, all_options, names_to_metadata,
                                                                           flags, nullptr /* errors */, &suggestion);

        // If we got a suggestion, it means that the last argument was of the form
        // --foo, where --foo wants a value. That's all we care about.
        if (!suggestion.token.empty()) {
            return {std::move(suggestion)};
        }
        
        // Perform the actual matching
        match_results_t mr = match_usages(this->usages, flags, this->shortcut_options, aclass, argv);
        
        // Turn the mr suggestion tokens into our annotated suggestions
        suggestion_list_t result;
        result.reserve(mr.suggestions.size());
        for (const rstring_t &tok : mr.suggestions) {
            result.push_back(suggestion_for(tok, this->names_to_metadata));
        }
        
        // Handle combined shorts with the partial argument
        if (! partial_last_arg.empty()) {
            combine_short_suggestions(&result, partial_last_arg);
        }
        
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
movq %rdi, -0x328(%rbp)
movq %rdi, %rax
movq %rax, -0x320(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x318(%rbp)
movl -0x1c(%rbp), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x13640
leaq -0x58(%rbp), %rdi
callq 0x8150
leaq -0x38(%rbp), %rdi
callq 0x13730
testb $0x1, %al
jne 0xd2b7
leaq -0x38(%rbp), %rdi
callq 0x13770
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x8460
jmp 0xd29b
leaq -0x38(%rbp), %rdi
callq 0x137b0
jmp 0xd2b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xd6e8
leaq -0x58(%rbp), %rdi
callq 0x83d0
testb $0x1, %al
jne 0xd326
movq -0x318(%rbp), %rsi
movq -0x328(%rbp), %rdi
movb $0x0, -0x65(%rbp)
leaq -0x58(%rbp), %rdx
callq 0x137e0
jmp 0xd2e1
movq -0x328(%rbp), %rdi
callq 0x13bd0
testb $0x1, %al
jne 0xd2fe
movb $0x1, -0x65(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xd305
movl $0x0, -0x6c(%rbp)
testb $0x1, -0x65(%rbp)
jne 0xd317
movq -0x328(%rbp), %rdi
callq 0x13c10
movl -0x6c(%rbp), %eax
testl %eax, %eax
jne 0xd6c6
jmp 0xd324
jmp 0xd326
leaq -0x100(%rbp), %rdi
callq 0x11ec0
jmp 0xd334
movq -0x318(%rbp), %rcx
movq %rcx, %rdx
addq $0x68, %rdx
subq $-0x80, %rcx
movl -0x1c(%rbp), %r8d
movq %rsp, %rax
leaq -0x100(%rbp), %rsi
movq %rsi, (%rax)
xorl %eax, %eax
movl %eax, %r9d
leaq -0x138(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa350
jmp 0xd36e
leaq -0x100(%rbp), %rdi
callq 0x83d0
testb $0x1, %al
jne 0xd4cf
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x338(%rbp)
leaq -0x100(%rbp), %rsi
callq 0x13c70
movq -0x338(%rbp), %rax
movq %rax, -0x148(%rbp)
movq $0x1, -0x140(%rbp)
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x13cd0
movq -0x328(%rbp), %rdi
movq -0x330(%rbp), %rcx
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
callq 0x13cf0
jmp 0xd3eb
leaq -0x1d9(%rbp), %rdi
callq 0x13d70
leaq -0x1d8(%rbp), %rax
movq %rax, -0x348(%rbp)
addq $0x90, %rax
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rdi
addq $-0x90, %rdi
movq %rdi, -0x350(%rbp)
callq 0x111c0
movq -0x348(%rbp), %rcx
movq -0x350(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x340(%rbp)
jne 0xd412
movl $0x1, -0x6c(%rbp)
jmp 0xd692
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xd6b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1d9(%rbp), %rdi
callq 0x13d70
leaq -0x1d8(%rbp), %rax
movq %rax, -0x360(%rbp)
addq $0x90, %rax
movq %rax, -0x358(%rbp)
movq -0x358(%rbp), %rdi
addq $-0x90, %rdi
movq %rdi, -0x368(%rbp)
callq 0x111c0
movq -0x360(%rbp), %rcx
movq -0x368(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x358(%rbp)
jne 0xd496
jmp 0xd6ac
movq -0x318(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq %rsi, %rcx
addq $0x50, %rcx
leaq -0x258(%rbp), %rdi
leaq -0x138(%rbp), %r8
leaq -0x38(%rbp), %r9
callq 0x2fb00
jmp 0xd4f9
movq -0x328(%rbp), %rdi
movb $0x0, -0x259(%rbp)
callq 0x13d90
leaq -0x210(%rbp), %rdi
callq 0x13eb0
movq -0x328(%rbp), %rdi
movq %rax, %rsi
callq 0x13db0
jmp 0xd529
leaq -0x258(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rdi
callq 0x13ed0
movq %rax, -0x270(%rbp)
movq -0x268(%rbp), %rdi
callq 0x13f00
movq %rax, -0x278(%rbp)
leaq -0x270(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x13f30
testb $0x1, %al
jne 0xd57d
jmp 0xd61f
leaq -0x270(%rbp), %rdi
callq 0x13f60
movq -0x318(%rbp), %rdx
movq %rax, -0x280(%rbp)
movq -0x280(%rbp), %rsi
subq $-0x80, %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq -0x310(%rbp), %rdi
callq 0xaeb0
jmp 0xd5b4
movq -0x328(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x13f90
jmp 0xd5c9
leaq -0x310(%rbp), %rdi
callq 0x111c0
leaq -0x270(%rbp), %rdi
callq 0x13fc0
jmp 0xd561
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xd6ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xd678
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x111c0
jmp 0xd678
leaq -0x58(%rbp), %rdi
callq 0x83d0
testb $0x1, %al
jne 0xd647
movq -0x328(%rbp), %rsi
movq -0x318(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x13ff0
jmp 0xd645
jmp 0xd647
movb $0x1, -0x259(%rbp)
movl $0x1, -0x6c(%rbp)
testb $0x1, -0x259(%rbp)
jne 0xd66a
movq -0x328(%rbp), %rdi
callq 0x13c10
leaq -0x258(%rbp), %rdi
callq 0x12890
jmp 0xd692
movq -0x328(%rbp), %rdi
callq 0x13c10
leaq -0x258(%rbp), %rdi
callq 0x12890
jmp 0xd6ac
leaq -0x138(%rbp), %rdi
callq 0x11f30
leaq -0x100(%rbp), %rdi
callq 0x111c0
jmp 0xd6c6
leaq -0x138(%rbp), %rdi
callq 0x11f30
leaq -0x100(%rbp), %rdi
callq 0x111c0
jmp 0xd6e8
leaq -0x58(%rbp), %rdi
callq 0x8590
leaq -0x38(%rbp), %rdi
callq 0x12f80
movq -0x320(%rbp), %rax
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x8590
leaq -0x38(%rbp), %rdi
callq 0x12f80
movq -0x60(%rbp), %rdi
callq 0x85d0
nopw %cs:(%rax,%rax)
nopl (%rax)