// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH15_ObjectOrientedProgramming/examples/wordQueryTest.cc
// Function: main
int main(int argc, char **argv)
{
    TextQuery file = get_file(argc, argv);

    // iterate with the user: prompt for a word to find and print results
    do {
        string sought;
        if (!get_word(sought)) break;

        // find all the occurrences of the requested string
        // define synonym for the line_no set 
        Query name(sought);
        const auto results = name.eval(file);
        cout << "\nExecuting Query for: " << name << endl;

        // report no matches
        print(cout, results) << endl;
    } while (true);  // loop indefinitely; the exit is inside the loop
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rdx
movl %edi, %esi
leaq -0xf8(%rbp), %rdi
callq 0x6490
leaq -0x48(%rbp), %r15
leaq -0xb8(%rbp), %r12
movq 0x559d(%rip), %r13      # 0x9fc8
movq %r15, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6567
movl %eax, %ebx
testb %al, %al
je 0x4ba1
movl $0x28, %edi
callq 0x31d0
movq %rax, %r14
leaq 0x5206(%rip), %rax      # 0x9c68
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x8(%r14)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rsi, %rdx
callq 0x4486
movq %r14, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x4d56
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
movq %r12, %rdi
leaq -0xf8(%rbp), %rdx
callq *0x10(%rax)
movl $0x16, %edx
movq %r13, %rdi
leaq 0x2699(%rip), %rsi      # 0x7150
callq 0x3220
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x78(%rbp), %rdi
callq *0x18(%rax)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r13, %rdi
callq 0x3220
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4af6
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
movq (%r14), %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 %r13, %rdi
movq %r12, %rsi
callq 0x554c
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 -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x4b60
callq 0x441a
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x4b71
callq 0x441a
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x4b93
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4ba1
callq 0x441a
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x4bb6
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31e0
testb %bl, %bl
jne 0x4a2b
leaq -0xe8(%rbp), %rbx
movq %rbx, %rdi
callq 0x4e10
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4bdb
callq 0x441a
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x31e0
jmp 0x4c48
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4c2e
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
jmp 0x4c2e
movq %rax, %rbx
jmp 0x4c3a
jmp 0x4c26
movq %rax, %rbx
jmp 0x4c48
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x3cc8
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4c48
callq 0x441a
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x4c5d
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31e0
leaq -0xf8(%rbp), %rdi
callq 0x4c72
movq %rbx, %rdi
callq 0x32e0
nop