// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movq %r8, %rbp
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x1, 0x36(%rsi)
jne 0x14818
movq (%r12), %rcx
movq 0x8(%r12), %rdx
movq %rdx, %rax
subq %rcx, %rax
leaq -0x48(%rdx), %rsi
cmpq $0x48, %rax
movq %rcx, %rax
cmoveq %rsi, %rax
cmpq %rcx, %rdx
cmoveq %rsi, %rax
cmpb $0x1, 0x10(%rax)
jne 0x14818
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x14818
movq %rbp, 0x70(%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x149a2
movq (%rbp), %rax
movzbl (%rax), %ebp
movl %ebp, %edi
callq 0x5430
cmpl $0x5f, %ebp
je 0x14623
testl %eax, %eax
je 0x146b4
movq 0x8(%r12), %rax
movq %rax, %rcx
subq (%r12), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
leaq -0x30(%rax), %rcx
addq $-0x48, %rax
cmpq $0x4, %rdx
cmovaeq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
cmpq %rsi, %rdx
setne %cl
andb 0x10(%rax), %cl
cmpb $0x1, %cl
jne 0x146ab
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x50(%rsp), %rdi
callq 0x14508
movq 0x50(%rsp), %rbp
movq 0x58(%rsp), %rax
movzbl -0x1(%rbp,%rax), %r14d
movl %r14d, %edi
callq 0x5430
movb $0x1, %cl
movq %rcx, 0x8(%rsp)
cmpl $0x5f, %r14d
je 0x147bb
testl %eax, %eax
je 0x146b4
jmp 0x147bb
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x149a2
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %rax
movzbl -0x1(%rbp,%rax), %r14d
movl %r14d, %edi
callq 0x5430
cmpl $0x5f, %r14d
je 0x146e9
testl %eax, %eax
je 0x1478a
movq 0x8(%r12), %rax
movq %rax, %rcx
subq (%r12), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
leaq -0x18(%rax), %rcx
addq $-0x48, %rax
cmpq $0x4, %rdx
cmovaeq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
cmpq %rsi, %rdx
setne %cl
andb 0x10(%rax), %cl
cmpb $0x1, %cl
jne 0x1478a
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x78(%rsp), %rdi
callq 0x14508
movq 0x78(%rsp), %rbp
movzbl (%rbp), %edi
cmpl $0x5f, %edi
sete %r14b
callq 0x5430
testl %eax, %eax
setne %cl
leaq 0x88(%rsp), %rax
cmpq %rax, %rbp
je 0x14780
movq 0x88(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
movl %ecx, %ebp
callq 0x5410
movl %ebp, %ecx
orb %cl, %r14b
movq 0x10(%rsp), %rbp
jmp 0x1478d
xorl %r14d, %r14d
leaq 0x20(%rsp), %rax
cmpq %rax, %rbp
je 0x147a7
movq 0x20(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x5410
cmpb $0x0, 0x8(%rsp)
je 0x147d7
movq 0x50(%rsp), %rbp
movl %r14d, %eax
movq %rax, 0x8(%rsp)
leaq 0x60(%rsp), %rax
cmpq %rax, %rbp
je 0x147df
movq 0x60(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x5410
jmp 0x147df
movl %r14d, %eax
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x70(%rsp), %rbp
je 0x147ff
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5410
cmpb $0x0, 0x8(%rsp)
je 0x14818
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x149a2
jmp 0x148ec
addq $0x20, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x14a18
cmpb $0x1, 0x9(%r15)
jne 0x148e8
leaq 0xb8(%r15), %rsi
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
callq 0xbe76
movq 0xf8(%r15), %rsi
movq 0x100(%r15), %rdx
leaq 0x10(%rsp), %rdi
callq 0x5100
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1488a
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x14891
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5500
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x148cd
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5410
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x148e8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5410
incq (%rbp)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14929
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5410
jmp 0x14929
movq %rax, %r14
jmp 0x1494b
movq %rax, %r14
cmpb $0x0, 0x8(%rsp)
je 0x1494b
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1494b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5410
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1499a
movq 0x40(%rsp), %rsi
jmp 0x14992
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14983
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5410
jmp 0x14983
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x1499a
movq (%rbx), %rsi
incq %rsi
callq 0x5410
movq %r14, %rdi
callq 0x5720