// File: deadshot465[P]OwoifyCpp/./owoify.h
// Function: Word::replace(std::__cxx11::basic_regex<wchar_t, std::__cxx11::regex_traits<wchar_t>> const&, std::function<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> (std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&)>, bool)
Word& replace(const std::wregex& regex,
		const std::function<std::wstring(const std::wstring&, const std::wstring&)> func,
		bool replaceReplacedWords = false)
	{
		if (!std::regex_search(m_word, regex))
			return *this;

		auto match = std::wsmatch();
		std::regex_match(m_word, match, regex);
		auto replace_value = func(match[1], match[2]);

		if (!replaceReplacedWords &&
			searchValueContainsReplacedWords(regex, replace_value))
			return *this;

		auto replacing_word = m_word;

		if (std::regex_search(m_word, regex))
			replacing_word = std::regex_replace(m_word, regex, replace_value);

		auto begin = std::wsregex_iterator(m_word.cbegin(), m_word.cend(), regex);
		auto end = std::wsregex_iterator();
		auto replaced_words = std::vector<std::wstring>();

		for (auto i = begin; i != end; ++i)
		{
			replaced_words.emplace_back(std::regex_replace(i->str(), regex, replace_value));
		}

		if (replacing_word != m_word)
		{
			for (const auto& word : replaced_words)
			{
				m_replacedWords.emplace(word);
			}
			m_word = replacing_word;
		}

		return *this;
	}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdx, 0x30(%rsp)
