// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/include/tinyopt/tinyopt.h
// Function: to::maybe<bool> to::parse<bool, parse_custom_parser_Test::TestBody()::$_0, void, void>(char**&, parse_custom_parser_Test::TestBody()::$_0 const&, to::key)
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 $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0x1e7f4
movq (%r15), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x272c6
movq %rbx, 0x8(%rsp)
xorl %ebx, %ebx
pushq $0x3d
popq %rbp
cmpq $0x28, %rbx
je 0x272c1
leaq (%rsp,%rbx), %r13
addq $0x30, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x24f71
testb %al, %al
jne 0x272cb
cmpl $0x1, 0x50(%rsp,%rbx)
jne 0x272bb
movq %r14, %rdi
movl %ebp, %esi
callq 0xd620
testq %rax, %rax
je 0x272bb
movq %rax, %r12
movq (%r13), %rsi
movq %rax, %rdx
subq %r14, %rdx
movq %r14, %rdi
callq 0xd260
testl %eax, %eax
je 0x272dd
addq $0x28, %rbx
jmp 0x2726f
movq 0x8(%rsp), %rbx
movb $0x0, (%rbx)
jmp 0x2732f
movq (%r15), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x2734b
addq $0x10, %rax
jmp 0x272e7
incq %r12
movq (%r15), %rax
addq $0x8, %rax
movq 0x8(%rsp), %rbx
movq %rax, (%r15)
movzbl (%r12), %eax
subl $0x6e, %eax
jne 0x2730a
movzbl 0x1(%r12), %eax
subl $0x6f, %eax
jne 0x2730a
movzbl 0x2(%r12), %eax
negl %eax
testl %eax, %eax
je 0x2732a
leaq 0x31591(%rip), %rdi     # 0x588a8
movq %r12, %rsi
callq 0xd8b0
testl %eax, %eax
jne 0x27392
movw $0x101, (%rbx)          # imm = 0x101
jmp 0x2732f
movw $0x1, (%rbx)
leaq 0x30(%rsp), %rdi
callq 0xdbe8
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xd280
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x1337a
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1db28
xorl %ebp, %ebp
leaq 0x5a66f(%rip), %rsi     # 0x819f0
leaq -0x9748(%rip), %rdx     # 0x1dc40
movq %rbx, %rdi
callq 0xda70
jmp 0x273d6
pushq $0x30
popq %rdi
callq 0xd280
movq %rax, %r15
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x1337a
movb $0x1, %bl
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x1dbb4
xorl %ebx, %ebx
leaq 0x5a1c1(%rip), %rsi     # 0x81588
leaq -0x978e(%rip), %rdx     # 0x1dc40
movq %r15, %rdi
callq 0xda70
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xdbe8
testb %bl, %bl
jne 0x273ec
jmp 0x273f4
movq %rax, %r14
movq %r15, %rdi
callq 0xd3e0
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
jmp 0x2741d
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xdbe8
testb %bpl, %bpl
jne 0x27415
jmp 0x2741d
movq %rax, %r14
movq %rbx, %rdi
callq 0xd3e0
leaq 0x30(%rsp), %rdi
callq 0xdbe8
movq %r14, %rdi
callq 0xdaa0