// File: /workspace/github_cpp_makefile_star2_O1/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 $0xc8, %rsp
movl %edx, %ebp
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movq $0x7, 0x8(%rdi)
leaq 0x12515(%rip), %rax     # 0x22ec4
movq %rax, 0x10(%rdi)
movq %rdi, 0x88(%rsp)
leaq 0x18(%rdi), %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movl %edx, %esi
addq %rcx, %rsi
movq %rbx, %rdi
callq 0x10e80
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x10b65
leaq 0x20(%rsp), %r13
leaq 0xb0(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%r15), %rax
movq %rax, 0xa0(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x90(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x11e3d
movw $0x0, 0x80(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movups %xmm0, 0x69(%rsp)
movq %r13, %rdi
movq %rsp, %rsi
callq 0x11de4
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10a86
movl $0x18, %esi
callq 0x7200
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x10aa3
movl $0x18, %esi
callq 0x7200
movq $0x0, 0x8(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x10abf
movl $0x98, %esi
callq 0x7200
movq %r12, %rdi
movq %r13, %rsi
callq 0x10f8e
leaq 0x40(%rsp), %rdi
callq 0xf930
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x10ae6
movq %r13, %rdi
callq 0xf964
testb %bpl, %bpl
je 0x10b45
movw $0x300, 0x80(%rsp)      # imm = 0x300
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movups %xmm0, 0x69(%rsp)
movb $0x1, 0x80(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x123ea
leaq 0x40(%rsp), %rdi
callq 0xf930
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x10b45
movq %r13, %rdi
callq 0xf964
movq %rbx, %rdi
movq %r12, %rsi
callq 0x10fea
movq %r12, %rdi
callq 0xf8d6
addq $0x18, %r15
cmpq %r14, %r15
jne 0x10a02
testb %bpl, %bpl
je 0x10bce
leaq 0x20(%rsp), %rsi
movw $0x300, 0x60(%rsi)      # imm = 0x300
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movups %xmm0, 0x49(%rsi)
movb $0x1, 0x60(%rsi)
movq %rsp, %rdi
callq 0x10f8e
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x10fea
movq %rsp, %rdi
callq 0xf8d6
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0xf930
movq -0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x10bce
leaq 0x20(%rsp), %rdi
callq 0xf964
movq 0x88(%rsp), %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0xf8d6
jmp 0x10c2a
jmp 0x10c27
movq %rax, %r14
jmp 0x10c46
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x10fc4
jmp 0x10c39
movq %rax, %r14
jmp 0x10c1d
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x10fc4
movq %rsp, %rdi
callq 0x11b60
jmp 0x10c46
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x10fc4
jmp 0x10c46
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0xf8d6
movq %rbx, %rdi
callq 0xf894
movq %r14, %rdi
callq 0x7360