// File: /workspace/github_cpp_makefile_star2_O2/ridiculousfish[P]docopt_fish/docopt_matching.cpp
// Function: docopt_fish::match_context_t::unused_arguments(docopt_fish::match_state_t const*) const
index_list_t unused_arguments(const match_state_t *state) const {
        // To find the unused arguments, we walk over the used arguments and take
        // what's left
        // Arguments may be unused for any of three reasons:
        // 1. It is an unconsumed positional
        // 2. It is an option that we found in the tree, but was not matched during
        //    tree descent
        // 3. It is an option that was not found in the tree at all
        // Make a vector the same size as argv.
        // As we walk over positionals and options, we will mark the corresponding
        // index as used.
        // At the end, the unset bits are the unused arguments
        std::vector<bool> used_argv_indexes(this->argv.size(), false);
        
        auto mark_used = [&](size_t idx) {
            if (idx != npos)
                used_argv_indexes.at(idx) = true;
        };
        auto mark_unused = [&](size_t idx) {
            if (idx != npos)
                used_argv_indexes.at(idx) = false;
        };
        
        // consumed_options is a vector parallel to resolved_options,
        // which tracks whether each resolved_option was used
        const std::vector<bool> &copts = *state->consumed_options;

        // Walk over used positionals.
        // next_positional_index is the first unused one
        for (size_t i = 0; i < state->next_positional_index; i++) {
            mark_used(this->aclass.positionals.at(i).idx_in_argv);
        }

        // Walk over options matched during tree descent.
        // We should have one bit per option
        assert(copts.size() == this->aclass.resolved_options.size());
        for (size_t i = 0; i < copts.size(); i++) {
            if (copts.at(i)) {
                // This option was used. The name index is definitely used. The value
                // index is also used, if it's not npos
                // (note that it may be the same as the name index)
                const resolved_option_t &opt = this->aclass.resolved_options.at(i);
                mark_used(opt.name_idx_in_argv);
                mark_used(opt.value_idx_in_argv);
            }
        }

        // Walk over options NOT matched during tree descent and clear their bits.
        // An argument may be both matched and unmatched, i.e. if "-vv" is parsed
        // into two short options.
        // In that case, we want to mark it as unmatched.
        for (size_t i = 0; i < copts.size(); i++) {
            if (!copts.at(i)) {
                const resolved_option_t &opt = this->aclass.resolved_options.at(i);
                mark_unused(opt.name_idx_in_argv);
            }
        }

        // Don't report the double-dash argument as unused
        mark_used(this->aclass.double_dash_idx);

        // Extract the unused indexes from the bitmap of used arguments
        index_list_t unused_argv_idxs;
        for (size_t i = 0; i < used_argv_indexes.size(); i++) {
            if (!used_argv_indexes.at(i)) {
                unused_argv_idxs.push_back(i);
            }
        }
        return unused_argv_idxs;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq 0x18(%rsi), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
movq %rdi, %rbx
sarq $0x5, %rsi
leaq 0x10(%rsp), %r13
movb $0x0, (%r13)
leaq 0x20(%rsp), %r15
leaq 0x18(%rsp), %rbp
movq %r15, %rdi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x149b6
movq %r15, (%r13)
movq %r15, (%rbp)
movq 0x10(%r12), %r15
xorl %ebp, %ebp
cmpq 0x20(%r12), %rbp
jae 0x131cc
movq 0x10(%r14), %rdi
movq %rbp, %rsi
callq 0x134f6
movq (%rax), %rsi
movq %r13, %rdi
callq 0x14daa
incq %rbp
jmp 0x131a9
movq (%r15), %rcx
movq 0x10(%r15), %rsi
movl 0x18(%r15), %edi
movq %rsi, %rax
subq %rcx, %rax
leaq (%rdi,%rax,8), %r8
movq 0x10(%r14), %rdx
movq 0x20(%rdx), %rax
subq 0x18(%rdx), %rax
movl $0xa8, %r9d
cqto
idivq %r9
cmpq %rax, %r8
jne 0x13341
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
movq %rsi, %rax
subq %rcx, %rax
movl %edi, %edx
leaq (%rdx,%rax,8), %rax
cmpq %rax, %r12
jae 0x1326a
movq %r15, %rdi
movq %r12, %rsi
callq 0x140b0
testb %al, %al
je 0x1325a
movq 0x10(%r14), %rdi
addq $0x18, %rdi
movq %r12, %rsi
callq 0x140d2
movq %rax, %rbp
movq 0x80(%rax), %rsi
movq %r13, %rdi
callq 0x14daa
movq 0x88(%rbp), %rsi
movq %r13, %rdi
callq 0x14daa
incq %r12
movq (%r15), %rcx
movq 0x10(%r15), %rsi
movl 0x18(%r15), %edi
jmp 0x13209
xorl %r12d, %r12d
leaq 0x18(%rsp), %r13
subq %rcx, %rsi
movl %edi, %eax
leaq (%rax,%rsi,8), %rax
cmpq %rax, %r12
jae 0x132be
movq %r15, %rdi
movq %r12, %rsi
callq 0x140b0
testb %al, %al
jne 0x132ae
movq 0x10(%r14), %rdi
addq $0x18, %rdi
movq %r12, %rsi
callq 0x140d2
movq 0x80(%rax), %rsi
movq %r13, %rdi
callq 0x14dc2
incq %r12
movq (%r15), %rcx
movq 0x10(%r15), %rsi
movl 0x18(%r15), %edi
jmp 0x13272
movq 0x10(%r14), %rax
movq 0x30(%rax), %rsi
leaq 0x10(%rsp), %rdi
callq 0x14daa
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %esi, %esi
leaq 0x20(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %rsi, 0x8(%rsp)
movq 0x30(%rsp), %rax
movl 0x38(%rsp), %ecx
subq 0x20(%rsp), %rax
leaq (%rcx,%rax,8), %rax
cmpq %rax, %rsi
jae 0x13325
movq %r14, %rdi
callq 0x14ddc
testq %rdx, (%rax)
jne 0x1331b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13132
movq 0x8(%rsp), %rsi
incq %rsi
jmp 0x132e7
leaq 0x20(%rsp), %rdi
callq 0x14642
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa4b8(%rip), %rdi      # 0x1d800
leaq 0x9e6c(%rip), %rsi      # 0x1d1bb
leaq 0xa4df(%rip), %rcx      # 0x1d835
movl $0xd9, %edx
callq 0x7150
jmp 0x13379
jmp 0x13364
movq %rax, %r14
movq %rbx, %rdi
callq 0xf208
jmp 0x1337c
jmp 0x13379
jmp 0x13379
jmp 0x13379
jmp 0x13379
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x14642
movq %r14, %rdi
callq 0x7390