movb %cl, %al
movq %rdi, 0x298(%rsp)
movq %rsi, 0x290(%rsp)
movq %rdx, 0x288(%rsp)
andb $0x1, %al
movb %al, 0x287(%rsp)
movq 0x298(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movq 0x290(%rsp), %rsi
xorl %edx, %edx
callq 0xdf30
testb $0x1, %al
jne 0x1d9b1
movq 0x38(%rsp), %rax
movq %rax, 0x2a0(%rsp)
jmp 0x1df74
leaq 0x260(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xefc0
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x290(%rsp), %rdx
xorl %ecx, %ecx
callq 0x1e040
jmp 0x1d9de
leaq 0x260(%rsp), %rdi
movl $0x1, %esi
callq 0x18370
movq %rax, 0x20(%rsp)
jmp 0x1d9f7
movq 0x20(%rsp), %rsi
leaq 0x210(%rsp), %rdi
callq 0x19cc0
jmp 0x1da0b
leaq 0x260(%rsp), %rdi
movl $0x2, %esi
callq 0x18370
movq %rax, 0x18(%rsp)
jmp 0x1da24
movq 0x18(%rsp), %rsi
leaq 0x1f0(%rsp), %rdi
callq 0x19cc0
jmp 0x1da38
movq 0x30(%rsp), %rsi
leaq 0x230(%rsp), %rdi
leaq 0x210(%rsp), %rdx
leaq 0x1f0(%rsp), %rcx
callq 0x1e0a0
jmp 0x1da5c
leaq 0x1f0(%rsp), %rdi
callq 0x6720
leaq 0x210(%rsp), %rdi
callq 0x6720
testb $0x1, 0x287(%rsp)
jne 0x1db49
movq 0x38(%rsp), %rdi
movq 0x290(%rsp), %rsi
leaq 0x230(%rsp), %rdx
callq 0xdeb0
movb %al, 0x17(%rsp)
jmp 0x1daa4
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x1dab1
jmp 0x1db49
movq 0x38(%rsp), %rax
movq %rax, 0x2a0(%rsp)
movl $0x1, 0x1ec(%rsp)
jmp 0x1df3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1df65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1db1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x6720
leaq 0x210(%rsp), %rdi
callq 0x6720
jmp 0x1df65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1df58
movq 0x38(%rsp), %rsi
leaq 0x1c8(%rsp), %rdi
callq 0x6410
jmp 0x1db5d
movq 0x38(%rsp), %rdi
movq 0x290(%rsp), %rsi
xorl %edx, %edx
callq 0xdf30
movb %al, 0x16(%rsp)
jmp 0x1db77
movb 0x16(%rsp), %al
testb $0x1, %al
jne 0x1db81
jmp 0x1dbe5
movq 0x38(%rsp), %rsi
movq 0x290(%rsp), %rdx
leaq 0x1a8(%rsp), %rdi
leaq 0x230(%rsp), %rcx
xorl %r8d, %r8d
callq 0xdf80
jmp 0x1dba8
leaq 0x1c8(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x6860
leaq 0x1a8(%rsp), %rdi
callq 0x6720
jmp 0x1dbe5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1df2d
movq 0x38(%rsp), %rdi
callq 0x6110
movq 0x38(%rsp), %rdi
movq %rax, 0x160(%rsp)
callq 0x6470
movq %rax, 0x158(%rsp)
movq 0x290(%rsp), %rcx
movq 0x160(%rsp), %rsi
movq 0x158(%rsp), %rdx
leaq 0x168(%rsp), %rdi
xorl %r8d, %r8d
callq 0xe070
jmp 0x1dc33
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xe1b0
jmp 0x1dc65
xorps %xmm0, %xmm0
movaps %xmm0, 0xf0(%rsp)
movq $0x0, 0x100(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xe200
leaq 0xb0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0xe210
jmp 0x1dca0
jmp 0x1dca2
leaq 0xb0(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0xe260
testb $0x1, %al
jne 0x1dd0a
movl $0x2, 0x1ec(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xe5e0
jmp 0x1ddfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1df20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1df06
leaq 0xb0(%rsp), %rdi
callq 0xe310
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0x70(%rsp), %rdi
callq 0xe320
jmp 0x1dd2a
movq 0x290(%rsp), %rdx
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x230(%rsp), %rcx
xorl %r8d, %r8d
callq 0xdf80
jmp 0x1dd51
leaq 0xf0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xe290
jmp 0x1dd68
leaq 0x90(%rsp), %rdi
callq 0x6720
leaq 0x70(%rsp), %rdi
callq 0x6720
leaq 0xb0(%rsp), %rdi
callq 0xe370
jmp 0x1dd8e
jmp 0x1dca2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1ddea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1dde0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6720
leaq 0x70(%rsp), %rdi
callq 0x6720
leaq 0xb0(%rsp), %rdi
callq 0xe5e0
jmp 0x1df06
movq 0x38(%rsp), %rsi
leaq 0x1c8(%rsp), %rdi
callq 0xe600
testb $0x1, %al
jne 0x1de17
jmp 0x1deb8
leaq 0xf0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0xe630
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rdi
callq 0xe660
movq %rax, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe690
testb $0x1, %al
jne 0x1de57
jmp 0x1dea2
leaq 0x60(%rsp), %rdi
callq 0xe6d0
movq 0x38(%rsp), %rdi
movq %rax, 0x50(%rsp)
addq $0x20, %rdi
movq 0x50(%rsp), %rsi
callq 0xe6e0
movb %dl, 0x7(%rsp)
movq %rax, 0x8(%rsp)
jmp 0x1de84
movb 0x7(%rsp), %al
movq 0x8(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movb %al, 0x48(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xe730
jmp 0x1de42
movq 0x38(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x6630
jmp 0x1deb6
jmp 0x1deb8
movq 0x38(%rsp), %rax
movq %rax, 0x2a0(%rsp)
movl $0x1, 0x1ec(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x9ef0
leaq 0x110(%rsp), %rdi
callq 0xe5e0
leaq 0x168(%rsp), %rdi
callq 0xe5e0
leaq 0x1c8(%rsp), %rdi
callq 0x6720
jmp 0x1df3c
leaq 0xf0(%rsp), %rdi
callq 0x9ef0
leaq 0x110(%rsp), %rdi
callq 0xe5e0
leaq 0x168(%rsp), %rdi
callq 0xe5e0
leaq 0x1c8(%rsp), %rdi
callq 0x6720
jmp 0x1df58
leaq 0x230(%rsp), %rdi
callq 0x6720
leaq 0x260(%rsp), %rdi
callq 0xf060
jmp 0x1df74
leaq 0x230(%rsp), %rdi
callq 0x6720
leaq 0x260(%rsp), %rdi
callq 0xf060
jmp 0x1df84
movq 0x2a0(%rsp), %rax
addq $0x2a8, %rsp            # imm = 0x2A8
retq
movq 0x258(%rsp), %rdi
callq 0x67b0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)