// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH15_ObjectOrientedProgramming/examples/andQueryTest.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);

    do {
        string sought1, sought2;
        // stop if hit eof on input or a "q" is entered
        if (!get_words(sought1, sought2)) break;
    
        // find all the occurrences of the requested string
        Query andq = Query(sought1) & Query(sought2);
        cout << "\nExecuting query for: " << andq << endl;
        auto results = andq.eval(file);
        // report matches
        print(cout, results);
    
        results = Query(sought1).eval(file);
        cout << "\nExecuted query: " << Query(sought1) << endl;
        // report matches
        print(cout, results);
    
        results = Query(sought2).eval(file);
        cout << "\nExecuted query: " << Query(sought2) << endl;
        // report matches
        print(cout, results);
    } while(true);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rdx
movl %edi, %esi
leaq -0x138(%rbp), %rdi
callq 0x6c74
movq 0x65a8(%rip), %r13      # 0xafc8
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
xorl %ecx, %ecx
movq %rcx, -0xb0(%rbp)
movb %cl, -0xa8(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq %rcx, -0x90(%rbp)
movb %cl, -0x88(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x6dab
movl %eax, %r15d
testb %al, %al
je 0x5067
movl $0x28, %edi
callq 0x31d0
movq %rax, %rbx
leaq 0x61de(%rip), %rax      # 0xac68
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x8(%rbx)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x4486
movq %rbx, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x55d8
movl $0x28, %edi
callq 0x31d0
movq %rax, %rbx
leaq 0x6192(%rip), %rax      # 0xac68
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x8(%rbx)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
callq 0x4486
movq %rbx, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x55d8
movl $0x48, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
leaq -0x78(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x527e
movq %rbx, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rbx, %rsi
callq 0x546a
movq -0xf8(%rbp), %r12
movq -0xf0(%rbp), %rbx
testq %rbx, %rbx
je 0x4b7d
movq 0x6465(%rip), %rax      # 0xafc0
cmpb $0x0, (%rax)
je 0x4b68
incl 0x8(%rbx)
movq %rbx, %rdi
jmp 0x4b78
lock
incl 0x8(%rbx)
movq -0xf0(%rbp), %rdi
testq %rdi, %rdi
je 0x4b7d
callq 0x441a
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4b8b
callq 0x441a
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x4b99
callq 0x441a
movl $0x16, %edx
movq %r13, %rdi
leaq 0x25b8(%rip), %rsi      # 0x7160
callq 0x3220
movq (%r12), %rax
leaq -0xf8(%rbp), %rdi
movq %r12, %rsi
callq *0x18(%rax)
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
movq %r13, %rdi
callq 0x3220
movq %rax, %r14
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x4bf9
movq -0xe8(%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
leaq -0xf8(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
leaq -0x138(%rbp), %rdx
callq *0x10(%rax)
movq %r13, %rdi
movq %r14, %rsi
callq 0x5dcc
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x600e(%rip), %rax      # 0xac68
movq %rax, (%r12)
leaq 0x8(%r12), %rdi
movq %r12, %rax
addq $0x18, %rax
movq %rax, 0x8(%r12)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x4486
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x55d8
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x78(%rbp), %r14
movq %r14, %rdi
leaq -0x138(%rbp), %rdx
callq *0x10(%rax)
leaq -0xf8(%rbp), %rdi
movq %r14, %rsi
callq 0x3240
movups -0x58(%rbp), %xmm0
leaq -0x70(%rbp), %rax
xorps %xmm1, %xmm1
movups %xmm1, 0x18(%rax)
movq -0xd0(%rbp), %rdi
movups %xmm0, -0xd8(%rbp)
testq %rdi, %rdi
je 0x4ce3
callq 0x441a
movups -0x48(%rbp), %xmm0
leaq -0x70(%rbp), %rax
xorps %xmm1, %xmm1
movups %xmm1, 0x28(%rax)
movq -0xc0(%rbp), %rdi
movups %xmm0, -0xc8(%rbp)
testq %rdi, %rdi
je 0x4d18
callq 0x441a
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x4d18
callq 0x441a
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x4d26
callq 0x441a
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4d3f
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4d4d
callq 0x441a
movl $0x11, %edx
movq %r13, %rdi
leaq 0x241b(%rip), %rsi      # 0x7177
callq 0x3220
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x5ef3(%rip), %rax      # 0xac68
movq %rax, (%r12)
leaq 0x8(%r12), %rdi
movq %r12, %rax
addq $0x18, %rax
movq %rax, 0x8(%r12)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x4486
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x55d8
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 0x4dea
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 -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4e1f
callq 0x441a
movq %r13, %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5dcc
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x5e26(%rip), %rax      # 0xac68
movq %rax, (%r12)
leaq 0x8(%r12), %rdi
movq %r12, %rax
addq $0x18, %rax
movq %rax, 0x8(%r12)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
callq 0x4486
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x55d8
movq -0x38(%rbp), %rsi
movq (%rsi), %rax
leaq -0x78(%rbp), %r14
movq %r14, %rdi
leaq -0x138(%rbp), %rdx
callq *0x10(%rax)
leaq -0xf8(%rbp), %rdi
movq %r14, %rsi
callq 0x3240
movups -0x58(%rbp), %xmm0
leaq -0x70(%rbp), %rax
xorps %xmm1, %xmm1
movups %xmm1, 0x18(%rax)
movq -0xd0(%rbp), %rdi
movups %xmm0, -0xd8(%rbp)
testq %rdi, %rdi
je 0x4ecb
callq 0x441a
movups -0x48(%rbp), %xmm0
leaq -0x70(%rbp), %rax
xorps %xmm1, %xmm1
movups %xmm1, 0x28(%rax)
movq -0xc0(%rbp), %rdi
movups %xmm0, -0xc8(%rbp)
testq %rdi, %rdi
je 0x4f00
callq 0x441a
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x4f00
callq 0x441a
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x4f0e
callq 0x441a
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4f27
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4f35
callq 0x441a
movl $0x11, %edx
movq %r13, %rdi
leaq 0x2233(%rip), %rsi      # 0x7177
callq 0x3220
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x5d0b(%rip), %rax      # 0xac68
movq %rax, (%r12)
leaq 0x8(%r12), %rdi
movq %r12, %rax
addq $0x18, %rax
movq %rax, 0x8(%r12)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
callq 0x4486
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x55d8
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 0x4fd2
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 -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x5007
callq 0x441a
movq %r13, %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5dcc
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x5027
callq 0x441a
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x5038
callq 0x441a
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x505a
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x31e0
testq %rbx, %rbx
je 0x5067
movq %rbx, %rdi
callq 0x441a
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5089
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x50ab
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x31e0
testb %r15b, %r15b
jne 0x4a20
leaq -0x128(%rbp), %rbx
movq %rbx, %rdi
callq 0x5692
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x50d1
callq 0x441a
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x511f
jmp 0x511f
jmp 0x51c8
jmp 0x5178
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x31e0
jmp 0x51f7
movq %rax, %r14
movl $0x48, %esi
movq %rbx, %rdi
callq 0x31e0
jmp 0x51a8
jmp 0x511f
movq %rax, %r14
movl $0x28, %esi
movq %r12, %rdi
callq 0x31e0
jmp 0x51de
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x31e0
jmp 0x51b6
movq %rax, %r14
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x51ea
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x31e0
jmp 0x51ea
jmp 0x524f
jmp 0x51c8
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x51cb
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
jmp 0x51cb
jmp 0x51db
jmp 0x51db
jmp 0x51db
jmp 0x51db
jmp 0x51c1
movq %rax, %r14
jmp 0x51b6
movq %rax, %r14
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x51b6
callq 0x441a
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
jne 0x51f2
jmp 0x51f7
movq %rax, %r14
jmp 0x51f7
jmp 0x51c8
movq %rax, %r14
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x51de
callq 0x441a
jmp 0x51de
movq %rax, %r14
leaq -0xf8(%rbp), %rdi
callq 0x3cc8
testq %rbx, %rbx
je 0x51f7
movq %rbx, %rdi
callq 0x441a
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5219
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x523b
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x31e0
leaq -0x138(%rbp), %rdi
callq 0x5254
movq %r14, %rdi
callq 0x32e0
movq %rax, %r14
jmp 0x51ea