// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/TextQuery.cc
// Function: print(std::ostream&, QueryResult const&)
ostream &print(ostream& os, const QueryResult& qr)
{
    // if the word was found, print the count and all occurrences
    os << qr.sought << " occurs " << qr.lines->size() << " "
       << make_plural(qr.lines->size(), "time", "s") << endl;

    // print each line in which the word appeared
	for (auto num : *qr.lines) // for every element in the set
		// don't confound the user with text lines starting at 0
        os << "\t(line " << num + 1 << ") "
		   << *(qr.file->begin() + num) << endl;

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
callq 0x3220
movq %rax, %r15
leaq 0x1c37(%rip), %rsi      # 0x71b0
movl $0x8, %edx
movq %rax, %rdi
callq 0x3220
movq 0x20(%r14), %rax
movq 0x28(%rax), %rsi
movq %r15, %rdi
callq 0x3130
movq %rax, %r15
leaq 0x1c29(%rip), %rsi      # 0x71c9
movl $0x1, %edx
movq %rax, %rdi
callq 0x3220
movq %r14, %r12
movq 0x20(%r14), %rax
movq 0x28(%rax), %r13
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1bf2(%rip), %rsi      # 0x71b9
leaq 0x1bef(%rip), %rdx      # 0x71bd
leaq -0x48(%rbp), %rdi
callq 0x5e24
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1bd8(%rip), %rsi      # 0x71be
leaq 0x1bd2(%rip), %rdx      # 0x71bf
leaq -0x90(%rbp), %rdi
callq 0x5e24
cmpq $0x2, %r13
jb 0x5615
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x5a57
jmp 0x5631
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x4486
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x3220
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5684
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x569c
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x56b5
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31e0
movq %r12, -0x70(%rbp)
movq 0x20(%r12), %r12
movq 0x18(%r12), %r15
addq $0x8, %r12
cmpq %r12, %r15
je 0x5769
movq 0x20(%r15), %r13
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x1add(%rip), %rsi      # 0x71c0
callq 0x3220
leaq 0x1(%r13), %rsi
movq %rbx, %rdi
callq 0x3130
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1ac2(%rip), %rsi      # 0x71c8
callq 0x3220
movq -0x70(%rbp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rax
shlq $0x5, %r13
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r14, %rdi
callq 0x3220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq %r15, %rdi
callq 0x3230
movq %rax, %r15
cmpq %r12, %rax
jne 0x56d0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x57a1
movq %rax, %rbx
jmp 0x57b9
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57a1
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x57b9
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x57d2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31e0
movq %rbx, %rdi
callq 0x32e0