// File: /workspace/github_c_makefile_star2_O1/jaroslov[P]docoptc/./docopt.h
// Function: docopt_parse_atom
int docopt_parse_atom(struct docopt_parse_state* dS, struct docopt_str* usestmt)
{
    if (dS->entries->error) return 0;
    struct docopt_str olduse    = *usestmt;
    struct docopt_entry entry   = { };
    int hterm                   = -1;
    char seqend                 = 0;

    if (usestmt->fst >= usestmt->lst) goto docoptFail;
    docopt_eat_ws(usestmt);

    if (strncmp(dS->pname.fst, usestmt->fst, docopt_str_len(&dS->pname)) == 0)
    {
        hterm           = docopt_new_term(dS, DOCOPT_TYPE_PNAME);
        usestmt->fst    += docopt_str_len(&dS->pname);
        entry.name      = dS->pname;
        DO_TM(hterm)->entry = docopt_entries_insert_entry(dS->entries, &entry);
    }
    else if (!regexec(&dS->re_optref, usestmt->fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0))
    {
        hterm           = docopt_new_term(dS, DOCOPT_TYPE_OPTREF);
        usestmt->fst    += dS->docopt_pmatches[0].rm_eo;
    }
    else if (strchr("[(", usestmt->fst[0]) != 0)
    {
        hterm           = dS->curterm;
        ++usestmt->fst;
        dS->optional    = (olduse.fst[0] == '[');
        seqend          = (olduse.fst[0] == '[') ? ']' : ')';
        hterm           = dS->curarg;
        if (!docopt_parse_expr(dS, usestmt)) goto docoptFail;
        DO_TM(hterm)->optional = dS->optional;
        hterm           = -1;
        docopt_eat_ws(usestmt);
        if (seqend != usestmt->fst[0]) goto docoptFail;
        ++usestmt->fst;
        dS->optional    = 0;
    }
    else if (!regexec(&dS->re_long, usestmt->fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0))
    {
        hterm           = docopt_new_term(dS, DOCOPT_TYPE_LONG);
        entry.name.fst  = usestmt->fst;
        entry.name.lst  = usestmt->fst + dS->docopt_pmatches[2].rm_eo;
        if (dS->docopt_pmatches[4].rm_so >= 0)
        {
            entry.command.fst  = usestmt->fst + dS->docopt_pmatches[5].rm_so;
            entry.command.lst  = usestmt->fst + dS->docopt_pmatches[5].rm_eo;
        }
        DO_TM(hterm)->entry = docopt_entries_insert_entry(dS->entries, &entry);
        usestmt->fst    += dS->docopt_pmatches[0].rm_eo;
    }
    else if ((dS->arged_shorts[0] && !regexec(&dS->re_arged_shorts, usestmt->fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0)) ||
        !regexec(&dS->re_naked_shorts, usestmt->fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0))
    {
        for (int h = (int)dS->docopt_pmatches[3].rm_so, he = (int)dS->docopt_pmatches[3].rm_eo; h < he; ++h)
        {
            sprintf(&entry.short_name[0], "-%c", usestmt->fst[h]);
            hterm           = docopt_new_term(dS, DOCOPT_TYPE_SHORT);
            DO_TM(hterm)->length = 1;
            if (((h+1) == dS->docopt_pmatches[3].rm_eo) && (dS->docopt_pmatches[5].rm_so > 0))
            {
                entry.command.fst   = usestmt->fst + dS->docopt_pmatches[5].rm_so;
                entry.command.lst   = usestmt->fst + dS->docopt_pmatches[5].rm_eo;
            }
            DO_TM(hterm)->entry = docopt_entries_insert_entry(dS->entries, &entry);
        }
        usestmt->fst    += dS->docopt_pmatches[0].rm_eo;
    }
    else if (!regexec(&dS->re_argument, usestmt->fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0))
    {
        hterm           = docopt_new_term(dS, DOCOPT_TYPE_ARGUMENT);
        entry.name.fst  = usestmt->fst;
        entry.name.lst  = usestmt->fst + dS->docopt_pmatches[1].rm_eo;
        DO_TM(hterm)->entry = docopt_entries_insert_entry(dS->entries, &entry);
        usestmt->fst    += dS->docopt_pmatches[0].rm_eo;
    }
    else
    {
        hterm           = docopt_new_term(dS, DOCOPT_TYPE_COMMAND);
        docopt_parse_command(dS, usestmt);
        if (olduse.fst == usestmt->fst) goto docoptFail;
        entry.name.fst  = olduse.fst;
        entry.name.lst  = usestmt->fst;
        DO_TM(hterm)->entry = docopt_entries_insert_entry(dS->entries, &entry);
    }

    if (olduse.fst == usestmt->fst) goto docoptFail;
    if (hterm >= 0)
    {
        DO_TM(hterm)->length    = dS->curterm - hterm;
    }
    return hterm;
docoptFail:
    *usestmt        = olduse;
    dS->curterm     = hterm;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq 0x8(%rdi), %rax
xorl %r15d, %r15d
cmpl $0x0, (%rax)
jne 0x9489
movq %rsi, %r12
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movq $0x0, -0x50(%rbp)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpq %rcx, %r14
jae 0x9479
movq %rcx, -0x30(%rbp)
movq %r12, %rdi
callq 0x8c53
movq 0x48(%rbx), %rdi
movq (%r12), %r13
movl 0x50(%rbx), %edx
subl %edi, %edx
movq %r13, %rsi
callq 0x7040
testl %eax, %eax
je 0x9182
leaq 0x580(%rbx), %rdi
leaq 0x188(%rbx), %rcx
movl $0x7, %edx
movq %r13, %rsi
movq %rcx, -0x38(%rbp)
xorl %r8d, %r8d
callq 0x7100
testl %eax, %eax
je 0x91c9
movq (%r12), %r13
movsbl (%r13), %esi
leaq 0x316e(%rip), %rdi      # 0xc237
movl $0x3, %edx
callq 0x70c0
testq %rax, %rax
je 0x91de
incq %r13
movq %r13, (%r12)
xorl %eax, %eax
cmpb $0x5b, (%r14)
sete %al
movl %eax, 0x160(%rbx)
movq %r14, -0x40(%rbp)
movb (%r14), %r14b
movq %r12, %r13
movl 0x168(%rbx), %r12d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8df4
testl %eax, %eax
je 0x92a7
movslq %r12d, %rax
cmpb $0x5b, %r14b
movl $0x5d, %ecx
movl $0x29, %r14d
cmovel %ecx, %r14d
movl 0x160(%rbx), %ecx
movq 0x20(%rbx), %rdx
movl 0x4(%rdx,%rax,8), %esi
shll $0x5, %ecx
andl $0x20, %ecx
andl $-0x21, %esi
orl %ecx, %esi
movl %esi, 0x4(%rdx,%rax,8)
movq %r13, %rdi
callq 0x8c53
movq (%r13), %rax
movsbl (%rax), %ecx
cmpl %ecx, %r14d
movq %r13, %r12
movq -0x40(%rbp), %r14
movq -0x30(%rbp), %rcx
jne 0x9479
incq %rax
movq %rax, (%r12)
movl $0x0, 0x160(%rbx)
jmp 0x9448
movq %r14, %r13
leaq 0x48(%rbx), %r14
movq %rbx, %rdi
movl $0x8, %esi
callq 0x8be7
movl 0x50(%rbx), %ecx
subl 0x48(%rbx), %ecx
movl %eax, %r15d
addq %rcx, (%r12)
movups (%r14), %xmm0
movq %r13, %r14
leaq -0x80(%rbp), %rsi
movaps %xmm0, (%rsi)
movq 0x8(%rbx), %rdi
callq 0x8c95
movq 0x20(%rbx), %rcx
movslq %r15d, %rdx
movl %eax, (%rcx,%rdx,8)
jmp 0x9444
movq %rbx, %rdi
movl $0x7, %esi
callq 0x8be7
movl %eax, %r15d
jmp 0x9439
leaq 0x300(%rbx), %rdi
movl $0x7, %edx
movq %r13, %rsi
movq -0x38(%rbp), %r15
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x7100
testl %eax, %eax
je 0x92ba
cmpb $0x0, 0x58(%rbx)
je 0x922d
leaq 0x540(%rbx), %rdi
movq (%r12), %rsi
movl $0x7, %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x7100
testl %eax, %eax
je 0x9312
leaq 0x500(%rbx), %rdi
movq (%r12), %rsi
movl $0x7, %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x7100
testl %eax, %eax
je 0x9312
leaq 0x240(%rbx), %rdi
movq (%r12), %rsi
movl $0x7, %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x7100
movq %rbx, %rdi
testl %eax, %eax
je 0x9400
movl $0x9, %esi
callq 0x8be7
movl %eax, %r15d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x949b
movq (%r12), %rax
cmpq %rax, %r14
je 0x92b1
leaq -0x80(%rbp), %rsi
movq %r14, (%rsi)
movq %rax, 0x8(%rsi)
jmp 0x91b1
movl %r12d, %r15d
movq %r13, %r12
movq -0x40(%rbp), %r14
movq -0x30(%rbp), %rcx
jmp 0x9479
movq %rbx, %rdi
movl $0x5, %esi
callq 0x8be7
movl %eax, %r15d
movq (%r12), %rax
movq %rax, -0x80(%rbp)
movslq 0x19c(%rbx), %rcx
addq %rax, %rcx
movq %rcx, -0x78(%rbp)
cmpl $0x0, 0x1a8(%rbx)
js 0x9305
movslq 0x1b0(%rbx), %rcx
addq %rax, %rcx
movq %rcx, -0x68(%rbp)
movslq 0x1b4(%rbx), %rcx
addq %rax, %rcx
movq %rcx, -0x60(%rbp)
movq 0x8(%rbx), %rdi
leaq -0x80(%rbp), %rsi
jmp 0x942a
movslq 0x1a0(%rbx), %r13
movl 0x1a4(%rbx), %edx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl %edx, %r13d
jge 0x9439
movq %r14, -0x40(%rbp)
movq %r12, -0x38(%rbp)
negl %edx
leal 0x1(%r13), %r12d
movq %rdx, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movsbl (%rax,%r13), %edx
leaq -0x70(%rbp), %rdi
leaq 0x2d9c(%rip), %rsi      # 0xc0f6
xorl %eax, %eax
callq 0x7130
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8be7
movl %eax, %r15d
movq 0x20(%rbx), %rax
movslq %r15d, %r14
movl 0x4(%rax,%r14,8), %ecx
movl $0xf800007f, %edx       # imm = 0xF800007F
andl %edx, %ecx
orl $0x80, %ecx
movl %ecx, 0x4(%rax,%r14,8)
cmpl 0x1a4(%rbx), %r12d
jne 0x93c0
movslq 0x1b0(%rbx), %rax
testq %rax, %rax
jle 0x93c0
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movslq 0x1b4(%rbx), %rax
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq 0x8(%rbx), %rdi
leaq -0x80(%rbp), %rsi
callq 0x8c95
movq 0x20(%rbx), %rcx
movl %eax, (%rcx,%r14,8)
movq -0x88(%rbp), %rdx
leal (%rdx,%r12), %eax
incl %eax
movl %r12d, %ecx
incl %ecx
incq %r13
movl %ecx, %r12d
cmpl $0x1, %eax
jne 0x9343
movq -0x38(%rbp), %r12
movq -0x40(%rbp), %r14
jmp 0x9439
movl $0xa, %esi
callq 0x8be7
movl %eax, %r15d
movq (%r12), %rax
leaq -0x80(%rbp), %rsi
movq %rax, (%rsi)
movslq 0x194(%rbx), %rcx
addq %rax, %rcx
movq %rcx, 0x8(%rsi)
movq 0x8(%rbx), %rdi
callq 0x8c95
movq 0x20(%rbx), %rcx
movslq %r15d, %rdx
movl %eax, (%rcx,%rdx,8)
movslq 0x18c(%rbx), %rax
addq %rax, (%r12)
movq -0x30(%rbp), %rcx
cmpq (%r12), %r14
je 0x9479
testl %r15d, %r15d
js 0x9489
movl 0x1c(%rbx), %eax
subl %r15d, %eax
movq 0x20(%rbx), %rcx
movl %r15d, %edx
shll $0x7, %eax
andl $0x7ffff80, %eax        # imm = 0x7FFFF80
movl $0xf800007f, %esi       # imm = 0xF800007F
andl 0x4(%rcx,%rdx,8), %esi
orl %eax, %esi
movl %esi, 0x4(%rcx,%rdx,8)
jmp 0x9489
movq %r14, (%r12)
movq %rcx, 0x8(%r12)
movl %r15d, 0x1c(%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq