// File: /workspace/github_cpp_makefile_star2_O1/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 0x111d(%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 0x1110(%rip), %rsi      # 0x4057
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
leaq 0x10eb(%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 0x314c
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 0x2fe5
movq 0x3fd1(%rip), %rdx      # 0x6fa8
cmpb $0x0, (%rdx)
je 0x2fe1
incl 0xc(%rcx)
jmp 0x2fe5
lock
incl 0xc(%rcx)
movq %rax, -0x80(%rbp)
incq %r13
movq %r13, -0x58(%rbp)
movl $0x7, %edx
movq %r15, %rdi
leaq 0x104f(%rip), %rsi      # 0x404e
callq 0x2200
movq %r15, %rdi
movq %r13, %rsi
callq 0x2120
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1035(%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 0x1028(%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 0x378e
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x30a3
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 0x30c2
callq 0x27e8
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 0x3139
movq 0x3e94(%rip), %rax      # 0x6fa8
cmpb $0x0, (%rax)
je 0x3124
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x312e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x3139
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x80(%rbp), %rdi
callq 0x2210
cmpq -0x70(%rbp), %rax
jne 0x2fb3
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 0x317f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x317f
movq %rax, %rbx
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x318d
callq 0x2336
movq %rbx, %rdi
callq 0x22d0
nop