// File: loverszhaokai[P]TypoCheck/src/typo.cc
// Function: init_typos(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void init_typos(const string &typos_file)
{
	fstream fs;

	fs.open(typos_file.c_str(), fstream::in);

	if (!fs.is_open()) {
		cout << "failed to read typos file[" << typos_file << "]" << endl;
		return;
	}

	string line;
	size_t index;

	while (getline(fs, line)) {
		if (line.size() != 0 && line[0] == '#')
			continue;
		index = line.find("||");
		insert_typo(line.substr(0, index), line.substr(index + 2));
	}

	fs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x8(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x2270
movq -0x8(%rbp), %rdi
callq 0x20d0
movq -0x298(%rbp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x21b0
jmp 0x2b61
leaq -0x218(%rbp), %rdi
callq 0x2300
movb %al, -0x299(%rbp)
jmp 0x2b75
movb -0x299(%rbp), %al
testb $0x1, %al
jne 0x2c11
jmp 0x2b85
movq 0x644c(%rip), %rdi      # 0x8fd8
leaq 0x34e5(%rip), %rsi      # 0x6078
callq 0x21c0
movq %rax, -0x2a8(%rbp)
jmp 0x2ba1
movq -0x2a8(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x21a0
movq %rax, -0x2b0(%rbp)
jmp 0x2bba
movq -0x2b0(%rbp), %rdi
leaq 0x34cb(%rip), %rsi      # 0x6093
callq 0x21c0
movq %rax, -0x2b8(%rbp)
jmp 0x2bd6
movq -0x2b8(%rbp), %rdi
movq 0x63e4(%rip), %rsi      # 0x8fc8
callq 0x2200
jmp 0x2beb
movl $0x1, -0x228(%rbp)
jmp 0x2dc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2de9
leaq -0x248(%rbp), %rdi
callq 0x22b0
leaq -0x218(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x2070
movq %rax, -0x2c0(%rbp)
jmp 0x2c39
movq -0x2c0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2290
movb %al, -0x2c1(%rbp)
jmp 0x2c57
movb -0x2c1(%rbp), %al
testb $0x1, %al
jne 0x2c66
jmp 0x2da4
leaq -0x248(%rbp), %rdi
callq 0x2140
cmpq $0x0, %rax
je 0x2cbc
xorl %eax, %eax
movl %eax, %esi
leaq -0x248(%rbp), %rdi
callq 0x2360
movq %rax, -0x2d0(%rbp)
jmp 0x2c91
movq -0x2d0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x2cbc
jmp 0x2c1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2ddd
leaq 0x33d2(%rip), %rsi      # 0x6095
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x2d8(%rbp)
leaq -0x248(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x2350
movq -0x2e0(%rbp), %rsi
movq -0x2d8(%rbp), %rdx
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rcx
leaq -0x270(%rbp), %rdi
callq 0x21f0
jmp 0x2d0b
movq -0x250(%rbp), %rdx
addq $0x2, %rdx
leaq -0x290(%rbp), %rdi
leaq -0x248(%rbp), %rsi
movq $-0x1, %rcx
callq 0x21f0
jmp 0x2d32
leaq -0x270(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x2e10
jmp 0x2d47
leaq -0x290(%rbp), %rdi
callq 0x2120
leaq -0x270(%rbp), %rdi
callq 0x2120
jmp 0x2c1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2d96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x2120
leaq -0x270(%rbp), %rdi
callq 0x2120
jmp 0x2ddd
leaq -0x218(%rbp), %rdi
callq 0x2040
jmp 0x2db2
leaq -0x248(%rbp), %rdi
callq 0x2120
movl $0x0, -0x228(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2080
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
leaq -0x248(%rbp), %rdi
callq 0x2120
leaq -0x218(%rbp), %rdi
callq 0x2080
movq -0x220(%rbp), %rdi
callq 0x2310
nopw %cs:(%rax,%rax)