// File: /workspace/github_cpp_makefile_star2_O2/ridiculousfish[P]docopt_fish/docopt_fish.cpp
// Function: docopt_fish::docopt_impl::populate_from_usage(std::vector<docopt_fish::error_t, std::allocator<docopt_fish::error_t>>*)
void populate_from_usage(error_list_t *out_errors) {
        // Distinguish between normal (docopt) and exposition (e.g. description). */
        enum mode_t { mode_normal, mode_exposition } mode = mode_normal;

        // We need to parse the usage spec ranges after all of the Options
        // This is because we need the options to disambiguate some usages
        rstring_list_t usage_specs;

        rstring_t line;
        while (get_next_line(this->usage_storage, &line)) {
            // There are a couple of possibilitise for each line
            //
            // 1. It may have a header like "Usage:". If so, we want to strip that
            //    header, and optionally use it to determine the mode.
            // 2. It may be a usage spec. We can tell because the first word is plain text.
            // 3. It may be an option spec. We can tell because the first character is a dash.
            // 4. It may be a variable spec. We can tell because the first character is a <.
            // 5. It may be just whitespace or empty, and is ignored.
            //
            // Also note that a (nonempty) line indented more than the previous line is
            // considered a continuation of that line.
            rstring_t trimmed_line = line.trim_whitespace();
            const rstring_t header = find_header(trimmed_line);
            if (!header.empty()) {
                // It's a header
                // Set mode based on header, and remove header from line
                // The headers we know about are Usage, Synopsis, Options, and Arguments,
                // all case insensitive
                // Everything else is considered exposition and is ignored
                mode = mode_exposition;
                const char *const keywords[] = {"Usage", "Synopsis", "Options", "Arguments"};
                size_t keyword_count = sizeof keywords / sizeof *keywords;
                for (size_t i = 0; i < keyword_count; i++) {
                    if (header.find_case_insensitive(keywords[i]) != rstring_t::npos) {
                        mode = mode_normal;
                        break;
                    }
                }
                // Remove the header range from the trimmed line
                assert(header.length() <= trimmed_line.length());
                trimmed_line = trimmed_line.substr_from(header.length()).trim_whitespace();
            }

            // Skip exposition or empty lines
            if (mode == mode_exposition || trimmed_line.empty()) {
                continue;
            }

            // Compute the indent. Note that the header is considered part of the indent, so that:
            //
            //
            // Usage: foo
            // bar
            //
            // Here 'foo' is indented more than 'bar'.
            const size_t line_indent = compute_indent(line, trimmed_line);

            // Determine the "line group." That is, this line plus all subsequent
            // nonempty lines
            // that are indented more than this line.
            rstring_t line_group = trimmed_line;
            rstring_t all_consumed_lines = line;
            rstring_t next_line = line;
            while (get_next_line(this->usage_storage, &next_line)) {
                rstring_t trimmed_next_line = next_line.trim_whitespace();
                size_t next_line_indent = compute_indent(next_line, trimmed_next_line);
                if (trimmed_next_line.empty() || next_line_indent <= line_indent) {
                    break;
                }
                line_group = line_group.merge(next_line);
                all_consumed_lines = all_consumed_lines.merge(next_line);
            }

            rstring_t::char_t first_char = line_group.front();
            if (first_char == '-') {
                // It's an option spec
                this->shortcut_options.push_back(
                    parse_one_option_spec(line_group, &this->names_to_metadata, out_errors));

            } else if (first_char == '<') {
                // It's a variable command spec
                rstring_t variable_name = parse_variable_name(&line_group, out_errors);
                if (! variable_name.empty()) {
                    base_metadata_t<rstring_t> *md = &this->names_to_metadata[variable_name];
                    if (!md->command.empty()) {
                        append_token_error(out_errors, line_group,
                                           error_one_variable_multiple_commands,
                                           "Duplicate command for variable");
                    }
                    // remaining part of line is the command
                    md->command = line_group.trim_whitespace();;
                }
            } else if (isalnum(first_char) || first_char == '_') {
                // It's a usage spec. We will come back to this.
                usage_specs.push_back(line_group);

            } else {
                // It's an error
                append_token_error(out_errors, trimmed_line, error_unknown_leader,
                                    "Lines must start with a normal character, "
                                    "less-than sign, or dash.");
                break;
            }

            // Note the line range we consumed, for the next iteration of the loop
            line = all_consumed_lines;
        }

        // Ensure our shortcut options don't have duplicates
        uniqueize_options(&this->shortcut_options, true /* error on duplicates */, out_errors);

        // Now parse our usage_spec_ranges
        this->usages.reserve(usage_specs.size());
        for (const rstring_t &usage_spec : usage_specs) {
            usage_t usage = parse_one_usage(usage_spec, this->shortcut_options, out_errors);
            this->usages.push_back(std::move(usage));
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rsi, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0xb0(%rsp), %rax
andq $0x0, 0x10(%rax)
movaps %xmm0, (%rax)
leaq 0x18(%rdi), %rbp
leaq 0x80(%rdi), %rax
movq %rax, 0x68(%rsp)
movq %rdi, 0x60(%rsp)
leaq 0x50(%rdi), %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
leaq 0x190(%rsp), %r13
leaq 0x1b0(%rsp), %r12
leaq 0x110(%rsp), %rbx
leaq 0x1323a(%rip), %r14     # 0x1ce6c
movq %rbp, %rdi
leaq 0xb0(%rsp), %r15
movq %r15, %rsi
callq 0x8c7e
testb %al, %al
je 0xa1cf
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0xd0ea
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
andq $0x0, 0xf0(%rsp)
pushq $0x1
popq %r15
leaq -0x1(%r15), %rsi
cmpq 0x38(%rsp), %rsi
jae 0x9cb8
leaq 0x30(%rsp), %rdi
callq 0xa94e
cmpl $0x20, %eax
je 0x9c9c
cmpl $0x3a, %eax
je 0x9ca1
movl %eax, %edi
callq 0x7270
testl %eax, %eax
je 0x9cb8
incq %r15
jmp 0x9c72
leaq 0xe0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x916e
cmpq $0x0, 0xe8(%rsp)
je 0x9d42
xorl %r15d, %r15d
cmpq $0x10, %r15
je 0x9cf5
movslq (%r15,%r14), %rsi
addq %r14, %rsi
leaq 0xe0(%rsp), %rdi
callq 0xd2fa
addq $0x4, %r15
cmpq $-0x1, %rax
je 0x9cc6
movq $0x0, 0x58(%rsp)
jmp 0x9cfd
pushq $0x1
popq %rax
movq %rax, 0x58(%rsp)
movq 0xe8(%rsp), %rdx
cmpq 0x38(%rsp), %rdx
ja 0xa26b
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x91b2
movq %r12, %rdi
movq %rbx, %rsi
callq 0xd0ea
movq 0x1c0(%rsp), %rax
movq %rax, 0x40(%rsp)
movups 0x1b0(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
cmpl $0x1, 0x58(%rsp)
je 0x9c32
cmpq $0x0, 0x38(%rsp)
je 0x9c32
leaq 0xb0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x8d70
movq %rax, %r15
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movaps 0x30(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movaps 0xb0(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movq %rax, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x8c7e
testb %al, %al
je 0x9e4d
movq %r12, %rdi
movq %r13, %rsi
callq 0xd0ea
movq %r13, %rdi
movq %r12, %rsi
callq 0x8d70
cmpq %r15, %rax
jbe 0x9e4d
cmpq $0x0, 0x1b8(%rsp)
je 0x9e4d
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x8f5c
movq 0x120(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x110(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x90(%rsp), %rsi
movq %r13, %rdx
callq 0x8f5c
movq 0x120(%rsp), %rax
movq %rax, 0xa0(%rsp)
movups 0x110(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
jmp 0x9db2
leaq 0x10(%rsp), %rdi
callq 0xa922
movl %eax, %r15d
cmpl $0x3c, %eax
je 0x9f9b
cmpl $0x2d, %r15d
jne 0xa016
cmpq $0x0, 0x18(%rsp)
leaq 0x10(%rsp), %r15
je 0xa28a
movq %r15, %rdi
xorl %esi, %esi
callq 0xa94e
cmpl $0x2d, %eax
jne 0xa28a
movq %r15, %rdi
movq 0x18(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x170(%rsp)
movups %xmm0, 0x17c(%rsp)
leaq 0x12e57(%rip), %rsi     # 0x1cd3a
callq 0xd79c
cmpq %r15, %rax
cmovbq %rax, %r15
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movq %r15, %rdx
callq 0x91b2
leaq 0xc8(%rsp), %rdi
movq %r12, %rsi
callq 0xd0ea
cmpq $0x0, 0xd0(%rsp)
je 0xa057
leaq 0xc8(%rsp), %rdi
leaq 0x12e10(%rip), %rsi     # 0x1cd3d
callq 0xd2fa
cmpq $-0x1, %rax
je 0xa057
addq $0x9, %rax
leaq 0x230(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
movq %rax, %rdx
callq 0x91b2
movq %r12, %rdi
leaq 0x230(%rsp), %rsi
callq 0xd0ea
movq %r12, %rdi
leaq 0x14312(%rip), %rsi     # 0x1e284
callq 0xd79c
cmpq $-0x1, %rax
je 0xa040
leaq 0x170(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x916e
jmp 0xa057
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x796d
cmpq $0x0, 0x1b8(%rsp)
je 0xa191
movq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0xd1a4
movq %rax, %r15
cmpq $0x0, 0x8(%rax)
je 0x9fec
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0xc
popq %rdx
leaq 0x12a91(%rip), %rcx     # 0x1ca78
callq 0x7961
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0xd0ea
movq 0x120(%rsp), %rax
movq %rax, 0x10(%r15)
movups 0x110(%rsp), %xmm0
movups %xmm0, (%r15)
jmp 0xa191
movl %r15d, %edi
callq 0x7270
cmpl $0x5f, %r15d
je 0xa02c
testl %eax, %eax
je 0xa1b6
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd20a
jmp 0xa191
movq 0x8(%rsp), %rdi
movq %r12, %rsi
pushq $0xa
popq %rdx
leaq 0x12cf5(%rip), %rcx     # 0x1cd47
callq 0x7961
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x916e
leaq 0xf8(%rsp), %rdi
movq %r12, %rsi
callq 0xd0ea
cmpq $0x0, 0x100(%rsp)
je 0xa132
leaq 0xf8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0xa94e
cmpl $0x2d, %eax
jne 0xa11b
xorps %xmm0, %xmm0
movups %xmm0, 0x21c(%rsp)
movaps %xmm0, 0x210(%rsp)
movaps %xmm0, 0x200(%rsp)
movaps %xmm0, 0x1f0(%rsp)
movaps %xmm0, 0x1e0(%rsp)
movaps %xmm0, 0x1d0(%rsp)
movaps %xmm0, 0x1c0(%rsp)
movaps %xmm0, 0x1b0(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
callq 0x75fe
testb %al, %al
je 0xa132
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd734
leaq 0x230(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xd9a2
jmp 0xa079
movq 0x8(%rsp), %rdi
movq %r15, %rsi
pushq $0x5
popq %rdx
leaq 0x12c3b(%rip), %rcx     # 0x1cd68
callq 0x7961
cmpq $0x0, 0xd0(%rsp)
je 0xa184
xorl %r15d, %r15d
cmpq $0x48, %r15
je 0xa184
cmpq $0x0, 0x118(%rsp,%r15)
je 0xa17e
leaq (%rsp,%r15), %rsi
addq $0x110, %rsi            # imm = 0x110
movq 0x68(%rsp), %rdi
callq 0xd1a4
movq 0xd8(%rsp), %rcx
movq %rcx, 0x40(%rax)
movups 0xc8(%rsp), %xmm0
movups %xmm0, 0x30(%rax)
addq $0x18, %r15
jmp 0xa140
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0xd57c
movq 0xa0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movaps 0x90(%rsp), %xmm0
movaps %xmm0, 0xb0(%rsp)
jmp 0x9c32
leaq 0x128da(%rip), %rcx     # 0x1ca97
leaq 0x30(%rsp), %rsi
pushq $0xf
popq %rdx
movq 0x8(%rsp), %rdi
callq 0x7961
pushq $0x1
popq %rsi
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rdx
callq 0x8e00
movq 0x78(%rsp), %rax
subq 0x70(%rsp), %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
movq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0xd230
movq 0x70(%rsp), %rbx
movq 0x78(%rsp), %r12
leaq 0x1c8(%rsp), %r14
leaq 0x1b0(%rsp), %r15
cmpq %r12, %rbx
je 0xa24f
movq %r15, %rdi
movq %rbx, %rsi
movq 0x50(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0xf348
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0xe0f4
movq %r14, %rdi
callq 0xe282
addq $0x18, %rbx
jmp 0xa21a
leaq 0x70(%rsp), %rdi
callq 0xe480
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1279a(%rip), %rdi     # 0x1ca0c
leaq 0x11dbb(%rip), %rsi     # 0x1c034
leaq 0x127b5(%rip), %rcx     # 0x1ca35
movl $0x358, %edx            # imm = 0x358
callq 0x7150
leaq 0x12a28(%rip), %rdi     # 0x1ccb9
leaq 0x11d9c(%rip), %rsi     # 0x1c034
leaq 0x12a3a(%rip), %rcx     # 0x1ccd9
movl $0x108, %edx            # imm = 0x108
callq 0x7150
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
movq %rax, %rbx
movq %r14, %rdi
callq 0xe282
jmp 0xa2d9
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
jmp 0xa2d6
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xe480
movq %rbx, %rdi
callq 0x7390
nop