// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorl %edx, %edx
callq 0x9805
testb %al, %al
je 0xdd43
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xde1d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
pushq $0x18
popq %rbx
subq %rsi, %rcx
je 0xdac4
movq %rcx, %rax
cqto
idivq %rbx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xdac4
addq $0x18, %rsi
jmp 0xdacb
addq %rcx, %rsi
addq $-0x48, %rsi
leaq 0x90(%rsp), %rdi
callq 0xc984
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
subq %rsi, %rcx
je 0xdaff
movq %rcx, %rax
cqto
idivq %rbx
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xdaff
addq $0x30, %rsi
jmp 0xdb06
addq %rcx, %rsi
addq $-0x48, %rsi
leaq 0xd0(%rsp), %rdi
callq 0xc984
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rdx
leaq 0xd0(%rsp), %rcx
movq %r15, %rsi
callq 0xde3a
leaq 0xd0(%rsp), %rdi
callq 0x5060
leaq 0x90(%rsp), %rdi
callq 0x5060
testb %bpl, %bpl
jne 0xdb69
leaq 0x70(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x97f4
testb %al, %al
jne 0xdd2a
leaq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x52c0
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x9805
testb %al, %al
je 0xdbc6
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rcx
movq 0x8(%rsp), %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x981d
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rbx
movq %rbx, %rsi
callq 0x5520
movq %rbx, %rdi
callq 0x5060
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rax
leaq (%rsi,%rax,4), %rdx
leaq 0x90(%rsp), %rdi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x986e
leaq 0xf0(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movaps %xmm0, -0x10(%rax)
movaps %xmm0, -0x20(%rax)
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x9902
leaq 0x118(%rsp), %r13
leaq 0x158(%rsp), %r15
leaq 0x178(%rsp), %rbx
leaq 0x70(%rsp), %r12
leaq 0x10(%rsp), %rbp
movq %r13, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x991e
testb %al, %al
je 0xdca4
movq %r15, %rdi
leaq 0x138(%rsp), %rsi
xorl %edx, %edx
callq 0x9964
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x981d
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x9928
movq %rbx, %rdi
callq 0x5060
movq %r15, %rdi
callq 0x5060
movq %r13, %rdi
callq 0x9984
jmp 0xdc45
leaq 0x138(%rsp), %rdi
callq 0xa15a
leaq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x9a61
testb %al, %al
je 0xdcfc
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r15
movq 0x8(%rsp), %rax
leaq 0x20(%rax), %r14
cmpq %r15, %rbx
je 0xdced
movq %r14, %rdi
movq %rbx, %rsi
callq 0xca2c
addq $0x20, %rbx
jmp 0xdcd7
leaq 0x50(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x5420
leaq 0x10(%rsp), %rdi
callq 0x775c
leaq 0xf0(%rsp), %rdi
callq 0xa15a
leaq 0xb0(%rsp), %rdi
callq 0xa15a
leaq 0x50(%rsp), %rdi
callq 0x5060
leaq 0x70(%rsp), %rdi
callq 0x5060
leaq 0x30(%rsp), %rdi
callq 0xa15a
movq 0x8(%rsp), %rbx
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdd98
jmp 0xdd62
jmp 0xdd6a
jmp 0xdd98
jmp 0xdd62
movq %rax, %rbx
jmp 0xddf7
movq %rax, %rbx
jmp 0xde01
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x5060
jmp 0xdd87
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0xde06
jmp 0xdd93
movq %rax, %rbx
jmp 0xde0b
movq %rax, %rbx
jmp 0xddd3
jmp 0xddb1
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x5060
jmp 0xddb9
movq %rax, %rbx
jmp 0xddc6
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x5060
leaq 0x138(%rsp), %rdi
callq 0xa15a
leaq 0x10(%rsp), %rdi
callq 0x775c
leaq 0xf0(%rsp), %rdi
callq 0xa15a
leaq 0xb0(%rsp), %rdi
callq 0xa15a
leaq 0x50(%rsp), %rdi
callq 0x5060
leaq 0x70(%rsp), %rdi
callq 0x5060
leaq 0x30(%rsp), %rdi
callq 0xa15a
movq %rbx, %rdi
callq 0x54a0