// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH15_ObjectOrientedProgramming/examples/and_orQueryTest.cc
// Function: main
int main(int argc, char **argv)
{
    // gets file to read and builds map to support queries
    TextQuery file = get_file(argc, argv);

    // iterate with the user: prompt for a word to find and print results
    while (true) {
        string sought1, sought2, sought3;
        if (!get_words(sought1, sought2)) break;
        cout << "\nenter third word: " ;
        cin  >> sought3;
        // find all the occurrences of the requested string
        Query q = Query(sought1) & Query(sought2) 
                             | Query(sought3);
        cout << "\nExecuting Query for: " << q << endl;
        const auto results = q.eval(file);
        // report matches
		print(cout, results);
     } 
     return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rdx
movl %edi, %esi
leaq -0x148(%rbp), %rdi
callq 0x6bb8
leaq -0x58(%rbp), %r12
leaq -0x38(%rbp), %r14
leaq -0xc8(%rbp), %r13
movq %r12, -0x68(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x60(%rbp)
movb %cl, -0x58(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %rcx, -0x80(%rbp)
movb %cl, -0x78(%rbp)
movq %r14, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movb %cl, -0x38(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x6cef
movl %eax, %ebx
testb %al, %al
je 0x4e41
movl $0x13, %edx
movq 0x64c8(%rip), %rdi      # 0xafc8
leaq 0x2649(%rip), %rsi      # 0x7150
callq 0x3220
movq 0x64c5(%rip), %rdi      # 0xafd8
leaq -0x48(%rbp), %rsi
callq 0x3250
movl $0x28, %edi
callq 0x31d0
movq %rax, %r14
leaq 0x6138(%rip), %rax      # 0xac68
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x8(%r14)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
callq 0x44e8
movq %r14, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
movq %r14, %rsi
callq 0x551c
movl $0x28, %edi
callq 0x31d0
movq %rax, %r14
leaq 0x60ec(%rip), %rax      # 0xac68
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x8(%r14)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
callq 0x44e8
movq %r14, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
movq %r14, %rsi
callq 0x551c
movl $0x48, %edi
callq 0x31d0
movq %rax, %r14
movq %rax, %rdi
leaq -0xf8(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
callq 0x530e
movq %r14, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
movq %r14, %rsi
callq 0x53ae
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %rax
movq %rcx, -0x108(%rbp)
movq %rax, -0x100(%rbp)
testq %rax, %rax
je 0x4c26
movq 0x63a8(%rip), %rcx      # 0xafc0
cmpb $0x0, (%rcx)
je 0x4c22
incl 0x8(%rax)
jmp 0x4c26
lock
incl 0x8(%rax)
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x4c37
callq 0x447c
movl $0x28, %edi
callq 0x31d0
movq %rax, %r14
leaq 0x601d(%rip), %rax      # 0xac68
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x8(%r14)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
callq 0x44e8
movq %r14, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
movq %r14, %rsi
callq 0x551c
movl $0x48, %edi
callq 0x31d0
movq %rax, %r14
movq %rax, %rdi
leaq -0x108(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x5072
movq %r14, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
movq %r14, %rsi
callq 0x525a
movq -0xc8(%rbp), %r12
movq -0xc0(%rbp), %r15
testq %r15, %r15
je 0x4ce6
movq 0x62ea(%rip), %rax      # 0xafc0
cmpb $0x0, (%rax)
je 0x4ce1
incl 0x8(%r15)
jmp 0x4ce6
lock
incl 0x8(%r15)
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x4cf7
callq 0x447c
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x4d08
callq 0x447c
movq -0x100(%rbp), %rdi
testq %rdi, %rdi
je 0x4d19
callq 0x447c
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x4d2a
callq 0x447c
movq -0xf0(%rbp), %rdi
testq %rdi, %rdi
je 0x4d3b
callq 0x447c
movl $0x16, %edx
movq 0x6281(%rip), %rdi      # 0xafc8
leaq 0x2416(%rip), %rsi      # 0x7164
callq 0x3220
movq (%r12), %rax
movq %r13, %rdi
movq %r12, %rsi
callq *0x18(%rax)
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq 0x6253(%rip), %rdi      # 0xafc8
callq 0x3220
movq %rax, %r14
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x4d9f
movq -0xb8(%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 (%r12), %rax
movq %r13, %r14
movq %r13, %rdi
movq %r12, %rsi
leaq -0x148(%rbp), %rdx
callq *0x10(%rax)
movq 0x61e4(%rip), %rdi      # 0xafc8
movq %r14, %rsi
leaq -0x58(%rbp), %r12
callq 0x5cee
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x4e01
callq 0x447c
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x4e12
callq 0x447c
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x4e34
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x31e0
testq %r15, %r15
je 0x4e41
movq %r15, %rdi
callq 0x447c
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %r14
cmpq %r14, %rdi
je 0x4e5a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4e76
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4e8b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31e0
testb %bl, %bl
jne 0x4ab0
leaq -0x138(%rbp), %rbx
movq %rbx, %rdi
callq 0x55d0
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4eb0
callq 0x447c
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
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 0x4f70
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x31e0
jmp 0x4f94
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x4fd9
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x31e0
jmp 0x4fd9
jmp 0x4fd6
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x31e0
jmp 0x4fea
movq %rax, %rbx
movl $0x48, %esi
movq %r14, %rdi
callq 0x31e0
jmp 0x4fa9
movq %rax, %rbx
movl $0x48, %esi
movq %r14, %rdi
callq 0x31e0
jmp 0x4f83
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x3d2a
jmp 0x4fd9
jmp 0x4fd1
movq %rax, %rbx
leaq -0x38(%rbp), %r13
jmp 0x4fbe
movq %rax, %rbx
jmp 0x4fa9
movq %rax, %rbx
jmp 0x4f94
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x4f94
callq 0x447c
movq -0x100(%rbp), %rdi
testq %rdi, %rdi
je 0x4fa5
callq 0x447c
leaq -0x58(%rbp), %r12
leaq -0x38(%rbp), %r13
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x4fbe
callq 0x447c
movq -0xf0(%rbp), %rdi
testq %rdi, %rdi
je 0x4fee
callq 0x447c
jmp 0x4fee
movq %rax, %rbx
jmp 0x4fea
movq %rax, %rbx
testq %r15, %r15
je 0x4fe6
movq %r15, %rdi
callq 0x447c
leaq -0x58(%rbp), %r12
leaq -0x38(%rbp), %r13
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x5003
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x501f
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x5034
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31e0
leaq -0x148(%rbp), %rdi
callq 0x5048
movq %rbx, %rdi
callq 0x32e0