// File: /workspace/github_c_makefile_star2_O1/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 0x3bd3(%rip), %xmm0     # 0xc3d0
leaq -0x60(%rbp), %rax
movaps %xmm0, 0x10(%rax)
movaps 0x3bb4(%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 0x7355
movl $0x1, %ebx
testq %rax, %rax
je 0x8a32
movq %rax, %r14
cmpl $0x0, (%rax)
jne 0x8a32
leaq 0x35f7(%rip), %rsi      # 0xbe4e
xorl %ebx, %ebx
movq %r14, %rdi
xorl %edx, %edx
callq 0x8606
testq %rax, %rax
je 0x88ff
leaq 0x3541(%rip), %rsi      # 0xbdb4
movq %r14, %rdi
xorl %edx, %edx
callq 0x8606
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7120
movq %rax, %rbx
movq 0x28745(%rip), %r13     # 0x30fd8
movq (%r13), %rcx
leaq 0x35b4(%rip), %rdi      # 0xbe52
movl $0x5, %esi
movl $0x1, %edx
callq 0x7140
movq %rbx, -0x30(%rbp)
imulq $0x3c8, %rbx, %rax      # imm = 0x3C8
leaq 0x5951(%rip), %rcx      # 0xe210
movq 0x8(%rax,%rcx), %rdx
testq %rdx, %rdx
je 0x88f2
leaq (%rax,%rcx), %r15
addq $0x10, %r15
leaq 0x3580(%rip), %r12      # 0xbe58
movq (%r13), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x70f0
movq (%r15), %rdx
addq $0x8, %r15
testq %rdx, %rdx
jne 0x88d8
movq -0x30(%rbp), %r12
leal 0x1(%r12), %r15d
xorl %ebx, %ebx
jmp 0x8908
movl $0x93, %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x87ac
cmpl %r15d, %r12d
jge 0x8a32
movslq %r12d, %rbx
imulq $0x3c8, %rbx, %rax      # imm = 0x3C8
leaq 0x58e6(%rip), %rdx      # 0xe210
leaq (%rax,%rdx), %r13
addq $0x10, %r13
movq $0x0, -0x38(%rbp)
leaq 0x2877f(%rip), %r14     # 0x310c0
imulq $0x3c8, %rbx, %rax      # imm = 0x3C8
cmpq $0x0, 0x8(%rax,%rdx)
movl $0x0, %esi
je 0x8963
xorl %esi, %esi
cmpq $0x0, (%r13,%rsi,8)
leaq 0x1(%rsi), %rsi
jne 0x8957
movq %rbx, -0x30(%rbp)
leaq (%rdx,%rax), %rcx
addq %rax, %rdx
addq $0x8, %rdx
movslq (%rcx), %rbx
movq (%r14,%rbx,8), %rdi
movl $0x1, %ecx
movl $0x100, %r8d            # imm = 0x100
callq 0x7355
testq %rax, %rax
je 0x89a9
movq %rax, %r12
movl (%rax), %eax
testl %eax, %eax
je 0x89d9
cmpl $0x5, %eax
movq -0x30(%rbp), %rbx
jne 0x8a43
movq %r12, %rdi
jmp 0x89e0
movq 0x28628(%rip), %rax     # 0x30fd8
movq (%rax), %rdi
movq (%r14,%rbx,8), %rcx
xorl %r12d, %r12d
leaq 0x349f(%rip), %rsi      # 0xbe60
movq -0x30(%rbp), %rbx
movl %ebx, %edx
xorl %eax, %eax
callq 0x70f0
movl $0x1, %eax
movq %rax, -0x38(%rbp)
jmp 0x8a04
movq %r12, %rdi
movq -0x30(%rbp), %rbx
movl %ebx, %esi
callq 0x8a62
testl %eax, %eax
je 0x89f9
movl $0x1, %eax
movq %rax, -0x38(%rbp)
xorl %r12d, %r12d
jmp 0x8a04
movq %r12, %rdi
callq 0x87ac
movb $0x1, %r12b
testb %r12b, %r12b
je 0x8a2e
incq %rbx
addq $0x3c8, %r13            # imm = 0x3C8
cmpl %ebx, %r15d
leaq 0x57f3(%rip), %rdx      # 0xe210
leaq 0x2869c(%rip), %r14     # 0x310c0
jne 0x8941
xorl %ebx, %ebx
jmp 0x8a32
movq -0x38(%rbp), %rbx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x343a(%rip), %rdi      # 0xbe84
leaq 0x345c(%rip), %rsi      # 0xbead
leaq 0x345c(%rip), %rcx      # 0xbeb4
movl $0x255, %edx            # imm = 0x255
callq 0x7080