// File: /workspace/github_cpp_makefile_star2_O1/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 0x6510
leaq -0x48(%rbp), %r15
leaq -0xb8(%rbp), %r12
movq 0x5515(%rip), %r13      # 0x9fc8
movq %r15, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x65e7
movl %eax, %ebx
testb %al, %al
je 0x4c29
movl $0x28, %edi
callq 0x31d0
movq %rax, %r14
leaq 0x517e(%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 0x44e8
movq %r14, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x4dde
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
movq %r12, %rdi
leaq -0xf8(%rbp), %rdx
callq *0x10(%rax)
movl $0x16, %edx
movq %r13, %rdi
leaq 0x2611(%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 0x4b7e
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 0x55ae
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 0x4be8
callq 0x447c
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x4bf9
callq 0x447c
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x4c1b
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4c29
callq 0x447c
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x4c3e
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31e0
testb %bl, %bl
jne 0x4ab3
leaq -0xe8(%rbp), %rbx
movq %rbx, %rdi
callq 0x4e92
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c63
callq 0x447c
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 0x4cd0
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4cb6
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
jmp 0x4cb6
movq %rax, %rbx
jmp 0x4cc2
jmp 0x4cae
movq %rax, %rbx
jmp 0x4cd0
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x3d2a
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4cd0
callq 0x447c
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x4ce5
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31e0
leaq -0xf8(%rbp), %rdi
callq 0x4cfa
movq %rbx, %rdi
callq 0x32e0
nop