// File: /workspace/github_c_makefile_star2_O1/jaroslov[P]docoptc/./docopt.h
// Function: docopt_parse_options
static int docopt_parse_options(struct docopt_parse_state* dS)
{
    if (dS->entries->error) return 1;
    struct docopt_str optstmt   = { 0 };
    struct docopt_entry option  = { };
    int which_first             = 0;
    char unarged_shorts[]       = DOCOPT_RE_ALL_SHORTS_CHARS;
    char re_arged_shorts[256]   = { 0 };
    char short_name[3]          = "- ";
    struct docopt_str sname     = { &short_name[0], &short_name[2] };
    int options_x               = 0;
    int options_s               = 0;
    int sterm                   = 0;
    int lterm                   = 0;

    if (docopt_get_section(dS, &dS->re_option_section_start, &dS->re_option_section_start, dS->usage_section.lst, &dS->option_section, 3, 0)) return 0;
    dS->option_section.lst  = dS->entries->docstr.lst;
    optstmt.fst                 = dS->option_section.fst;

    options_x                   = docopt_new_term(dS, DOCOPT_TYPE_OPTION_SECTION);
    DO_TM(options_x)->repeat    = 1;
    DO_TM(options_x)->optional  = 1;
    while (!docopt_get_section(dS, &dS->re_option_statement_start, &dS->re_option_statement_start, optstmt.fst, &optstmt, 3, 0))
    {
        fprintf(dS->log, "%s\n", "Parsing Option Statement.");
        sterm           = -1;
        lterm           = -1;
        which_first     = 0;
        memset(&option, 0x0, sizeof(option));
        if (optstmt.fst >= dS->option_section.lst) break;
        docopt_eat_ws(&optstmt);
        options_s   = docopt_new_term(dS, DOCOPT_TYPE_OPTION_STATEMENT);
        for (int X = 0; X < 2; ++X)
        {
            if ((which_first != 1) && regexec(&dS->re_optshort, optstmt.fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0) == 0)
            {
                sterm       = docopt_new_term(dS, DOCOPT_TYPE_SHORT);
                DO_TM(sterm)->length = 1;
                which_first = 1;
                sprintf(option.short_name, "-%c", optstmt.fst[1]);
                if (dS->docopt_pmatches[4].rm_so >= 0)
                {
                    option.command.fst  = optstmt.fst + dS->docopt_pmatches[4].rm_so;
                    option.command.lst  = optstmt.fst + dS->docopt_pmatches[4].rm_eo;
                }
            }
            else if ((which_first != 2) && regexec(&dS->re_long, optstmt.fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0) == 0)
            {
                which_first = 2;
                lterm           = docopt_new_term(dS, DOCOPT_TYPE_LONG);
                DO_TM(lterm)->length = 1;
                option.name.fst = optstmt.fst;
                option.name.lst = optstmt.fst + dS->docopt_pmatches[2].rm_eo;
                if (dS->docopt_pmatches[4].rm_so >= 0)
                {
                    option.command.fst  = optstmt.fst + dS->docopt_pmatches[5].rm_so;
                    option.command.lst  = optstmt.fst + dS->docopt_pmatches[5].rm_eo;
                }
            }
            if (X == 0) optstmt.fst += dS->docopt_pmatches[0].rm_eo + 1; docopt_eat_ws(&optstmt);
        }
        if (which_first == 0)
        {
            dS->entries->error  = DOCOPT_BAD_DEFAULTS;
            return 1;
        }
        if (regexec(&dS->re_default, optstmt.fst, DOCOPT_NUM_PMATCHES, &dS->docopt_pmatches[0], 0)) goto docoptAddOption;
        if ((optstmt.fst + dS->docopt_pmatches[0].rm_eo) > optstmt.lst) goto docoptAddOption;
        option.defvalue.fst     = optstmt.fst + dS->docopt_pmatches[2].rm_so;
        option.defvalue.lst     = optstmt.fst + dS->docopt_pmatches[2].rm_eo;
docoptAddOption:
        if (lterm >= 0) DO_TM(lterm)->entry = docopt_entries_insert_entry(dS->entries, &option);
        if (sterm >= 0) DO_TM(sterm)->entry = docopt_entries_insert_entry(dS->entries, &option);
        DO_TM(options_s)->length = dS->curterm - options_s;
        fprintf(dS->log, "%s\n", "... Done Parsing Option Statement.");
    }
    DO_TM(options_x)->length = dS->curterm - options_x;
    for (int i = 0, idx = 0, jdx = 0, entry; i < strlen(unarged_shorts); ++i)
    {
        short_name[1]   = unarged_shorts[i];
        if (((entry = docopt_entries_get_entry(dS->entries, &sname)) < 0) ||
            !docopt_str_len(&docopt_fetch_entry(dS->entries, entry)->command))
            dS->unarged_shorts[idx++]   = unarged_shorts[i];
        else
            dS->arged_shorts[jdx++]     = short_name[1];
    }
    if (strlen(dS->arged_shorts))
    {
        fprintf(dS->log, "Setting up arged shorts: %s\n", dS->arged_shorts);
        sprintf(&re_arged_shorts[0], "^" DOCOPT_RE_ARGED_SHORTS, dS->unarged_shorts, dS->arged_shorts);
        if (regcomp(&dS->re_arged_shorts, re_arged_shorts, REG_EXTENDED))
        {
            dS->entries->error  = DOCOPT_BAD_ARGED_SHORTS;
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq 0x8(%rdi), %rax
movl $0x1, %r14d
cmpl $0x0, (%rax)
jne 0x7fff
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x60(%rbp)
leaq -0x1e0(%rbp), %rdi
xorl %r14d, %r14d
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x70a0
leaq -0x2a(%rbp), %rax
movb $0x0, (%rax)
movw $0x202d, -0x2(%rax)     # imm = 0x202D
leaq -0x2c(%rbp), %rcx
movq %rcx, -0xd8(%rbp)
movq %rax, -0xd0(%rbp)
leaq 0x480(%rbx), %rdx
movq 0x30(%rbx), %rcx
leaq 0x38(%rbx), %r8
movq %rbx, %rdi
movq %rdx, %rsi
movl $0x3, %r9d
callq 0x7987
testl %eax, %eax
jne 0x7fff
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
movq 0x10(%rax), %rax
movq %rax, 0x40(%rbx)
leaq -0x50(%rbp), %r14
movq %rcx, (%r14)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8be7
movq 0x20(%rbx), %rcx
movslq %eax, %rdx
orl $0x40, 0x4(%rcx,%rdx,8)
movq 0x20(%rbx), %rax
movq %rdx, -0x98(%rbp)
orl $0x20, 0x4(%rax,%rdx,8)
leaq 0x4c0(%rbx), %rdx
movq (%r14), %rcx
movq %rbx, %rdi
movq %rdx, %rsi
movq %rdx, -0xa8(%rbp)
movq %r14, %r8
movl $0x3, %r9d
callq 0x7987
testl %eax, %eax
je 0x7c52
movl 0x1c(%rbx), %eax
movq -0x98(%rbp), %rsi
subl %esi, %eax
movq 0x20(%rbx), %rcx
shll $0x7, %eax
movl $0xf800007f, %edx       # imm = 0xF800007F
andl 0x4(%rcx,%rsi,8), %edx
andl $0x7ffff80, %eax        # imm = 0x7FFFF80
orl %eax, %edx
movl %edx, 0x4(%rcx,%rsi,8)
xorl %r12d, %r12d
movq $0x0, -0x38(%rbp)
xorl %r13d, %r13d
leaq 0x4873(%rip), %rax      # 0xc3f0
movb (%r12,%rax), %r14b
movb %r14b, -0x2b(%rbp)
movq 0x8(%rbx), %r15
movq %r15, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x8701
testl %eax, %eax
js 0x7bc4
movq 0x28(%r15), %rcx
movl %eax, %eax
imulq $0x38, %rax, %rax
movl 0x20(%rcx,%rax), %edx
cmpl 0x18(%rcx,%rax), %edx
je 0x7bc4
movq -0x38(%rbp), %rcx
movl %ecx, %eax
leal 0x1(%rcx), %edx
movl $0x58, %ecx
movq %rdx, -0x38(%rbp)
jmp 0x7bd3
movl %r13d, %eax
leal 0x1(%r13), %edx
movl $0xd8, %ecx
movl %edx, %r13d
addq %rbx, %rcx
cltq
movb %r14b, (%rax,%rcx)
incq %r12
cmpq $0x3a, %r12
jne 0x7b76
cmpb $0x0, 0x58(%rbx)
je 0x7fe9
leaq 0x58(%rbx), %r15
movq (%rbx), %rdi
leaq 0x4520(%rip), %rsi      # 0xc11d
xorl %r14d, %r14d
movq %r15, %rdx
xorl %eax, %eax
callq 0x70f0
leaq 0xd8(%rbx), %rdx
leaq 0x4522(%rip), %rsi      # 0xc13a
leaq -0x1e0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x7130
leaq 0x540(%rbx), %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x70b0
movl $0x4, %ecx
testl %eax, %eax
jne 0x7ff3
jmp 0x7fff
leaq 0x2c0(%rbx), %rax
movq %rax, -0xc0(%rbp)
leaq 0x188(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x1ac(%rbx), %rax
movq %rax, -0xb0(%rbp)
leaq 0x300(%rbx), %rax
movq %rax, -0xc8(%rbp)
leaq 0x1b4(%rbx), %rax
movq %rax, -0xb8(%rbp)
leaq 0x280(%rbx), %rax
movq %rax, -0xa0(%rbp)
leaq 0x41b2(%rip), %r14      # 0xbe5c
movq (%rbx), %rdi
movq %r14, %rsi
leaq 0x444c(%rip), %rdx      # 0xc103
xorl %eax, %eax
callq 0x70f0
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x50(%rbp), %r14
cmpq 0x40(%rbx), %r14
jae 0x7b41
movq -0x48(%rbp), %r13
cmpq %r13, %r14
jae 0x7d2a
callq 0x7150
movq (%rax), %rax
movsbq (%r14), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x7d08
movq -0x50(%rbp), %r14
jmp 0x7d26
incq %r14
cmpq %r13, %r14
je 0x7d23
movsbq (%r14), %rcx
incq %r14
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x7d0b
decq %r14
jmp 0x7d26
movq %r13, %r14
movq %r14, -0x50(%rbp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8be7
movl %eax, -0x54(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movq -0x50(%rbp), %r14
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
xorl %r12d, %r12d
cmpl $0x1, %r12d
je 0x7d85
movl $0x7, %edx
movq -0xc0(%rbp), %rdi
movq %r14, %rsi
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
callq 0x7100
testl %eax, %eax
je 0x7e13
cmpl $0x2, %r12d
je 0x7e0b
movl $0x7, %edx
movq -0xc8(%rbp), %rdi
movq %r14, %rsi
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
callq 0x7100
testl %eax, %eax
jne 0x7e80
movq %rbx, %rdi
movl $0x5, %esi
callq 0x8be7
movq 0x20(%rbx), %rdi
movl %eax, -0x40(%rbp)
movslq %eax, %rcx
movl 0x4(%rdi,%rcx,8), %edx
movl $0xf800007f, %esi       # imm = 0xF800007F
andl %esi, %edx
orl $0x80, %edx
movl %edx, 0x4(%rdi,%rcx,8)
movq %r14, -0x90(%rbp)
movslq 0x19c(%rbx), %rax
addq %r14, %rax
movq %rax, -0x88(%rbp)
cmpl $0x0, 0x1a8(%rbx)
js 0x7e0b
movslq 0x1b0(%rbx), %rax
movl $0x2, %r12d
movq -0xb8(%rbp), %rcx
jmp 0x7e6f
movl $0x2, %r12d
jmp 0x7e80
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8be7
movq 0x20(%rbx), %rdi
movl %eax, -0x3c(%rbp)
movslq %eax, %rcx
movl 0x4(%rdi,%rcx,8), %edx
movl $0xf800007f, %esi       # imm = 0xF800007F
andl %esi, %edx
orl $0x80, %edx
movl %edx, 0x4(%rdi,%rcx,8)
movsbl 0x1(%r14), %edx
leaq -0x80(%rbp), %rdi
leaq 0x42a7(%rip), %rsi      # 0xc0f6
xorl %eax, %eax
callq 0x7130
movslq 0x1a8(%rbx), %rax
movl $0x1, %r12d
testq %rax, %rax
js 0x7e80
movq -0xb0(%rbp), %rcx
addq %r14, %rax
movq %rax, -0x78(%rbp)
movslq (%rcx), %rax
addq %r14, %rax
movq %rax, -0x70(%rbp)
testl %r15d, %r15d
jne 0x7e92
movslq 0x18c(%rbx), %rax
addq %rax, %r14
incq %r14
cmpq %r13, %r14
jae 0x7ec8
callq 0x7150
movq (%rax), %rax
movsbq (%r14), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x7ec8
incq %r14
cmpq %r13, %r14
je 0x7ec5
movsbq (%r14), %rcx
incq %r14
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x7ead
decq %r14
jmp 0x7ec8
movq %r13, %r14
leal 0x1(%r15), %eax
testl %r15d, %r15d
movl %eax, %r15d
je 0x7d52
movq %r14, -0x50(%rbp)
testl %r12d, %r12d
je 0x7fee
movq -0x50(%rbp), %r14
movl $0x7, %edx
movq -0xa0(%rbp), %rdi
movq %r14, %rsi
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
callq 0x7100
testl %eax, %eax
jne 0x7f33
movslq 0x18c(%rbx), %rax
addq %r14, %rax
cmpq %r13, %rax
ja 0x7f33
movslq 0x198(%rbx), %rax
addq %r14, %rax
movq %rax, -0x68(%rbp)
movslq 0x19c(%rbx), %rax
addq %r14, %rax
movq %rax, -0x60(%rbp)
movl -0x40(%rbp), %r12d
testl %r12d, %r12d
leaq 0x3f1b(%rip), %r14      # 0xbe5c
movl -0x3c(%rbp), %r15d
js 0x7f61
movq 0x8(%rbx), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8c95
movq 0x20(%rbx), %rcx
movl %r12d, %edx
movl %eax, (%rcx,%rdx,8)
testl %r15d, %r15d
js 0x7f80
movq 0x8(%rbx), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8c95
movq 0x20(%rbx), %rcx
movl %r15d, %edx
movl %eax, (%rcx,%rdx,8)
movl 0x1c(%rbx), %eax
movl -0x54(%rbp), %edx
subl %edx, %eax
movq 0x20(%rbx), %rcx
movslq %edx, %rdx
shll $0x7, %eax
andl $0x7ffff80, %eax        # imm = 0x7FFFF80
movl 0x4(%rcx,%rdx,8), %esi
movl $0xf800007f, %edi       # imm = 0xF800007F
andl %edi, %esi
orl %eax, %esi
movl %esi, 0x4(%rcx,%rdx,8)
movq (%rbx), %rdi
movq %r14, %rsi
leaq 0x4145(%rip), %rdx      # 0xc0fa
xorl %eax, %eax
callq 0x70f0
movq -0x50(%rbp), %rcx
movq %rbx, %rdi
movq -0xa8(%rbp), %rdx
movq %rdx, %rsi
leaq -0x50(%rbp), %r8
movl $0x3, %r9d
callq 0x7987
testl %eax, %eax
je 0x7caa
jmp 0x7b41
xorl %r14d, %r14d
jmp 0x7fff
movl $0x1, %ecx
movq 0x8(%rbx), %rax
movl %ecx, (%rax)
movl $0x1, %r14d
movl %r14d, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq