// File: /workspace/github_cpp_makefile_star2_O1/ahupowerdns[P]mcounter/./ext/doctest.h
// Function: doctest::(anonymous namespace)::parseCommaSepArgs(int, char const* const*, char const*, std::vector<doctest::String, std::allocator<doctest::String>>&)
bool parseCommaSepArgs(int argc, const char* const* argv, const char* pattern,
                           std::vector<String>& res) {
        String filtersString;
        if(parseOption(argc, argv, pattern, &filtersString)) {
            // tokenize with "," as a separator, unless escaped with backslash
            std::ostringstream s;
            auto flush = [&s, &res]() {
                auto string = s.str();
                if(string.size() > 0) {
                    res.push_back(string.c_str());
                }
                s.str("");
            };

            bool seenBackslash = false;
            const char* current = filtersString.c_str();
            const char* end = current + strlen(current);
            while(current != end) {
                char character = *current++;
                if(seenBackslash) {
                    seenBackslash = false;
                    if(character == ',') {
                        s.put(',');
                        continue;
                    }
                    s.put('\\');
                }
                if(character == '\\') {
                    seenBackslash = true;
                } else if(character == ',') {
                    flush();
                } else {
                    s.put(character);
                }
            }

            if(seenBackslash) {
                s.put('\\');
            }
            flush();
            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rcx, %r14
xorl %eax, %eax
leaq 0x8(%rsp), %rbx
movb %al, (%rbx)
movb $0x17, %cl
movb %cl, 0x17(%rbx)
leaq 0x30(%rsp), %r8
movb %al, (%r8)
movb %cl, 0x17(%r8)
movq %rbx, %rcx
callq 0xadd8
movl %eax, %ebp
cmpb $0x0, 0x47(%rsp)
jns 0xac66
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xac66
callq 0x5480
testb %bpl, %bpl
je 0xad4f
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x54c0
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
cmpb $0x0, 0x1f(%rsp)
jns 0xac92
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5170
testq %rax, %rax
je 0xad27
movq %rax, %r14
xorl %r13d, %r13d
leaq 0x30(%rsp), %r15
xorl %ebp, %ebp
movzbl (%rbx,%r13), %r12d
testb $0x1, %bpl
je 0xace1
cmpl $0x2c, %r12d
jne 0xacd2
movq %r15, %rdi
movl $0x2c, %esi
callq 0x5040
xorl %ebp, %ebp
jmp 0xad0a
movq %r15, %rdi
movl $0x5c, %esi
callq 0x5040
xorl %ebp, %ebp
cmpl $0x5c, %r12d
je 0xacf9
cmpl $0x2c, %r12d
jne 0xacfe
leaq 0x20(%rsp), %rdi
callq 0xdb6e
jmp 0xad0a
movb $0x1, %bpl
jmp 0xad0a
movsbl %r12b, %esi
movq %r15, %rdi
callq 0x5040
incq %r13
cmpq %r13, %r14
jne 0xacb0
testb $0x1, %bpl
je 0xad27
leaq 0x30(%rsp), %rdi
movl $0x5c, %esi
callq 0x5040
leaq 0x20(%rsp), %rdi
callq 0xdb6e
movq 0x1b280(%rip), %rsi     # 0x25fb8
leaq 0x30(%rsp), %rdi
callq 0x51e0
leaq 0xa0(%rsp), %rdi
callq 0x5120
cmpb $0x0, 0x1f(%rsp)
jns 0xad65
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xad65
callq 0x5480
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xadba
jmp 0xad99
movq %rax, %rbx
cmpb $0x0, 0x47(%rsp)
jns 0xadba
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xadba
callq 0x5480
jmp 0xadba
movq %rax, %rbx
movq 0x1b215(%rip), %rsi     # 0x25fb8
leaq 0x30(%rsp), %rdi
callq 0x51e0
leaq 0xa0(%rsp), %rdi
callq 0x5120
cmpb $0x0, 0x1f(%rsp)
jns 0xadd0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xadd0
callq 0x5480
movq %rbx, %rdi
callq 0x5620