// File: /workspace/github_c_makefile_star2_O3/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, %r12d
cmpl $0x0, (%rax)
jne 0x7fb4
movq %rdi, %rbx
xorl %r12d, %r12d
movq %r12, -0x58(%rbp)
movq %r12, -0x70(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
leaq -0x1e0(%rbp), %rdi
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 0x7937
testl %eax, %eax
jne 0x7fb4
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %r14
movq 0x10(%rax), %rax
movq %rax, 0x40(%rbx)
leaq -0x60(%rbp), %r15
movq %r14, (%r15)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8b4e
movq 0x20(%rbx), %rcx
movslq %eax, %rdx
orl $0x40, 0x4(%rcx,%rdx,8)
movq 0x20(%rbx), %rax
movq %rdx, -0xa8(%rbp)
orl $0x20, 0x4(%rax,%rdx,8)
leaq 0x4c0(%rbx), %rdx
movq %rbx, %rdi
movq %rdx, %rsi
movq %rdx, -0xb8(%rbp)
movq %r14, %rcx
movq %r15, %r8
movl $0x3, %r9d
callq 0x7937
testl %eax, %eax
je 0x7c11
movl 0x1c(%rbx), %eax
movq -0xa8(%rbp), %rsi
subl %esi, %eax
movq 0x20(%rbx), %rcx
shll $0x7, %eax
andl $0x7ffff80, %eax        # imm = 0x7FFFF80
movl $0xf800007f, %edx       # imm = 0xF800007F
andl 0x4(%rcx,%rsi,8), %edx
orl %eax, %edx
movl %edx, 0x4(%rcx,%rsi,8)
leaq 0x58(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0xd8(%rbx), %rax
movq %rax, -0x48(%rbp)
xorl %r15d, %r15d
movq $0x0, -0x38(%rbp)
xorl %r14d, %r14d
leaq 0x48b1(%rip), %rax      # 0xc3f0
movb (%r15,%rax), %r12b
movb %r12b, -0x2b(%rbp)
movq 0x8(%rbx), %r13
movq %r13, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x86a9
testl %eax, %eax
js 0x7b86
movq 0x28(%r13), %rcx
movl %eax, %eax
imulq $0x38, %rax, %rax
movl 0x20(%rcx,%rax), %edx
cmpl 0x18(%rcx,%rax), %edx
je 0x7b86
movq -0x38(%rbp), %rcx
movl %ecx, %eax
leal 0x1(%rcx), %edx
movl $0x58, %ecx
movq %rdx, -0x38(%rbp)
jmp 0x7b95
movl %r14d, %eax
leal 0x1(%r14), %edx
movl $0xd8, %ecx
movl %edx, %r14d
addq %rbx, %rcx
cltq
movb %r12b, (%rax,%rcx)
incq %r15
cmpq $0x3a, %r15
jne 0x7b38
movq -0x50(%rbp), %r14
cmpb $0x0, (%r14)
je 0x7f9e
movq (%rbx), %rdi
leaq 0x455b(%rip), %rsi      # 0xc11a
xorl %r12d, %r12d
movq %r14, %rdx
xorl %eax, %eax
callq 0x70e0
leaq 0x4564(%rip), %rsi      # 0xc137
leaq -0x1e0(%rbp), %r13
movq %r13, %rdi
movq -0x48(%rbp), %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x7120
leaq 0x540(%rbx), %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x70b0
movl $0x4, %ecx
testl %eax, %eax
jne 0x7fa8
jmp 0x7fb4
leaq 0x2c0(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq 0x188(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x1ac(%rbx), %rax
movq %rax, -0xc0(%rbp)
leaq 0x300(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x1b4(%rbx), %rax
movq %rax, -0xc8(%rbp)
leaq 0x280(%rbx), %rax
movq %rax, -0xb0(%rbp)
leaq 0x41f6(%rip), %r14      # 0xbe59
movq (%rbx), %rdi
movq %r14, %rsi
leaq 0x4490(%rip), %rdx      # 0xc100
xorl %eax, %eax
callq 0x70e0
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x80(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x60(%rbp), %r13
cmpq 0x40(%rbx), %r13
jae 0x7af0
movq -0x58(%rbp), %r15
cmpq %r15, %r13
jae 0x7ce2
callq 0x7140
movq (%rax), %rax
movsbq (%r13), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x7cde
incq %r13
cmpq %r15, %r13
je 0x7cdb
movsbq (%r13), %rcx
incq %r13
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x7cc2
decq %r13
jmp 0x7cde
movq %r15, %r13
movq %r13, -0x60(%rbp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8b4e
movl %eax, -0x64(%rbp)
xorl %r12d, %r12d
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movb $0x1, %r14b
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
cmpl $0x1, %r12d
je 0x7d36
movl $0x7, %edx
movq -0x48(%rbp), %rdi
movq %r13, %rsi
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
callq 0x70f0
testl %eax, %eax
je 0x7dc1
cmpl $0x2, %r12d
je 0x7db9
movl $0x7, %edx
movq -0x50(%rbp), %rdi
movq %r13, %rsi
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
callq 0x70f0
testl %eax, %eax
jne 0x7e34
movq %rbx, %rdi
movl $0x5, %esi
callq 0x8b4e
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 %r13, -0xa0(%rbp)
movslq 0x19c(%rbx), %rax
addq %r13, %rax
movq %rax, -0x98(%rbp)
cmpl $0x0, 0x1a8(%rbx)
js 0x7db9
movslq 0x1b0(%rbx), %rax
movl $0x2, %r12d
movq -0xc8(%rbp), %rcx
jmp 0x7e20
movl $0x2, %r12d
jmp 0x7e34
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8b4e
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(%r13), %edx
leaq -0x90(%rbp), %rdi
leaq 0x42f3(%rip), %rsi      # 0xc0f3
xorl %eax, %eax
callq 0x7120
movslq 0x1a8(%rbx), %rax
movl $0x1, %r12d
testq %rax, %rax
js 0x7e34
movq -0xc0(%rbp), %rcx
addq %r13, %rax
movq %rax, -0x88(%rbp)
movslq (%rcx), %rax
addq %r13, %rax
movq %rax, -0x80(%rbp)
testb $0x1, %r14b
je 0x7e47
movslq 0x18c(%rbx), %rax
addq %rax, %r13
incq %r13
cmpq %r15, %r13
jae 0x7e7f
callq 0x7140
movq (%rax), %rax
movsbq (%r13), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x7e7f
incq %r13
cmpq %r15, %r13
je 0x7e7c
movsbq (%r13), %rcx
incq %r13
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x7e63
decq %r13
jmp 0x7e7f
movq %r15, %r13
testb $0x1, %r14b
movl $0x0, %r14d
jne 0x7d06
movq %r13, -0x60(%rbp)
testl %r12d, %r12d
je 0x7fa3
movl $0x7, %edx
movq -0xb0(%rbp), %rdi
movq %r13, %rsi
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
callq 0x70f0
testl %eax, %eax
jne 0x7ee6
movslq 0x18c(%rbx), %rax
addq %r13, %rax
cmpq %r15, %rax
ja 0x7ee6
movslq 0x198(%rbx), %rax
addq %r13, %rax
movq %rax, -0x78(%rbp)
movslq 0x19c(%rbx), %rax
addq %r13, %rax
movq %rax, -0x70(%rbp)
movl -0x40(%rbp), %r15d
testl %r15d, %r15d
leaq 0x3f65(%rip), %r14      # 0xbe59
js 0x7f10
movq 0x8(%rbx), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x8bfe
movq 0x20(%rbx), %rcx
movl %r15d, %edx
movl %eax, (%rcx,%rdx,8)
movl -0x3c(%rbp), %r15d
testl %r15d, %r15d
js 0x7f35
movq 0x8(%rbx), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x8bfe
movq 0x20(%rbx), %rcx
movl %r15d, %edx
movl %eax, (%rcx,%rdx,8)
jmp 0x7f39
movq 0x20(%rbx), %rcx
movl 0x1c(%rbx), %eax
movl -0x64(%rbp), %edx
subl %edx, %eax
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 0x418d(%rip), %rdx      # 0xc0f7
xorl %eax, %eax
callq 0x70e0
movq -0x60(%rbp), %rcx
movq %rbx, %rdi
movq -0xb8(%rbp), %rdx
movq %rdx, %rsi
leaq -0x60(%rbp), %r8
movl $0x3, %r9d
callq 0x7937
testl %eax, %eax
je 0x7c63
jmp 0x7af0
xorl %r12d, %r12d
jmp 0x7fb4
movl $0x1, %ecx
movq 0x8(%rbx), %rax
movl %ecx, (%rax)
movl $0x1, %r12d
movl %r12d, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq