// File: /workspace/github_cpp_makefile_star2_O3/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 0x114e5(%rip), %rax     # 0x20e74
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 0xfe50
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0xfb3d
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 0x10de8
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 0x10d96
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xfa66
movl $0x18, %esi
callq 0x6200
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xfa83
movl $0x18, %esi
callq 0x6200
movq $0x0, 0x8(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xfa9f
movl $0x98, %esi
callq 0x6200
movq %r12, %rdi
movq %r13, %rsi
callq 0xff60
leaq 0x40(%rsp), %rdi
callq 0xe8be
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0xfac6
movq %r13, %rdi
callq 0xe8f2
testb %bpl, %bpl
je 0xfb1d
xorps %xmm0, %xmm0
movups %xmm0, 0x69(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movw $0x301, 0x80(%rsp)      # imm = 0x301
movq %r12, %rdi
movq %r13, %rsi
callq 0x1136a
leaq 0x40(%rsp), %rdi
callq 0xe8be
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0xfb1d
movq %r13, %rdi
callq 0xe8f2
movq %rbx, %rdi
movq %r12, %rsi
callq 0xffbc
movq %r12, %rdi
callq 0xe85e
addq $0x18, %r15
cmpq %r14, %r15
jne 0xf9e2
testb %bpl, %bpl
je 0xfba2
xorps %xmm0, %xmm0
leaq 0x20(%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
movq %rsp, %rdi
callq 0xff60
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xffbc
movq %rsp, %rdi
callq 0xe85e
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0xe8be
movq -0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xfba2
leaq 0x20(%rsp), %rdi
callq 0xe8f2
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 0xe85e
jmp 0xfbfe
jmp 0xfbfb
movq %rax, %r14
jmp 0xfc1a
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0xff96
jmp 0xfc0d
movq %rax, %r14
jmp 0xfbf1
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0xff96
movq %rsp, %rdi
callq 0x10b12
jmp 0xfc1a
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0xff96
jmp 0xfc1a
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0xe85e
movq %rbx, %rdi
callq 0xe816
movq %r14, %rdi
callq 0x6360