// File: ahupowerdns[P]mcounter/./ext/doctest.h
// Function: doctest::(anonymous namespace)::parseOptionImpl(int, char const* const*, char const*, doctest::String*)
bool parseOptionImpl(int argc, const char* const* argv, const char* pattern, String* value) {
        // going from the end to the beginning and stopping on the first occurrence from the end
        for(int i = argc; i > 0; --i) {
            auto index = i - 1;
            auto temp = std::strstr(argv[index], pattern);
            if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue
                // eliminate matches in which the chars before the option are not '-'
                bool noBadCharsFound = true;
                auto curr            = argv[index];
                while(curr != temp) {
                    if(*curr++ != '-') {
                        noBadCharsFound = false;
                        break;
                    }
                }
                if(noBadCharsFound && argv[index][0] == '-') {
                    if(value) {
                        // parsing the value of an option
                        temp += strlen(pattern);
                        const unsigned len = strlen(temp);
                        if(len) {
                            *value = temp;
                            return true;
                        }
                    } else {
                        // just a flag - no value
                        return true;
                    }
                }
            }
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x1188b
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x60c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1187b
cmpq $0x0, -0x20(%rbp)
jne 0x117a4
movq -0x30(%rbp), %rdi
callq 0x61b0
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
callq 0x61b0
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jne 0x1187b
movb $0x1, -0x31(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x117e1
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x117df
movb $0x0, -0x31(%rbp)
jmp 0x117e1
jmp 0x117b8
testb $0x1, -0x31(%rbp)
je 0x11879
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x11879
cmpq $0x0, -0x20(%rbp)
je 0x11871
movq -0x18(%rbp), %rdi
callq 0x61b0
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x61b0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x1186f
movq -0x30(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x7960
movq -0x80(%rbp), %rsi
movq -0x20(%rbp), %rdi
callq 0x7d50
jmp 0x11849
leaq -0x60(%rbp), %rdi
callq 0x7900
movb $0x1, -0x1(%rbp)
jmp 0x1188f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x7900
jmp 0x1189d
jmp 0x11877
movb $0x1, -0x1(%rbp)
jmp 0x1188f
jmp 0x11879
jmp 0x1187b
jmp 0x1187d
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11740
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x6800
nopw %cs:(%rax,%rax)