// File: /workspace/github_cpp_makefile_star2_O2/ridiculousfish[P]docopt_fish/docopt_fish_parse_tree.cpp
// Function: docopt_fish::parse_context_t::parse(docopt_fish::expression_t*)
bool parse(expression_t *result) {
        rstring_t token;
        bool success = false;
        // Note that options must come before trying to parse it as a list, because
        // "[options]"
        // itself looks like a list
        if (this->scan("[options]", &token)) {
            result->production = 3;
            success = this->parse(&result->options_shortcut);
        } else if (this->scan("(", &token) || this->scan("[", &token)) {
            if (!this->try_parse_unique(&result->alternation_list)) {
                error(token, error_empty_bracket_paren, "Expected an expression inside");
            }
            bool is_paren = (token[0] == '(');
            rstring_t close_token;
            if (this->scan(is_paren ? ")" : "]", &close_token)) {
                result->production = is_paren ? 1 : 2;
                success = parse(&result->opt_ellipsis);  // never fails
            } else {
                // No closing bracket or paren
                if (is_paren) {
                    error(token, error_missing_close_paren, "Missing ')' to match opening '('");
                } else {
                    error(token, error_missing_close_bracket, "Missing ']' to match opening '['");
                }
            }
        } else if (this->scan("...", &token)) {
            error(token, error_leading_ellipsis, "Ellipsis may only follow an expression");
        } else if (this->peek("|")) {
            // End of an alternation list, nothing to do
            success = false;
        } else {
            // Simple clause
            success = try_parse_unique(&result->simple_clause);
            if (success) {
                result->production = 0;
                parse(&result->opt_ellipsis);  // never fails except on error
            }
        }
        return success;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq 0xd101(%rip), %rsi      # 0x1cf5e
callq 0xfbc8
testb %al, %al
je 0xfe74
movw $0x301, 0x60(%r14)      # imm = 0x301
movb $0x1, %al
jmp 0xff73
leaq 0xd0ed(%rip), %rsi      # 0x1cf68
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xfbc8
testb %al, %al
jne 0xfea4
leaq 0xd0d9(%rip), %rsi      # 0x1cf6a
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xfbc8
testb %al, %al
je 0xff38
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0xffb8
testb %al, %al
jne 0xfec9
leaq 0xd0b1(%rip), %rcx      # 0x1cf6c
movq %rsp, %rsi
pushq $0x9
popq %rdx
movq %rbx, %rdi
callq 0xfc6c
movq %rsp, %rdi
xorl %esi, %esi
callq 0xa94e
leaq 0x20(%rsp), %rdx
andq $0x0, 0x10(%rdx)
movl %eax, %ebp
cmpl $0x28, %eax
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
leaq 0xc313(%rip), %rax      # 0x1c202
leaq 0xe38e(%rip), %rsi      # 0x1e284
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0xfbc8
testb %al, %al
je 0xff25
cmpl $0x28, %ebp
sete %al
movb $0x2, %cl
subb %al, %cl
movb %cl, 0x61(%r14)
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1000c
jmp 0xff73
cmpl $0x28, %ebp
jne 0xff5c
leaq 0xd059(%rip), %rcx      # 0x1cf8a
movq %rsp, %rsi
pushq $0x7
jmp 0xff68
leaq 0xebff(%rip), %rsi      # 0x1eb3e
movq %rsp, %rdx
movq %rbx, %rdi
callq 0xfbc8
testb %al, %al
je 0xff7c
leaq 0xd056(%rip), %rcx      # 0x1cfab
movq %rsp, %rsi
pushq $0x2
jmp 0xff68
leaq 0xcde4(%rip), %rcx      # 0x1cd47
movq %rsp, %rsi
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0xfc6c
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xcfc3(%rip), %rsi      # 0x1cf46
movq %rbx, %rdi
callq 0x10026
testb %al, %al
jne 0xff71
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1006a
testb %al, %al
je 0xff71
movb $0x0, 0x61(%r14)
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1000c
jmp 0xfe6d
nop