// File: /workspace/github_cpp_makefile_star2_O1/halfflat[P]tinyopt/include/tinyopt/tinyopt.h
// Function: to::impl::run(std::vector<to::impl::counted_option, std::allocator<to::impl::counted_option>>&, int&, char**)
inline maybe<saved_options> run(std::vector<impl::counted_option>& opts, int& argc, char** argv) {
        saved_options collate;
        bool exit = false;
        bool stop = false;
        state st{argc, argv};
        int mode = 0;
        while (st && !exit && !stop) {
            // Try options with a key first.
            for (auto& o: opts) {
                if (o.keys.empty()) continue;
                if (o.is_single && o.count) continue;
                if (!o.check_mode(mode)) continue;

                if (auto ma = o.match(st)) {
                    if (!o.is_ephemeral) {
                        if (ma->first) collate.add(ma->first);
                        if (ma->second) collate.add(ma->second);
                    }
                    o.set_mode(mode);
                    exit = o.is_exit;
                    stop = o.is_stop;
                    goto next;
                }
            }

            // Literal "--" terminates option parsing.
            if (!std::strcmp(*argv, "--")) {
                st.shift();
                return collate;
            }

            // Try free options.
            for (auto& o: opts) {
                if (!o.keys.empty()) continue;
                if (o.is_single && o.count) continue;
                if (!o.check_mode(mode)) continue;

                if (auto ma = o.match(st)) {
                    if (!o.is_ephemeral) collate.add(ma->second);
                    o.set_mode(mode);
                    exit = o.is_exit;
                    goto next;
                }
            }

            // Nothing matched, so increment argv.
            st.skip();
        next: ;
        }

        return exit? nothing: just(collate);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x50(%rsp)
xorl %eax, %eax
movl %eax, 0x58(%rsp)
movl %eax, 0x8(%rsp)
movq %rcx, 0x60(%rsp)
cmpq $0x0, (%rcx)
movq %rdi, 0x28(%rsp)
je 0x48b1
movq %rsi, %r15
xorl %r14d, %r14d
movl $0x0, 0xc(%rsp)
movq (%r15), %rbx
movq 0x8(%r15), %rbp
movl $0x4, %r12d
cmpq %rbp, %rbx
je 0x4760
movq 0x20(%rbx), %rax
movl $0x5, %r13d
cmpq 0x28(%rbx), %rax
je 0x4749
cmpb $0x1, 0x6a(%rbx)
jne 0x464b
cmpl $0x0, 0x70(%rbx)
jne 0x4749
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x56a8
testb %al, %al
je 0x4749
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
leaq 0x48(%rsp), %rdx
callq 0x570a
xorl %r13d, %r13d
cmpb $0x1, 0x30(%rsp)
jne 0x4749
cmpb $0x0, 0x69(%rbx)
leaq 0x88(%rsp), %r14
jne 0x472b
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0x46e2
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
leaq 0x7(%rsp), %rdx
callq 0x2dde
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x602a
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x46e2
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x472b
movq %r14, %rdi
leaq 0x7(%rsp), %rdx
callq 0x2dde
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x602a
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x472b
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x58cc
movb 0x6c(%rbx), %r14b
movb 0x6d(%rbx), %al
movl %eax, 0xc(%rsp)
movl $0x6, %r13d
cmpl $0x5, %r13d
je 0x4754
testl %r13d, %r13d
jne 0x475d
addq $0x78, %rbx
jmp 0x461e
movl %r13d, %r12d
cmpl $0x6, %r12d
je 0x4886
cmpl $0x4, %r12d
jne 0x4910
movq 0x60(%rsp), %rax
movq (%rax), %rdi
leaq 0x29ae(%rip), %rsi      # 0x7131
callq 0x21a0
testl %eax, %eax
je 0x48c7
movq (%r15), %rbx
movq 0x8(%r15), %r13
movl $0x7, %ebp
cmpq %r13, %rbx
je 0x4864
movq 0x20(%rbx), %rax
movl $0x8, %r12d
cmpq 0x28(%rbx), %rax
jne 0x4852
cmpb $0x1, 0x6a(%rbx)
jne 0x47c9
cmpl $0x0, 0x70(%rbx)
jne 0x4852
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x56a8
testb %al, %al
je 0x4852
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
leaq 0x48(%rsp), %rdx
callq 0x570a
xorl %r12d, %r12d
cmpb $0x1, 0x30(%rsp)
jne 0x4852
cmpb $0x0, 0x69(%rbx)
jne 0x483b
movq 0x40(%rsp), %rsi
leaq 0x68(%rsp), %r14
movq %r14, %rdi
leaq 0x7(%rsp), %rdx
callq 0x2dde
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x602a
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x483b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x58cc
movb 0x6c(%rbx), %r14b
movl $0x6, %r12d
testb $0x7, %r12b
jne 0x4861
addq $0x78, %rbx
jmp 0x479c
movl %r12d, %ebp
cmpl $0x6, %ebp
je 0x4886
cmpl $0x7, %ebp
jne 0x4910
movq 0x50(%rsp), %rax
cmpq $0x0, (%rax)
je 0x4886
addq $0x8, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpq $0x0, (%rax)
je 0x48a2
testb $0x1, %r14b
jne 0x48a2
testb $0x1, 0xc(%rsp)
je 0x4611
testb $0x1, %r14b
movq 0x28(%rsp), %r14
je 0x48b1
xorl %ebx, %ebx
jmp 0x490d
movb $0x1, (%r14)
leaq 0x8(%r14), %rdi
movb $0x1, %bl
leaq 0x10(%rsp), %rsi
callq 0x6684
jmp 0x490d
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x591c
movq 0x28(%rsp), %r14
movb $0x1, (%r14)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x1, %bl
movb %bl, (%r14)
leaq 0x10(%rsp), %rdi
callq 0x323c
movq 0x28(%rsp), %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x49b0
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x49a5
movq 0x78(%rsp), %rsi
jmp 0x4994
jmp 0x49a2
jmp 0x49a2
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x49a5
movq 0x98(%rsp), %rsi
jmp 0x4994
jmp 0x49a2
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x49a5
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x49a5
jmp 0x49a2
jmp 0x49b0
movq %rax, %rbx
movb $0x0, 0x30(%rsp)
jmp 0x49b3
jmp 0x49b0
jmp 0x49b0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x323c
movq %rbx, %rdi
callq 0x2210
nop