// File: /workspace/github_cpp_makefile_star2_O2/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 $0xd8, %rsp
movq %rsi, %r15
movq %rdi, 0x18(%rsp)
leaq 0x20(%rsp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x40(%rsp), %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
andl $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rax
andl $0x0, (%rax)
movl $0x0, 0x14(%rsp)
leaq 0x60(%rsp), %rbx
leaq 0xb8(%rsp), %r13
movq %rcx, 0x58(%rsp)
movq %rcx, %rax
xorl %r14d, %r14d
cmpq $0x0, (%rax)
je 0x4098
testb $0x1, %r14b
jne 0x4098
testb $0x1, 0x14(%rsp)
jne 0x4098
movq (%r15), %r12
movq 0x8(%r15), %rbp
cmpq %rbp, %r12
je 0x3f30
movq 0x20(%r12), %rax
cmpq 0x28(%r12), %rax
je 0x3f2a
cmpb $0x1, 0x6a(%r12)
jne 0x3eff
cmpl $0x0, 0x70(%r12)
jne 0x3f2a
movl 0x10(%rsp), %esi
movq %r12, %rdi
callq 0x4d3e
testb %al, %al
je 0x3f2a
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x40(%rsp), %rdx
callq 0x4d74
cmpb $0x1, 0x60(%rsp)
je 0x3fc3
addq $0x78, %r12
jmp 0x3ede
movq 0x58(%rsp), %rax
movq (%rax), %rax
cmpb $0x2d, (%rax)
jne 0x3f4d
cmpb $0x2d, 0x1(%rax)
jne 0x3f4d
cmpb $0x0, 0x2(%rax)
je 0x40bb
movq (%r15), %r12
movq 0x8(%r15), %rbp
cmpq %rbp, %r12
je 0x3fa6
movq 0x20(%r12), %rax
cmpq 0x28(%r12), %rax
jne 0x3fa0
cmpb $0x1, 0x6a(%r12)
jne 0x3f75
cmpl $0x0, 0x70(%r12)
jne 0x3fa0
movl 0x10(%rsp), %esi
movq %r12, %rdi
callq 0x4d3e
testb %al, %al
je 0x3fa0
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x40(%rsp), %rdx
callq 0x4d74
cmpb $0x1, 0x60(%rsp)
je 0x4048
addq $0x78, %r12
jmp 0x3f54
movq 0x48(%rsp), %rax
cmpq $0x0, (%rax)
je 0x408e
addq $0x8, %rax
movq %rax, 0x48(%rsp)
jmp 0x408e
cmpb $0x0, 0x69(%r12)
leaq 0x98(%rsp), %r14
jne 0x402b
movq 0x68(%rsp), %rsi
testq %rsi, %rsi
je 0x3fff
movq %r13, %rdi
leaq 0xf(%rsp), %rdx
callq 0x29fc
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x54de
movq %r13, %rdi
callq 0x2090
movq 0x70(%rsp), %rsi
testq %rsi, %rsi
je 0x402b
movq %r14, %rdi
leaq 0xf(%rsp), %rdx
callq 0x29fc
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x54de
movq %r14, %rdi
callq 0x2090
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x4e8a
movb 0x6c(%r12), %r14b
movb 0x6d(%r12), %al
movl %eax, 0x14(%rsp)
jmp 0x408e
cmpb $0x0, 0x69(%r12)
jne 0x407c
movq 0x70(%rsp), %rsi
leaq 0x78(%rsp), %r14
movq %r14, %rdi
leaq 0xf(%rsp), %rdx
callq 0x29fc
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x54de
movq %r14, %rdi
callq 0x2090
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x4e8a
movb 0x6c(%r12), %r14b
movq 0x48(%rsp), %rax
jmp 0x3eb8
testb $0x1, %r14b
je 0x40a7
xorl %eax, %eax
movq 0x18(%rsp), %rbx
jmp 0x40ef
leaq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x4278
jmp 0x40f1
leaq 0x40(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x4eb8
movaps 0x20(%rsp), %xmm0
movq 0x18(%rsp), %rbx
movups %xmm0, 0x8(%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movb $0x1, %al
movb %al, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x2d76
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x414b
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x4138
jmp 0x414b
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0x4138
jmp 0x414b
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x2090
jmp 0x414e
jmp 0x414b
jmp 0x414b
jmp 0x414b
jmp 0x414b
jmp 0x414b
jmp 0x414b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2d76
movq %rbx, %rdi
callq 0x2220