// File: /workspace/github_cpp_makefile_star2_O1/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 0x6cf4
movq 0x6520(%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 0x6e2b
movl %eax, %r15d
testb %al, %al
je 0x50ec
movl $0x28, %edi
callq 0x31d0
movq %rax, %rbx
leaq 0x6156(%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 0x44e8
movq %rbx, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x565a
movl $0x28, %edi
callq 0x31d0
movq %rax, %rbx
leaq 0x610a(%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 0x44e8
movq %rbx, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x565a
movl $0x48, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
leaq -0x78(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x5304
movq %rbx, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rbx, %rsi
callq 0x54ec
movq -0xf8(%rbp), %r12
movq -0xf0(%rbp), %rbx
testq %rbx, %rbx
je 0x4bf1
movq 0x63dd(%rip), %rax      # 0xafc0
cmpb $0x0, (%rax)
je 0x4bed
incl 0x8(%rbx)
jmp 0x4bf1
lock
incl 0x8(%rbx)
movq -0xf0(%rbp), %rdi
testq %rdi, %rdi
je 0x4c02
callq 0x447c
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4c10
callq 0x447c
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x4c1e
callq 0x447c
movl $0x16, %edx
movq %r13, %rdi
leaq 0x2533(%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 0x4c7e
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 0x5e2a
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x5f89(%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 0x44e8
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x565a
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 0x4d68
callq 0x447c
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 0x4d8f
callq 0x447c
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x4d9d
callq 0x447c
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x4dab
callq 0x447c
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4dc4
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4dd2
callq 0x447c
movl $0x11, %edx
movq %r13, %rdi
leaq 0x2396(%rip), %rsi      # 0x7177
callq 0x3220
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x5e6e(%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 0x44e8
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x565a
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 0x4e6f
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 0x4ea4
callq 0x447c
movq %r13, %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5e2a
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x5da1(%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 0x44e8
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x565a
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 0x4f50
callq 0x447c
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 0x4f77
callq 0x447c
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x4f85
callq 0x447c
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x4f93
callq 0x447c
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4fac
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4fba
callq 0x447c
movl $0x11, %edx
movq %r13, %rdi
leaq 0x21ae(%rip), %rsi      # 0x7177
callq 0x3220
movl $0x28, %edi
callq 0x31d0
movq %rax, %r12
leaq 0x5c86(%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 0x44e8
movq %r12, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x565a
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 0x5057
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 0x508c
callq 0x447c
movq %r13, %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5e2a
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x50ac
callq 0x447c
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x50bd
callq 0x447c
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x50df
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x31e0
testq %rbx, %rbx
je 0x50ec
movq %rbx, %rdi
callq 0x447c
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x510e
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x5130
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x31e0
testb %r15b, %r15b
jne 0x4aa8
leaq -0x128(%rbp), %rbx
movq %rbx, %rdi
callq 0x570e
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x5156
callq 0x447c
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x51a4
jmp 0x51a4
jmp 0x524d
jmp 0x51fd
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x31e0
jmp 0x527c
movq %rax, %r14
movl $0x48, %esi
movq %rbx, %rdi
callq 0x31e0
jmp 0x522d
jmp 0x51a4
movq %rax, %r14
movl $0x28, %esi
movq %r12, %rdi
callq 0x31e0
jmp 0x5263
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x31e0
jmp 0x523b
movq %rax, %r14
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x526f
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x31e0
jmp 0x526f
jmp 0x52d4
jmp 0x524d
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5250
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31e0
jmp 0x5250
jmp 0x5260
jmp 0x5260
jmp 0x5260
jmp 0x5260
jmp 0x5246
movq %rax, %r14
jmp 0x523b
movq %rax, %r14
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x523b
callq 0x447c
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
jne 0x5277
jmp 0x527c
movq %rax, %r14
jmp 0x527c
jmp 0x524d
movq %rax, %r14
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x5263
callq 0x447c
jmp 0x5263
movq %rax, %r14
leaq -0xf8(%rbp), %rdi
callq 0x3d2a
testq %rbx, %rbx
je 0x527c
movq %rbx, %rdi
callq 0x447c
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x529e
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x31e0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x52c0
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x31e0
leaq -0x138(%rbp), %rdi
callq 0x52da
movq %r14, %rdi
callq 0x32e0
movq %rax, %r14
jmp 0x526f
nop