// File: /workspace/github_cpp_makefile_star2_O3/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 0xabd2
movl %eax, %ebp
cmpb $0x0, 0x47(%rsp)
jns 0xaa60
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xaa60
callq 0x5480
testb %bpl, %bpl
je 0xab49
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x54c0
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
cmpb $0x0, 0x1f(%rsp)
jns 0xaa8c
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5170
testq %rax, %rax
je 0xab21
movq %rax, %r14
xorl %r13d, %r13d
leaq 0x30(%rsp), %r15
xorl %ebp, %ebp
movzbl (%rbx,%r13), %r12d
testb $0x1, %bpl
je 0xaadb
cmpl $0x2c, %r12d
jne 0xaacc
movq %r15, %rdi
movl $0x2c, %esi
callq 0x5040
xorl %ebp, %ebp
jmp 0xab04
movq %r15, %rdi
movl $0x5c, %esi
callq 0x5040
xorl %ebp, %ebp
cmpl $0x5c, %r12d
je 0xaaf3
cmpl $0x2c, %r12d
jne 0xaaf8
leaq 0x20(%rsp), %rdi
callq 0xd9d4
jmp 0xab04
movb $0x1, %bpl
jmp 0xab04
movsbl %r12b, %esi
movq %r15, %rdi
callq 0x5040
incq %r13
cmpq %r13, %r14
jne 0xaaaa
testb $0x1, %bpl
je 0xab21
leaq 0x30(%rsp), %rdi
movl $0x5c, %esi
callq 0x5040
leaq 0x20(%rsp), %rdi
callq 0xd9d4
movq 0x1b486(%rip), %rsi     # 0x25fb8
leaq 0x30(%rsp), %rdi
callq 0x51e0
leaq 0xa0(%rsp), %rdi
callq 0x5120
cmpb $0x0, 0x1f(%rsp)
jns 0xab5f
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xab5f
callq 0x5480
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xabb4
jmp 0xab93
movq %rax, %rbx
cmpb $0x0, 0x47(%rsp)
jns 0xabb4
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xabb4
callq 0x5480
jmp 0xabb4
movq %rax, %rbx
movq 0x1b41b(%rip), %rsi     # 0x25fb8
leaq 0x30(%rsp), %rdi
callq 0x51e0
leaq 0xa0(%rsp), %rdi
callq 0x5120
cmpb $0x0, 0x1f(%rsp)
jns 0xabca
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xabca
callq 0x5480
movq %rbx, %rdi
callq 0x5620