// File: /workspace/github_c_makefile_star2_O0/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
subq $0x80, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0x508c(%rip), %rsi      # 0xe3a0
movl $0x26, %edx
callq 0x70f0
leaq -0x40(%rbp), %rdi
movl -0x8(%rbp), %esi
subl $0x1, %esi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
xorl %ecx, %ecx
movl $0x100, %r8d            # imm = 0x100
callq 0x7440
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x93, -0x58(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x9439
movq -0x48(%rbp), %rdi
callq 0x8f60
cmpl $0x0, %eax
jne 0x9439
movq -0x48(%rbp), %rdi
leaq 0x4aa0(%rip), %rsi      # 0xde19
xorl %edx, %edx
callq 0x8f70
cmpq $0x0, %rax
je 0x9437
movq -0x48(%rbp), %rdi
leaq 0x49ea(%rip), %rsi      # 0xdd7f
xorl %edx, %edx
callq 0x8f70
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x7120
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq 0x29c17(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
leaq 0x4a52(%rip), %rsi      # 0xde1d
movb $0x0, %al
callq 0x70e0
movl $0x0, -0x5c(%rbp)
leaq 0x6e30(%rip), %rax      # 0x10210
imulq $0x3c8, -0x50(%rbp), %rcx # imm = 0x3C8
addq %rcx, %rax
movslq -0x5c(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x9435
movq 0x29bda(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
leaq 0x6e08(%rip), %rax      # 0x10210
imulq $0x3c8, -0x50(%rbp), %rcx # imm = 0x3C8
addq %rcx, %rax
movslq -0x5c(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdx
leaq 0x4a00(%rip), %rsi      # 0xde23
movb $0x0, %al
callq 0x70e0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x93d9
jmp 0x9437
jmp 0x9445
movl $0x1, -0x4(%rbp)
jmp 0x95e6
movq -0x48(%rbp), %rdi
callq 0x9290
movq -0x50(%rbp), %rax
movl %eax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movl %eax, -0x64(%rbp)
movl -0x60(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x95df
movl $0x0, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movslq -0x60(%rbp), %rcx
leaq 0x6d8f(%rip), %rax      # 0x10210
imulq $0x3c8, %rcx, %rcx      # imm = 0x3C8
addq %rcx, %rax
movslq -0x6c(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x94ad
jmp 0x9499
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x9476
movslq -0x60(%rbp), %rcx
leaq 0x6d58(%rip), %rax      # 0x10210
imulq $0x3c8, %rcx, %rcx      # imm = 0x3C8
addq %rcx, %rax
movslq (%rax), %rcx
leaq 0x29bf4(%rip), %rax     # 0x330c0
movq (%rax,%rcx,8), %rdi
movl -0x68(%rbp), %esi
movslq -0x60(%rbp), %rax
leaq 0x6d32(%rip), %rdx      # 0x10210
imulq $0x3c8, %rax, %rax      # imm = 0x3C8
addq %rax, %rdx
addq $0x8, %rdx
movl $0x1, %ecx
movl $0x100, %r8d            # imm = 0x100
callq 0x7440
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jne 0x9551
movq 0x29aca(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
movl -0x60(%rbp), %edx
movslq -0x60(%rbp), %rcx
leaq 0x6cf1(%rip), %rax      # 0x10210
imulq $0x3c8, %rcx, %rcx      # imm = 0x3C8
addq %rcx, %rax
movslq (%rax), %rcx
leaq 0x29b8d(%rip), %rax     # 0x330c0
movq (%rax,%rcx,8), %rcx
leaq 0x48ed(%rip), %rsi      # 0xde2b
movb $0x0, %al
callq 0x70e0
movl $0x1, -0x4(%rbp)
jmp 0x95e6
movq -0x78(%rbp), %rdi
callq 0x8f60
cmpl $0x0, %eax
je 0x95aa
movq -0x78(%rbp), %rdi
callq 0x8f60
cmpl $0x5, %eax
jne 0x956f
jmp 0x958e
leaq 0x48d9(%rip), %rdi      # 0xde4f
leaq 0x48fb(%rip), %rsi      # 0xde78
movl $0x255, %edx            # imm = 0x255
leaq 0x48f6(%rip), %rcx      # 0xde7f
callq 0x7090
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x9600
cmpl $0x0, %eax
je 0x95a8
movl $0x1, -0x4(%rbp)
jmp 0x95e6
jmp 0x95c6
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x9600
cmpl $0x0, %eax
je 0x95c4
movl $0x1, -0x4(%rbp)
jmp 0x95e6
jmp 0x95c6
jmp 0x95c8
movq -0x78(%rbp), %rdi
callq 0x9290
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x945c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)