// File: /workspace/github_c_makefile_star2_O0/jaroslov[P]docoptc/./docopt.h
// Function: docopt_parse_args
static int docopt_parse_args(struct docopt_parse_state* dS)
{
    if (dS->entries->error) return 0;
    // options* commands* -- arguments*
    struct docopt_entries argE  = *dS->entries;
    struct docopt_entries *docE = dS->entries;
    int result                  = 0;
    int hterm                   = 0;
    struct docopt_str arg       = { 0, 0 };
    struct docopt_entry entry   = { { 0 } };
    struct docopt_entry* terme  = 0;
    argE.nentries               = dS->argc+1;
    argE.curentry               = 0;
    if (!(argE.entries = (struct docopt_entry*)calloc(sizeof(struct docopt_entry), dS->argc+1)))
        goto docoptDone;
    dS->entries                 = &argE;

    dS->args_term               = dS->curterm;
    for (int i = 0; i < dS->argc; ++i)
    {
        arg.fst         = dS->argv[i];
        arg.lst         = dS->argv[i] + strlen(dS->argv[i]);
        if (!strcmp(dS->argv[i], "--") || !strcmp(dS->argv[i], "-") || (dS->argv[i][0] != '-') || dS->positional)
        {
            if (!strcmp(dS->argv[i], "--")) dS->positional = 1;
            fprintf(dS->log, "ARGUMENT (%s)\n", dS->argv[i]);
            hterm       = docopt_new_term(dS, DOCOPT_TYPE_ARGUMENT);
            DO_TM(hterm)->length = 1;
            entry.name.fst  = dS->argv[i];
            entry.name.lst  = dS->argv[i] + strlen(dS->argv[i]);
            DO_TM(hterm)->entry = docopt_entries_insert_entry(dS->entries, &entry);
        }
        else
        {
            fprintf(dS->log, "LONG/SHORT (%s)\n", dS->argv[i]);
            hterm           = docopt_parse_atom(dS, &arg);
            if (DO_TM(hterm)->type == DOCOPT_TYPE_LONG)
            {
                terme       = docopt_fetch_entry(dS->entries, DO_TM(hterm)->entry);
                if (docopt_str_len(&terme->name) < strlen(dS->argv[i]))
                {
                    terme->command.fst  = dS->argv[i] + 1 + docopt_str_len(&terme->name);
                    terme->command.lst  = dS->argv[i] + strlen(dS->argv[i]);
                }
            }
            if ((DO_TM(hterm)->type == DOCOPT_TYPE_SHORT) && (strlen(dS->argv[i]) > 2))
            {
                terme               = docopt_fetch_entry(dS->entries, DO_TM(hterm)->entry);
                terme->command.fst  = dS->argv[i] + 2;
                terme->command.lst  = dS->argv[i] + strlen(dS->argv[i]);
            }
        }
    }

    dS->optional    = 1;
    dS->positional  = 0;
    dS->entries     = docE;
    dS->args        = &argE;

    dS->nargterms       = dS->curterm - dS->args_term;
    dS->entries->nargs  = dS->nargterms;
    fprintf(dS->log, "Tokenized Args Length (%d)\n", dS->entries->nargs);
    if (!(dS->entries->args = (struct docopt_arg*)calloc(sizeof(struct docopt_arg), dS->entries->nargs)))
    {
        dS->entries->error = DOCOPT_BAD_ARG_ALLOC;
        return 1;
    }

    result          = docopt_unify_args(dS, dS->usage_term);

docoptDone:
    dS->entries                 = docE;
    if (argE.entries) free(argE.entries);
    return !result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
je 0x87b8
movl $0x0, -0x4(%rbp)
jmp 0x8dfa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x50(%rbp), %rdi
movl $0x40, %edx
callq 0x70f0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x70a0
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x70a0
movq $0x0, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movl 0x16c(%rax), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x16c(%rax), %eax
addl $0x1, %eax
movslq %eax, %rsi
movl $0x38, %edi
callq 0x70c0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x8856
jmp 0x8dcd
movq -0x10(%rbp), %rax
leaq -0x50(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x15c(%rax)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x16c(%rcx), %eax
jge 0x8cf4
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7070
movq %rax, %rcx
movq -0xc0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x549a(%rip), %rsi      # 0xddad
callq 0x70d0
cmpl $0x0, %eax
je 0x8973
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x5474(%rip), %rsi      # 0xddae
callq 0x70d0
cmpl $0x0, %eax
je 0x8973
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x8973
movq -0x10(%rbp), %rax
cmpl $0x0, 0x164(%rax)
je 0x8a9e
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x541d(%rip), %rsi      # 0xddad
callq 0x70d0
cmpl $0x0, %eax
jne 0x89a8
movq -0x10(%rbp), %rax
movl $0x1, 0x164(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x584e(%rip), %rsi      # 0xe21a
movb $0x0, %al
callq 0x70e0
movq -0x10(%rbp), %rdi
movl $0xa, %esi
callq 0x9940
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x99f0
movl 0x4(%rax), %ecx
andl $0xf800007f, %ecx       # imm = 0xF800007F
orl $0x80, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7070
movq %rax, %rcx
movq -0xd0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x9a80
movl %eax, -0xc4(%rbp)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x99f0
movl -0xc4(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x8cde
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x5767(%rip), %rsi      # 0xe229
movb $0x0, %al
callq 0x70e0
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xa060
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x99f0
movl 0x4(%rax), %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jne 0x8bfa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x99f0
movq -0xe0(%rbp), %rdi
movl (%rax), %esi
callq 0x9240
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x7420
movl %eax, %eax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7070
movq %rax, %rcx
movq -0xd8(%rbp), %rax
cmpq %rcx, %rax
jae 0x8bf8
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x7420
movq -0xf0(%rbp), %rcx
movl %eax, %eax
addq %rax, %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7070
movq -0xe8(%rbp), %rcx
addq %rax, %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x8bfa
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x99f0
movl 0x4(%rax), %eax
andl $0x1f, %eax
cmpl $0x6, %eax
jne 0x8cdc
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7070
cmpq $0x2, %rax
jbe 0x8cdc
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x99f0
movq -0x100(%rbp), %rdi
movl (%rax), %esi
callq 0x9240
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
addq $0x2, %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0xb4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7070
movq -0xf8(%rbp), %rcx
addq %rax, %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x8cde
jmp 0x8ce0
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x887d
movq -0x10(%rbp), %rax
movl $0x1, 0x160(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x164(%rax)
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq -0x50(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
subl 0x15c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x170(%rax)
movq -0x10(%rbp), %rax
movl 0x170(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x30(%rax), %edx
leaq 0x54c9(%rip), %rsi      # 0xe23a
movb $0x0, %al
callq 0x70e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rax), %rsi
movl $0x18, %edi
callq 0x70c0
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0x8db7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x6, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8dfa
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x158(%rax), %esi
callq 0xa800
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x8de9
movq -0x28(%rbp), %rdi
callq 0x7030
cmpl $0x0, -0x5c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)