// File: /workspace/github_cpp_makefile_star2_O1/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 0x1bd5(%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 0x1bc7(%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 0x1b90(%rip), %rsi      # 0x71b9
leaq 0x1b8d(%rip), %rdx      # 0x71bd
leaq -0x48(%rbp), %rdi
callq 0x5ea4
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1b76(%rip), %rsi      # 0x71be
leaq 0x1b70(%rip), %rdx      # 0x71bf
leaq -0x90(%rbp), %rdi
callq 0x5ea4
cmpq $0x2, %r13
jb 0x5677
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x5ab9
jmp 0x5693
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x44e8
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 0x56e6
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x56fe
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5717
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 0x57cb
movq 0x20(%r15), %r13
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x1a7b(%rip), %rsi      # 0x71c0
callq 0x3220
leaq 0x1(%r13), %rsi
movq %rbx, %rdi
callq 0x3130
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1a60(%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 0x5732
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5803
movq %rax, %rbx
jmp 0x581b
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5803
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x581b
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5834
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31e0
movq %rbx, %rdi
callq 0x32e0