// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_32.cc
// Function: print(std::ostream&, QueryResult const&)
ostream& print(ostream& os, const QueryResult& qr)
{
	os << qr.sought << " occurs " << qr.lines->size() << " "
		<< "time(s)" << endl;

	for (auto num : *qr.lines) {
		ConstStrBlobPtr p(qr.file, num + 1);
		os << "\t(line " << num + 1 << ") "
			<< p.deref() << 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 0x2200
movq %rax, %r15
leaq 0x1125(%rip), %rsi      # 0x403d
movl $0x8, %edx
movq %rax, %rdi
callq 0x2200
movq 0x20(%r14), %rax
movq 0x28(%rax), %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %r15
leaq 0x1118(%rip), %rsi      # 0x4057
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
leaq 0x10f3(%rip), %rsi      # 0x4046
movl $0x7, %edx
movq %r15, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
movq %rbx, %r15
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq %r14, -0x78(%rbp)
movq 0x20(%r14), %rcx
movq 0x18(%rcx), %rax
addq $0x8, %rcx
movq %rcx, -0x70(%rbp)
cmpq %rcx, %rax
je 0x3144
leaq -0x48(%rbp), %rbx
movq 0x20(%rax), %r13
movq -0x78(%rbp), %rcx
movq 0x30(%rcx), %rdx
movq %rdx, -0x68(%rbp)
movq 0x38(%rcx), %rcx
movq %rcx, -0x60(%rbp)
testq %rcx, %rcx
je 0x2fdd
movq 0x3fd9(%rip), %rdx      # 0x6fa8
cmpb $0x0, (%rdx)
je 0x2fd9
incl 0xc(%rcx)
jmp 0x2fdd
lock
incl 0xc(%rcx)
movq %rax, -0x80(%rbp)
incq %r13
movq %r13, -0x58(%rbp)
movl $0x7, %edx
movq %r15, %rdi
leaq 0x1057(%rip), %rsi      # 0x404e
callq 0x2200
movq %r15, %rdi
movq %r13, %rsi
callq 0x2120
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x103d(%rip), %rsi      # 0x4056
callq 0x2200
movq -0x58(%rbp), %r12
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x14, -0x50(%rbp)
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
xorl %edx, %edx
callq 0x22e0
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movups 0x1030(%rip), %xmm0     # 0x4083
movups %xmm0, (%rax)
movl $0x646e6520, 0x10(%rax) # imm = 0x646E6520
movq %rcx, -0x40(%rbp)
movq -0x48(%rbp), %rax
movb $0x0, (%rax,%rcx)
leaq -0x90(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movq %r12, %rdx
movq %rbx, %r14
movq %rbx, %rcx
callq 0x3750
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x309b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x58(%rbp), %r12
movq -0x90(%rbp), %rax
movq -0x88(%rbp), %rdi
movq (%rax), %rbx
testq %rdi, %rdi
je 0x30ba
callq 0x27c8
shlq $0x5, %r12
movq (%rbx,%r12), %rsi
movq 0x8(%rbx,%r12), %rdx
movq %r13, %rdi
callq 0x2200
movq %rax, %r12
movq %r14, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x3131
movq 0x3e9c(%rip), %rax      # 0x6fa8
cmpb $0x0, (%rax)
je 0x311c
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x3126
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x3131
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x80(%rbp), %rdi
callq 0x2210
cmpq -0x70(%rbp), %rax
jne 0x2fab
movq %r15, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3177
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x3177
movq %rax, %rbx
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x3185
callq 0x2330
movq %rbx, %rdi
callq 0x22d0
nop