// File: /workspace/github_cpp_makefile_star2_O1/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 $0xb8, %rsp
movq %r8, %rbp
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x1, 0x36(%rsi)
jne 0x14872
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 0x14872
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x14872
movq %rbp, 0x50(%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x14a20
movq (%rbp), %rax
movzbl (%rax), %ebp
movl %ebp, %edi
callq 0x5430
cmpl $0x5f, %ebp
je 0x14656
testl %eax, %eax
jne 0x14656
leaq 0x78(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x14a20
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rcx
movzbl -0x1(%rax,%rcx), %ebp
movl %ebp, %edi
callq 0x5430
movb $0x1, %r14b
cmpl $0x5f, %ebp
je 0x146d9
testl %eax, %eax
jne 0x146d9
xorl %ecx, %ecx
xorl %ebp, %ebp
jmp 0x147d4
movq 0x8(%r12), %rax
movq %rax, %rcx
subq (%r12), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq $0x4, %rdx
movq $-0x48, %rdx
movq $-0x30, %rcx
cmovbq %rdx, %rcx
movq $0x0, 0x8(%rsp)
cmpb $0x1, 0x10(%rax,%rcx)
jne 0x14611
movq (%rax,%rcx), %rdx
cmpq %rdx, 0x8(%rax,%rcx)
je 0x14611
cmpb $0x1, 0x10(%rax,%rcx)
jne 0x1474d
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x30(%rsp), %rdi
callq 0x14500
jmp 0x14761
movq 0x8(%r12), %rax
movq %rax, %rcx
subq (%r12), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq $0x4, %rdx
movq $-0x48, %rcx
movq $-0x18, %rdx
cmovbq %rcx, %rdx
xorl %ecx, %ecx
cmpb $0x1, 0x10(%rax,%rdx)
jne 0x1464f
movq (%rax,%rdx), %rsi
cmpq %rsi, 0x8(%rax,%rdx)
je 0x1464f
cmpb $0x1, 0x10(%rax,%rdx)
leaq 0x68(%rsp), %rcx
jne 0x14798
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %rdx
leaq 0x58(%rsp), %rdi
movq %rcx, (%rdi)
callq 0x14500
jmp 0x147ab
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movzbl -0x1(%rax,%rcx), %ebp
movl %ebp, %edi
callq 0x5430
xorl %r14d, %r14d
movb $0x1, %cl
movq %rcx, 0x8(%rsp)
cmpl $0x5f, %ebp
je 0x147cf
movl $0x0, %ecx
movb $0x1, %bpl
testl %eax, %eax
je 0x14611
jmp 0x147d4
movq %rcx, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movb $0x0, 0x68(%rsp)
movq 0x58(%rsp), %rax
movzbl (%rax), %edi
cmpl $0x5f, %edi
sete %r14b
callq 0x5430
testl %eax, %eax
setne %bpl
orb %r14b, %bpl
movb $0x1, %r14b
movb $0x1, %cl
jmp 0x147d4
xorl %ecx, %ecx
movb $0x1, %bpl
testb %cl, %cl
je 0x147f3
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x147f3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5410
testb %r14b, %r14b
je 0x14819
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14819
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x5410
cmpb $0x0, 0x8(%rsp)
je 0x1483b
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1483b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5410
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14856
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5410
testb %bpl, %bpl
movq 0x50(%rsp), %rbp
je 0x14872
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x14a20
jmp 0x14952
addq $0x20, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x14a9a
cmpb $0x1, 0x9(%r15)
jne 0x1494e
leaq 0xb8(%r15), %rsi
leaq 0x98(%rsp), %rdi
movq %rbx, %rdx
callq 0xbe4c
movq 0xf8(%r15), %rsi
movq 0x100(%r15), %rdx
leaq 0x98(%rsp), %rdi
callq 0x5100
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x148ea
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x148f1
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5500
movq (%r15), %rdi
cmpq %r14, %rdi
je 0x1492d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5410
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1494e
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x5410
incq (%rbp)
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1499c
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x5410
jmp 0x1499c
movq %rax, %r14
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0x149be
movq %rax, %r14
cmpb $0x0, 0x8(%rsp)
je 0x149be
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x149be
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5410
cmpb $0x0, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14a18
movq 0x20(%rsp), %rsi
jmp 0x14a10
movq %rax, %r14
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14a01
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x5410
jmp 0x14a01
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x14a18
movq (%rbx), %rsi
incq %rsi
callq 0x5410
movq %r14, %rdi
callq 0x5720