// File: /workspace/github_c_makefile_star2_O3/jaroslov[P]docoptc/test.c
// Function: main
int main(int argc, char **argv)
{
    const char docstr[] =
    "Usage:\n"
    "  test self-test\n"
    "  test one N\n";

    docopt_t doc        = docopt(docstr, argc-1, argv+1, 0, DOCOPT_VERSION);
    unsigned long low   = 0;
    unsigned long high  = sizeof(tests)/sizeof(tests[0]);
    if (doc && !docopt_error(doc))
    {
        if (docopt_get(doc, "one", 0))
        {
            low         = strtoul(docopt_get(doc, "N", 0)->fst, 0, 0);
            high        = low + 1;
            fprintf(stdout, "ARGS\n");
            for (int j = 0; tests[low].args[j]; ++j)
                fprintf(stdout, "    %s\n", tests[low].args[j]);
        }
    }
    else
    {
        return 1;
    }
    docopt_free(doc);

    for (int i = low, e = high; i < e; ++i)
    {
        int argc        = 0;
        for (int j = 0; tests[i].args[j]; ++j, ++argc)
            ;
        docopt_t doc    = docopt(usages[tests[i].usage], argc, (char**)tests[i].args, DOCOPT_NO_HELP, DOCOPT_VERSION);
        if (!doc)
        {
            fprintf(stdout, "Failed to parse (%d):\n====\n%s\n====\n", i, usages[tests[i].usage]);
            return 1;
        }
        else if (docopt_error(doc))
        {
            assert(docopt_error(doc) == DOCOPT_PRINTED_HELP);
            if (check_test(doc, i)) return 1;
        }
        else
        {
            if (check_test(doc, i)) return 1;
        }
        docopt_free(doc);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movaps 0x3c1f(%rip), %xmm0     # 0xc3d0
leaq -0x60(%rbp), %rax
movaps %xmm0, 0x10(%rax)
movaps 0x3c00(%rip), %xmm0     # 0xc3c0
movaps %xmm0, (%rax)
movabsq $0xa4e20656e6f20, %rcx  # imm = 0xA4E20656E6F20
movq %rcx, 0x1e(%rax)
leal -0x1(%rdi), %ecx
leaq 0x8(%rsi), %rdx
movq %rax, %rdi
movl %ecx, %esi
xorl %ecx, %ecx
movl $0x100, %r8d            # imm = 0x100
callq 0x7361
movl $0x1, %ebx
testq %rax, %rax
je 0x89a5
movq %rax, %r14
cmpl $0x0, (%rax)
jne 0x89a5
leaq 0x3640(%rip), %rsi      # 0xbe4b
movq %r14, %rdi
xorl %edx, %edx
callq 0x85ae
testq %rax, %rax
je 0x88c6
leaq 0x358c(%rip), %rsi      # 0xbdb1
xorl %ebx, %ebx
movq %r14, %rdi
xorl %edx, %edx
callq 0x85ae
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7110
movq %rax, %r15
movq 0x28791(%rip), %r13     # 0x30fd8
movq (%r13), %rcx
leaq 0x35fd(%rip), %rdi      # 0xbe4f
movl $0x5, %esi
movl $0x1, %edx
callq 0x7130
movq %r15, -0x38(%rbp)
imulq $0x3c8, %r15, %rax      # imm = 0x3C8
leaq 0x599d(%rip), %rcx      # 0xe210
movq 0x8(%rax,%rcx), %rdx
testq %rdx, %rdx
je 0x88a6
leaq (%rax,%rcx), %r15
addq $0x10, %r15
leaq 0x35c9(%rip), %r12      # 0xbe55
movq (%r13), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x70e0
movq (%r15), %rdx
addq $0x8, %r15
testq %rdx, %rdx
jne 0x888c
movq %r14, %rdi
callq 0x8760
movq -0x38(%rbp), %rcx
cmpl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
je 0x89a5
leal 0x1(%rcx), %eax
movl %eax, -0x2c(%rbp)
jmp 0x88d7
movq %r14, %rdi
callq 0x8760
movl $0x93, -0x2c(%rbp)
xorl %ecx, %ecx
movslq %ecx, %rbx
imulq $0x3c8, %rbx, %rax      # imm = 0x3C8
leaq 0x5928(%rip), %r13      # 0xe210
leaq (%rax,%r13), %r15
addq $0x10, %r15
imulq $0x3c8, %rbx, %rax      # imm = 0x3C8
cmpq $0x0, 0x8(%rax,%r13)
movl $0x0, %esi
je 0x8911
xorl %esi, %esi
cmpq $0x0, (%r15,%rsi,8)
leaq 0x1(%rsi), %rsi
jne 0x8906
leaq (%rax,%r13), %rcx
leaq (%rax,%r13), %rdx
addq $0x8, %rdx
movslq (%rcx), %r12
leaq 0x28799(%rip), %rax     # 0x310c0
movq (%rax,%r12,8), %rdi
movl $0x1, %ecx
movl $0x100, %r8d            # imm = 0x100
callq 0x7361
testq %rax, %rax
je 0x897b
movq %rax, %r14
movl (%rax), %eax
testl %eax, %eax
je 0x894e
cmpl $0x5, %eax
jne 0x89b6
movq %r14, %rdi
movl %ebx, %esi
callq 0x89d5
testl %eax, %eax
jne 0x89a0
movq %r14, %rdi
callq 0x8760
incq %rbx
addq $0x3c8, %r15            # imm = 0x3C8
cmpl %ebx, -0x2c(%rbp)
jne 0x88f0
xorl %ebx, %ebx
jmp 0x89a5
movq 0x28656(%rip), %rax     # 0x30fd8
movq (%rax), %rdi
leaq 0x28734(%rip), %rax     # 0x310c0
movq (%rax,%r12,8), %rcx
leaq 0x34c6(%rip), %rsi      # 0xbe5d
movl %ebx, %edx
xorl %eax, %eax
callq 0x70e0
movl $0x1, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34c4(%rip), %rdi      # 0xbe81
leaq 0x34e6(%rip), %rsi      # 0xbeaa
leaq 0x34e6(%rip), %rcx      # 0xbeb1
movl $0x255, %edx            # imm = 0x255
callq 0x7080