// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/streplace.cpp
// Function: Streplace::replaceMatch(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>> const&, Rule&, unsigned long&)
std::string replaceMatch(const std::smatch& match, Rule& rule, size_t& numMatches)
    {
        // --whole-words
        if (wholeWords && match.length())
        {
            if ((ut1::isalnum_(match.str()[0]) && match.prefix().length() && ut1::isalnum_(match.prefix().str().back())) || (ut1::isalnum_(match.str().back()) && match.suffix().length() && ut1::isalnum_(match.suffix().str()[0])))
            {
                // Ignore match, return original string.
                return match.str();
            }
        }

        // Format according to rhs and return replacement string.
        std::string r = match.format(rule.rhs);
        if (preview)
        {
            r = escapeSequences.bold + r + escapeSequences.normal;
        }
        numMatches++;
        return r;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x1, 0x36(%rsi)
jne 0x10319
movq %r12, %rdi
xorl %esi, %esi
callq 0xdc62
testq %rax, %rax
je 0x10319
movq $0x0, (%rsp)
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x103fe
movq (%rbp), %rax
movsbl (%rax), %edi
callq 0x103eb
testb %al, %al
je 0x1025b
movq 0x8(%r12), %rsi
movq %rsi, %rax
subq (%r12), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
leaq -0x30(%rsi), %rcx
addq $-0x48, %rsi
cmpq $0x4, %rax
cmovaeq %rcx, %rsi
movq $0x0, (%rsp)
cmpb $0x1, 0x10(%rsi)
jne 0x1025b
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x1025b
leaq 0x28(%rsp), %rdi
callq 0x100d6
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movsbl -0x1(%rax,%rcx), %edi
callq 0x103eb
movb $0x1, %cl
movq %rcx, (%rsp)
movb $0x1, %bpl
testb %al, %al
jne 0x102f1
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x103fe
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movsbl -0x1(%rax,%rcx), %edi
callq 0x103eb
testb %al, %al
je 0x102df
movq 0x8(%r12), %rsi
movq %rsi, %rax
subq (%r12), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
leaq -0x18(%rsi), %rcx
addq $-0x48, %rsi
cmpq $0x4, %rax
cmovaeq %rcx, %rsi
xorl %ebp, %ebp
cmpb $0x1, 0x10(%rsi)
jne 0x102e1
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x102e1
leaq 0x68(%rsp), %rdi
callq 0x100d6
leaq 0x68(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x103eb
movl %eax, %ebp
leaq 0x68(%rsp), %rdi
callq 0x51f0
jmp 0x102e1
xorl %ebp, %ebp
leaq 0x8(%rsp), %rdi
callq 0x51f0
cmpb $0x0, (%rsp)
je 0x102fb
leaq 0x28(%rsp), %rdi
callq 0x51f0
leaq 0x48(%rsp), %rdi
callq 0x51f0
testb %bpl, %bpl
je 0x10319
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x103fe
jmp 0x10386
addq $0x20, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x1041e
cmpb $0x1, 0x9(%r15)
jne 0x10383
leaq 0xb8(%r15), %rsi
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x9fbf
addq $0xf8, %r15
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0xccc1
leaq 0x48(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5500
movq %r15, %rdi
callq 0x51f0
leaq 0x8(%rsp), %rdi
callq 0x51f0
incq (%r14)
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x51f0
jmp 0x103b2
movq %rax, %r14
jmp 0x103c2
movq %rax, %r14
cmpb $0x0, (%rsp)
je 0x103c2
leaq 0x28(%rsp), %rdi
callq 0x51f0
leaq 0x48(%rsp), %rdi
jmp 0x103de
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x51f0
jmp 0x103db
movq %rax, %r14
movq %rbx, %rdi
callq 0x51f0
movq %r14, %rdi
callq 0x5730