// File: /workspace/github_cpp_makefile_star2_O1/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, %r15
movl $0x18, %edi
callq 0x2190
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %ebx, %ebx
movq %rbx, 0x10(%rax)
movq %rax, (%r15)
leaq 0x8(%r15), %rdi
movq 0x5721(%rip), %rdx      # 0x7fc8
movq %rdi, -0x80(%rbp)
movq %rax, %rsi
callq 0x3422
leaq 0x10(%r15), %r14
leaq 0x18(%r15), %rax
movl $0x0, 0x18(%r15)
movq %rbx, 0x20(%r15)
movq %rax, 0x28(%r15)
movq %rax, 0x30(%r15)
movq %r15, -0x30(%rbp)
movq %rbx, 0x38(%r15)
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
movq %rbx, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x58(%rbp), %r12
leaq -0xa0(%rbp), %r15
movq -0x38(%rbp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %edx
movq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x22b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2a8d
movq -0x30(%rbp), %rax
movq (%rax), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3180
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq (%rax), %r13
movq 0x8(%rax), %rbx
leaq -0x220(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x8, %edx
callq 0x2270
subq %r13, %rbx
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
shlq $0x1b, %rbx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %rbx
sarq $0x20, %rbx
leaq -0x220(%rbp), %rdi
movq %r12, %rsi
callq 0x2200
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2a50
movq %r15, %rdi
movq %r12, %rsi
callq 0x2b3a
movq %r12, %rdi
movq %r15, %rsi
callq 0x21f0
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x29e3
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x31cc
movq %rax, %r13
cmpq $0x0, (%rax)
jne 0x2a38
movl $0x30, %edi
callq 0x2190
movq %rax, %rcx
addq $0x8, %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %r13, %rdi
movq %rax, %rsi
movq 0x5595(%rip), %rdx      # 0x7fc8
callq 0x324c
movq (%r13), %rdi
movq %rbx, -0xa0(%rbp)
movq %r15, %rsi
callq 0x3dea
jmp 0x298a
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x2a69
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq -0x220(%rbp), %rdi
movq 0x5541(%rip), %rsi      # 0x7fb8
callq 0x2220
leaq -0x1a8(%rbp), %rdi
callq 0x2090
jmp 0x28f1
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x2aa6
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21a0
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2aba
movq %rax, %rbx
jmp 0x2b00
jmp 0x2ac5
jmp 0x2ac5
jmp 0x2ac5
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x2ae1
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
movq 0x54d0(%rip), %rsi      # 0x7fb8
leaq -0x220(%rbp), %rdi
callq 0x2220
leaq -0x1a8(%rbp), %rdi
callq 0x2090
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x2b19
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x27c2
movq -0x80(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2b32
callq 0x2748
movq %rbx, %rdi
callq 0x2280