// File: /workspace/github_cpp_makefile_star2_O1/halfflat[P]tinyopt/include/tinyopt/tinyopt.h
// Function: to::maybe<int> to::parse<int, to::default_parser<int>, void, void, char const*>(char**&, to::default_parser<int> const&, to::key, char const*)
maybe<V> parse(char**& argp, const P& parser, key k0, Tail... krest) {
    key keys[] = { std::move(k0), std::move(krest)... };

    const char* arg = argp[0];
    if (!arg) return nothing;

    const char* text = nullptr;
    for (const key& k: keys) {
        if (k.label==arg) {
            if (!argp[1]) throw missing_argument(arg);
            text = argp[1];
            argp += 2;
            goto match;
        }
        else if (k.style==key::longfmt) {
            const char* eq = std::strrchr(arg, '=');
            if (eq && !std::strncmp(arg, k.label.c_str(), eq-arg)) {
                text = eq+1;
                argp += 1;
                goto match;
            }
        }
    }
    return nothing;

match:
    if (auto v = parser(text)) return v;
    else throw option_parse_error(arg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, 0x38(%rsp)
movq %rsi, (%rsp)
leaq 0x50(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rcx), %rdx
leaq 0x10(%rcx), %rax
cmpq %rax, %rdx
je 0x2e02a
movq %rdx, 0x40(%rsp)
movq (%rax), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x2e030
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movq %rdi, 0x8(%rsp)
movq 0x8(%rcx), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, -0x20(%rdi)
movq %rax, (%rcx)
movq $0x0, 0x8(%rcx)
movb $0x0, 0x10(%rcx)
movl 0x20(%rcx), %eax
movl %eax, -0x8(%rdi)
movq %r8, %rsi
callq 0x20926
movq (%rsp), %rax
movq (%rax), %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x2e1a6
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %rbp, 0x10(%rsp)
leaq (%rsp,%rbx), %r15
addq $0x40, %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0xd170
testl %eax, %eax
je 0x2e0dd
xorl %r12d, %r12d
movb $0x1, %r14b
cmpl $0x1, 0x60(%rsp,%rbx)
jne 0x2e105
movq %rbp, %rdi
movl $0x3d, %esi
callq 0xd5b0
testq %rax, %rax
je 0x2e105
movq %rbp, %rdi
movq %rax, %rbp
movq (%r15), %rsi
movq %rax, %rdx
subq %rdi, %rdx
callq 0xd230
testl %eax, %eax
jne 0x2e105
incq %rbp
movq (%rsp), %rax
movq (%rax), %rax
addq $0x8, %rax
movq %rbp, %r13
jmp 0x2e0f5
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %r13
testq %r13, %r13
je 0x2e1ee
addq $0x10, %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
movl $0x4, %r12d
xorl %r14d, %r14d
testb %r14b, %r14b
movq 0x10(%rsp), %rbp
je 0x2e123
addq $0x28, %rbx
cmpq $0x50, %rbx
jne 0x2e07c
movl $0x2, %r12d
cmpl $0x2, %r12d
je 0x2e1a6
cmpl $0x4, %r12d
movq 0x8(%rsp), %r15
jne 0x2e1af
movq %r15, %rdi
movq 0x38(%rsp), %rsi
movq %r13, %rdx
callq 0x1597c
cmpb $0x0, (%r15)
jne 0x2e1af
movl $0x30, %edi
callq 0xd240
movq %rax, %r15
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rbp, %rdi
callq 0xd210
leaq (%rax,%rbp), %rdx
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x15892
movb $0x1, %bl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x22276
xorl %ebx, %ebx
leaq 0x653b6(%rip), %rsi     # 0x93548
leaq -0xbe3f(%rip), %rdx     # 0x2235a
movq %r15, %rdi
callq 0xda20
jmp 0x2e24a
movq 0x8(%rsp), %r15
movb $0x0, (%r15)
movq $-0x50, %rbx
leaq 0x78(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x2e1cf
movq (%r14), %rsi
incq %rsi
callq 0xd530
addq $-0x28, %r14
addq $0x28, %rbx
jne 0x2e1bb
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0xd240
movq %rax, %rbx
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xd210
leaq (%rax,%r14), %rdx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x15892
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x22192
xorl %ebp, %ebp
leaq 0x65775(%rip), %rsi     # 0x939b0
leaq -0xbee8(%rip), %rdx     # 0x2235a
movq %rbx, %rdi
callq 0xda20
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e26b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x2e26b
movq %rax, %r14
movb $0x1, %bl
testb %bl, %bl
je 0x2e277
movq %r15, %rdi
callq 0xd3a0
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
jmp 0x2e2d1
movq %rax, %r14
jmp 0x2e2d1
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2e2fc
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x2e2fc
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e2c4
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x2e2c4
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x2e2d1
movq %rbx, %rdi
callq 0xd3a0
leaq 0x78(%rsp), %rbx
xorl %r15d, %r15d
movq 0x68(%rsp,%r15), %rdi
leaq (%rbx,%r15), %rax
cmpq %rdi, %rax
je 0x2e2f2
movq (%rax), %rsi
incq %rsi
callq 0xd530
addq $-0x28, %r15
cmpq $-0x50, %r15
jne 0x2e2d9
movq %r14, %rdi
callq 0xda70