// File: /workspace/github_cpp_makefile_star2_O2/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 0x18(%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 0x9744
movl %eax, %ebp
leaq 0x30(%rsp), %rdi
callq 0x5e96
testb %bpl, %bpl
je 0x96f3
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x54f0
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpb $0x0, 0x2f(%rsp)
jns 0x9655
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x5190
movq %rax, %r14
xorl %ebp, %ebp
leaq 0x30(%rsp), %r15
xorl %r12d, %r12d
cmpq %rbp, %r14
je 0x96cc
movzbl (%rbx,%rbp), %r13d
testb $0x1, %r12b
je 0x969e
cmpl $0x2c, %r13d
jne 0x9690
movq %r15, %rdi
pushq $0x2c
popq %rsi
callq 0x5040
xorl %r12d, %r12d
jmp 0x96c7
movq %r15, %rdi
pushq $0x5c
popq %rsi
callq 0x5040
xorl %r12d, %r12d
cmpl $0x5c, %r13d
je 0x96b6
cmpl $0x2c, %r13d
jne 0x96bb
leaq 0x8(%rsp), %rdi
callq 0xbd0c
jmp 0x96c7
movb $0x1, %r12b
jmp 0x96c7
movsbl %r13b, %esi
movq %r15, %rdi
callq 0x5040
incq %rbp
jmp 0x966a
testb $0x1, %r12b
je 0x96df
leaq 0x30(%rsp), %rdi
pushq $0x5c
popq %rsi
callq 0x5040
leaq 0x8(%rsp), %rdi
callq 0xbd0c
leaq 0x30(%rsp), %rdi
callq 0x50e0
leaq 0x18(%rsp), %rdi
callq 0x5e96
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x9732
jmp 0x9725
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5e96
jmp 0x9732
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x50e0
leaq 0x18(%rsp), %rdi
callq 0x5e96
movq %rbx, %rdi
callq 0x5670