// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/exercises/TextQuery.cc
// Function: TextQuery::TextQuery(std::basic_ifstream<char, std::char_traits<char>>&)
TextQuery::TextQuery(ifstream& is):
					file(new vector<string>(), DebugDelete())
{
	string text;
	while (getline(is, text)) {
		file->push_back(text);
		int n = file->size() - 1;
		istringstream line(text);
		string word;
		while (line >> word) {
			word = cleanup_str(word);
			auto& lines = wm[word];
			if (lines == nullptr)
				lines.reset(new set<line_no>(), DebugDelete());
			lines->insert(n);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x2190
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq 0x480f(%rip), %rdx      # 0x6fc8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2f82
leaq 0x18(%rbx), %rax
andl $0x0, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
movq %rax, 0x28(%rbx)
movq %rax, 0x30(%rbx)
andq $0x0, 0x38(%rbx)
movq %rbx, -0x30(%rbp)
leaq 0x10(%rbx), %r14
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %r13
leaq -0xa0(%rbp), %rbx
movq -0x38(%rbp), %rdi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2943
movq -0x30(%rbp), %rax
movq (%rax), %rdi
leaq -0x80(%rbp), %r12
movq %r12, %rsi
callq 0x2de6
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %r15
leaq -0x220(%rbp), %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x2270
subq -0x40(%rbp), %r15
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
andq $0x0, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
shlq $0x1b, %r15
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r15
sarq $0x20, %r15
leaq -0x220(%rbp), %rdi
movq %r13, %rsi
callq 0x21f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2926
movq %rbx, %rdi
movq %r13, %rsi
callq 0x29aa
movq %r13, %rdi
movq %rbx, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
movq %r13, %rsi
callq 0x2e22
movq %rax, %r12
movq (%rax), %rdi
testq %rdi, %rdi
jne 0x2912
pushq $0x30
popq %rdi
callq 0x2190
movq %rax, %rcx
addq $0x8, %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %r12, %rdi
movq %rax, %rsi
movq 0x46bf(%rip), %rdx      # 0x6fc8
callq 0x2e8c
movq (%r12), %rdi
movq %r15, -0xa0(%rbp)
movq %rbx, %rsi
callq 0x3a4c
jmp 0x2881
movq %r13, %rdi
callq 0x20b0
leaq -0x220(%rbp), %rdi
callq 0x20c0
leaq -0x80(%rbp), %rsi
jmp 0x2805
leaq -0x80(%rbp), %rdi
callq 0x20b0
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2960
movq %rax, %rbx
jmp 0x2983
jmp 0x296b
jmp 0x296b
jmp 0x296b
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20b0
leaq -0x220(%rbp), %rdi
callq 0x20c0
leaq -0x80(%rbp), %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x26e6
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x2648
movq %rbx, %rdi
callq 0x2280
nop