// File: /workspace/github_cpp_makefile_star2_O1/ahupp[P]mural/mural_server.cpp
// Function: handle_one_query(std::vector<TagInfo, std::allocator<TagInfo>> const&)
void handle_one_query(const vector<TagInfo>& tags) {

  string query;
  getline(cin, query);
  if (!query.length()) {
    cout << "DONE" << endl;
    return;
  }

  Timer t;
  vector<TagInfo> matches = find_best_fuzzy_matches(tags, query, 32);

  for (size_t i = 0; i < matches.size(); ++i) {
    const TagInfo& match = matches[i];
    cout << "MATCH\t"
         << match.symbol << "\t"
         << match.file << "\t"
         << match.row << endl;;
  }
  cout << "DONE " << t.elapsedMS() << "ms "
       << "#match: " << matches.size() << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x59ef(%rip), %rdi      # 0x7fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %edx
movq 0x59d4(%rip), %rdi      # 0x7fd8
leaq 0x18(%rsp), %rsi
callq 0x2370
cmpq $0x0, 0x20(%rsp)
je 0x2813
leaq 0x38(%rsp), %rsi
movl $0x1, %edi
callq 0x21a0
movq %rsp, %rdi
leaq 0x18(%rsp), %rdx
movl $0x20, %ecx
movq %rbx, %rsi
callq 0x2ecb
movq (%rsp), %r14
cmpq %r14, 0x8(%rsp)
je 0x2725
movl $0x60, %r13d
xorl %ebp, %ebp
movq 0x596c(%rip), %rbx      # 0x7fc8
leaq 0x29ab(%rip), %r15      # 0x500e
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x2997(%rip), %rsi      # 0x5009
callq 0x2230
movq -0x60(%r14,%r13), %rsi
movq -0x58(%r14,%r13), %rdx
movq %rbx, %rdi
callq 0x2230
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2230
movq -0x20(%r14,%r13), %rsi
movq -0x18(%r14,%r13), %rdx
movq %r12, %rdi
callq 0x2230
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2230
movl (%r14,%r13), %esi
movq %r12, %rdi
callq 0x2310
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
incq %rbp
movq (%rsp), %r14
movq 0x8(%rsp), %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx, %rax
addq $0x68, %r13
cmpq %rax, %rbp
jb 0x2663
movq 0x589c(%rip), %rdi      # 0x7fc8
leaq 0x28dd(%rip), %rsi      # 0x5010
movl $0x5, %edx
callq 0x2230
leaq 0x48(%rsp), %rbx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x21a0
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq 0x38(%rsp), %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
subq 0x40(%rsp), %rax
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
imulq %rdx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x12, %rdx
addq %rdx, %rsi
addq %rcx, %rsi
movq 0x583c(%rip), %rdi      # 0x7fc8
callq 0x21b0
movq %rax, %rbx
leaq 0x287b(%rip), %rsi      # 0x5016
movl $0x3, %edx
movq %rax, %rdi
callq 0x2230
leaq 0x286b(%rip), %rsi      # 0x501a
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2230
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x3, %rsi
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x2120
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
movq %rsp, %rdi
callq 0x2bb4
jmp 0x2859
movq 0x57ae(%rip), %rbx      # 0x7fc8
leaq 0x27e3(%rip), %rsi      # 0x5004
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq 0x577c(%rip), %rdi      # 0x7fc8
callq 0x2040
movq %rax, %rdi
callq 0x2130
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2875
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2886
movq %rax, %rbx
jmp 0x2898
jmp 0x288d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2bb4
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x28b4
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330