// File: /workspace/github_cpp_makefile_star2_O2/ridiculousfish[P]docopt_fish/docopt_fish_parse_tree.cpp
// Function: docopt_fish::usage_t::build_from_variables(std::vector<docopt_fish::rstring_t, std::allocator<docopt_fish::rstring_t>> const&, bool)
usage_t usage_t::build_from_variables(const std::vector<rstring_t> &variables,
                                      bool include_options_shortcut) {
    // Note this is safe because string literals are immortal
    usage_t usage;
    usage.prog_name = CONST_RSTRING("command");

    vector<expression_list_t> &alternations = usage.alternation_list.alternations;
    alternations.reserve(variables.size() + (include_options_shortcut ? 1 : 0));

    // Helper to build an options expression_t
    auto make_options_expr = []() -> expression_t {
        expression_t options_expr;
        options_expr.production = 3;
        options_expr.options_shortcut.present = true;
        return options_expr;
    };

    // Helper to build a variable expression
    auto make_variable_expr = [](const rstring_t &var_str) -> expression_t {
        simple_clause_t sclause;
        emplace_unique(&sclause.variable, variable_clause_t{var_str});
        expression_t expr;
        expr.production = 0;
        emplace_unique(&expr.simple_clause, std::move(sclause));
        return expr;
    };

    // Set variable clauses
    for (const rstring_t &var : variables) {
        expression_list_t exprs(make_variable_expr(var));
        if (include_options_shortcut) {
            exprs.expressions.push_back(make_options_expr());
        }
        alternations.push_back(std::move(exprs));
    }

    // Also include just an options clause
    if (include_options_shortcut) {
        alternations.emplace_back(expression_list_t(make_options_expr()));
    }
    return usage;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edx, %ebp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movq $0x7, 0x8(%rdi)
leaq 0xda03(%rip), %rax      # 0x1cec4
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
movq %rdi, 0x28(%rsp)
addq $0x18, %rdi
pushq $0x18
popq %rcx
cqto
idivq %rcx
movl %ebp, %esi
addq %rax, %rsi
movq %rdi, 0x8(%rsp)
callq 0xf884
movq (%rbx), %r15
movq 0x8(%rbx), %r12
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %r14
leaq 0xc0(%rsp), %rbx
cmpq %r12, %r15
je 0xf5f7
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq 0x10(%r15), %rax
movq %rax, 0xb0(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0xa0(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x102ca
andw $0x0, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movups %xmm0, 0x79(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x1018d
movq %r14, %rdi
callq 0xe3e4
movq %rbx, %rdi
movq %r13, %rsi
callq 0xf926
movq %r13, %rdi
callq 0xe35e
testb %bpl, %bpl
je 0xf5d9
xorps %xmm0, %xmm0
movups %xmm0, 0x79(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movw $0x301, 0x90(%rsp)      # imm = 0x301
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1089e
movq %r13, %rdi
callq 0xe35e
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xf958
movq %rbx, %rdi
callq 0xe2f0
addq $0x18, %r15
jmp 0xf505
testb %bpl, %bpl
je 0xf64e
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movups %xmm0, 0x49(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movw $0x301, 0x60(%rsi)      # imm = 0x301
leaq 0x10(%rsp), %rdi
callq 0xf926
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xf958
leaq 0x10(%rsp), %rdi
callq 0xe2f0
leaq 0x30(%rsp), %rdi
callq 0xe35e
movq 0x28(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xe2f0
jmp 0xf69c
jmp 0xf699
movq %rax, %rbx
jmp 0xf6c7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe35e
jmp 0xf6ab
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe35e
jmp 0xf6bd
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe35e
jmp 0xf6c7
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0xe2f0
jmp 0xf6c7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xe3e4
movq 0x8(%rsp), %rdi
callq 0xe282
movq %rbx, %rdi
callq 0x7390