// File: /workspace/github_cpp_makefile_star2_O2/loverszhaokai[P]TypoCheck/src/typo.cc
// Function: search_typo_per_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int search_typo_per_file(const string &file)
{
	fstream fs;

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

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

	string line;
	size_t index;

	while (getline(fs, line)) {
		search_typo_per_line(line);
	}

	fs.close();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
leaq -0x270(%rbp), %r14
movq %r14, %rdi
callq 0x21c0
movq (%rbx), %rsi
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x2160
leaq -0x1f0(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x2a93
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x3849(%rip), %rbx      # 0x6158
leaq -0x270(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2acd
andq $0x0, -0x50(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movq %rbx, %r12
xorl %r15d, %r15d
movslq %r15d, %r15
cmpq %r15, -0x40(%rbp)
jbe 0x2a14
movq -0x48(%rbp), %rax
movsbq (%rax,%r15), %rax
leaq 0x3860(%rip), %rcx      # 0x61c0
cmpb $-0x1, (%rax,%rcx)
jne 0x29e2
testb $0x1, %r14b
je 0x29d7
leaq 0x28(%r12), %r13
movq %r13, %rdi
leaq 0x1757(%rip), %rsi      # 0x40d2
callq 0x304b
testb %al, %al
je 0x29d7
movq 0x364d(%rip), %rdi      # 0x5fd8
leaq 0x171e(%rip), %rsi      # 0x40b0
callq 0x2170
addq $0x8, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x170c(%rip), %rsi      # 0x40bc
callq 0x2170
movq %rax, %rdi
movq %r13, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x1707(%rip), %rsi      # 0x40d1
callq 0x2170
movq %rax, %rdi
callq 0x20e0
incq %r15
movq %rbx, %r12
jmp 0x2946
addq $0x48, %r12
movq %r12, %rcx
movq (%rcx), %rcx
cmpq %r12, %rcx
je 0x29fa
movb 0x10(%rcx), %dl
cmpb %al, %dl
je 0x2a02
jle 0x29e9
xorl %r14d, %r14d
movq %rbx, %r12
jmp 0x2a0c
addq $0x10, %rcx
movb $0x1, %r14b
movq %rcx, %r12
incq %r15
jmp 0x2943
testb $0x1, %r14b
je 0x2a85
leaq 0x28(%r12), %r13
movq %r13, %rdi
leaq 0x16a9(%rip), %rsi      # 0x40d2
callq 0x304b
testb %al, %al
je 0x2a85
movq 0x359f(%rip), %rdi      # 0x5fd8
leaq 0x1670(%rip), %rsi      # 0x40b0
callq 0x2170
addq $0x8, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x165e(%rip), %rsi      # 0x40bc
callq 0x2170
movq %rax, %rdi
movq %r13, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x1659(%rip), %rsi      # 0x40d1
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq -0x60(%rbp), %rdi
callq 0x3204
jmp 0x290f
movq 0x353e(%rip), %rdi      # 0x5fd8
leaq 0x15ef(%rip), %rsi      # 0x4090
callq 0x2170
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2150
leaq 0x15f3(%rip), %rsi      # 0x40ab
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
pushq $-0x1
popq %rbx
jmp 0x2ae4
leaq -0x270(%rbp), %rdi
callq 0x2030
leaq -0x48(%rbp), %rdi
callq 0x20d0
xorl %ebx, %ebx
leaq -0x270(%rbp), %rdi
callq 0x2060
movl %ebx, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b0b
movq %rax, %rbx
jmp 0x2b27
movq %rax, %rbx
jmp 0x2b1e
jmp 0x2b12
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x3204
leaq -0x48(%rbp), %rdi
callq 0x20d0
leaq -0x270(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2200