// File: 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
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x128(%rbp)
movq %rdi, %rax
movq %rax, -0x120(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
testb $0x1, 0x36(%rax)
je 0x26021
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1d3d0
cmpq $0x0, %rax
je 0x26021
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x138(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x26190
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
movb $0x0, -0x79(%rbp)
movb $0x0, -0xa1(%rbp)
movb $0x0, -0xc9(%rbp)
callq 0x7b50
movq %rax, -0x130(%rbp)
jmp 0x25db9
movq -0x130(%rbp), %rax
movsbl (%rax), %edi
callq 0x26150
testb $0x1, %al
jne 0x25dce
jmp 0x25e3e
movq -0x18(%rbp), %rdi
callq 0x1d2b0
movq %rax, -0x148(%rbp)
jmp 0x25de0
movq -0x148(%rbp), %rdi
callq 0x261e0
cmpq $0x0, %rax
je 0x25e3e
movq -0x18(%rbp), %rdi
callq 0x1d2b0
movq %rax, -0x150(%rbp)
jmp 0x25e04
movq -0x150(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x25a00
jmp 0x25e16
movb $0x1, -0x79(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x7490
movsbl (%rax), %edi
callq 0x26150
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x151(%rbp)
jne 0x25f1a
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0xa0(%rbp), %rdi
callq 0x26190
jmp 0x25e54
movb $0x1, -0xa1(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7490
movsbl (%rax), %edi
callq 0x26150
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x152(%rbp)
jne 0x25e83
jmp 0x25f0e
movq -0x18(%rbp), %rdi
callq 0x26250
movq %rax, -0x160(%rbp)
jmp 0x25e95
movq -0x160(%rbp), %rdi
callq 0x261e0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x152(%rbp)
je 0x25f0e
movq -0x18(%rbp), %rdi
callq 0x26250
movq %rax, -0x168(%rbp)
jmp 0x25ec4
movq -0x168(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x25a00
jmp 0x25ed9
movb $0x1, -0xc9(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0xc8(%rbp), %rdi
callq 0x7b50
movq %rax, -0x170(%rbp)
jmp 0x25ef9
movq -0x170(%rbp), %rax
movsbl (%rax), %edi
callq 0x26150
movb %al, -0x152(%rbp)
movb -0x152(%rbp), %al
movb %al, -0x151(%rbp)
movb -0x151(%rbp), %al
movb %al, -0x171(%rbp)
testb $0x1, -0xc9(%rbp)
jne 0x25f31
jmp 0x25f3d
leaq -0xc8(%rbp), %rdi
callq 0x73c0
testb $0x1, -0xa1(%rbp)
jne 0x25f48
jmp 0x25f54
leaq -0xa0(%rbp), %rdi
callq 0x73c0
testb $0x1, -0x79(%rbp)
jne 0x25f5c
jmp 0x25f65
leaq -0x78(%rbp), %rdi
callq 0x73c0
leaq -0x48(%rbp), %rdi
callq 0x73c0
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x25f7d
jmp 0x2601f
movq -0x128(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x26190
jmp 0x26128
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x26011
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x25ffe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x25fe5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
testb $0x1, -0xc9(%rbp)
jne 0x25fd7
jmp 0x25fe3
leaq -0xc8(%rbp), %rdi
callq 0x73c0
jmp 0x25fe5
testb $0x1, -0xa1(%rbp)
jne 0x25ff0
jmp 0x25ffc
leaq -0xa0(%rbp), %rdi
callq 0x73c0
jmp 0x25ffe
testb $0x1, -0x79(%rbp)
jne 0x26006
jmp 0x2600f
leaq -0x78(%rbp), %rdi
callq 0x73c0
jmp 0x26011
leaq -0x48(%rbp), %rdi
callq 0x73c0
jmp 0x26138
jmp 0x26021
movq -0x128(%rbp), %rdi
movb $0x0, -0xca(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x20, %rdx
xorl %ecx, %ecx
callq 0x262a0
movq -0x118(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x260ee
movq -0x128(%rbp), %rdx
movq -0x118(%rbp), %rsi
addq $0xb8, %rsi
leaq -0x110(%rbp), %rdi
callq 0x13da0
jmp 0x26076
movq -0x118(%rbp), %rdx
addq $0xf8, %rdx
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x1add0
jmp 0x26099
movq -0x128(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x7750
leaq -0xf0(%rbp), %rdi
callq 0x73c0
leaq -0x110(%rbp), %rdi
callq 0x73c0
jmp 0x260ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2611a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x73c0
jmp 0x2611a
movq -0x28(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movb $0x1, -0xca(%rbp)
testb $0x1, -0xca(%rbp)
jne 0x26118
movq -0x128(%rbp), %rdi
callq 0x73c0
jmp 0x26128
movq -0x128(%rbp), %rdi
callq 0x73c0
jmp 0x26138
movq -0x120(%rbp), %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x7a30
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)