// File: /workspace/github_cpp_makefile_star2_O3/epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::analogies(int)
void FastText::analogies(int32_t k) {
  std::string word;
  Vector buffer(args_->dim), query(args_->dim);
  Matrix wordVectors(dict_->nwords(), args_->dim);
  precomputeWordVectors(wordVectors);
  std::set<std::string> banSet;
  std::cerr << "Query triplet (A - B + C)? " << std::endl;
  while (true) {
    banSet.clear();
    query.zero();
    std::cin >> word;
    banSet.insert(word);
    getVector(buffer, word);
    query.addVector(buffer, 1.0);
    std::cin >> word;
    banSet.insert(word);
    getVector(buffer, word);
    query.addVector(buffer, -1.0);
    std::cin >> word;
    banSet.insert(word);
    getVector(buffer, word);
    query.addVector(buffer, 1.0);

    findNN(wordVectors, query, k, banSet);
    std::cerr << "Query triplet (A - B + C)? " << std::endl;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %r14
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq (%rdi), %rax
movslq 0x94(%rax), %rsi
leaq 0x20(%rsp), %rdi
callq 0xf1ac
movq (%r14), %rax
movslq 0x94(%rax), %rsi
leaq 0x10(%rsp), %rdi
callq 0xf1ac
movq 0x10(%r14), %rdi
callq 0x6554
movslq %eax, %rsi
movq (%r14), %rax
movslq 0x94(%rax), %rdx
leaq 0x30(%rsp), %rdi
callq 0xdf88
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x167c0
leaq 0x70(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x12ac1(%rip), %rdi     # 0x29ff0
leaq 0x8390(%rip), %rsi      # 0x1f8c6
movl $0x1b, %edx
callq 0x4350
movq 0x12aa9(%rip), %r15     # 0x29ff0
movq %r15, %rdi
callq 0x4170
leaq 0x68(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x48(%rsp), %rbx
leaq 0x20(%rsp), %rbp
movq %r12, %rdi
callq 0x1ba34
movq %r13, %rdi
callq 0xf1e8
movq 0x12a5e(%rip), %rdi     # 0x29fd8
movq %rbx, %rsi
callq 0x43d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba62
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11c60
movq %r13, %rdi
movq %rbp, %rsi
movss 0x7bdf(%rip), %xmm0     # 0x1f188
callq 0xf2ae
movq 0x12a23(%rip), %rdi     # 0x29fd8
movq %rbx, %rsi
callq 0x43d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba62
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11c60
movq %r13, %rdi
movq %rbp, %rsi
movss 0x813c(%rip), %xmm0     # 0x1f720
callq 0xf2ae
movq 0x129e8(%rip), %rdi     # 0x29fd8
movq %rbx, %rsi
callq 0x43d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba62
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11c60
movq %r13, %rdi
movq %rbp, %rsi
movss 0x7b69(%rip), %xmm0     # 0x1f188
callq 0xf2ae
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %r13, %rdx
movl 0xc(%rsp), %ecx
movq %r12, %r8
callq 0x16b66
movl $0x1b, %edx
movq %r15, %rdi
leaq 0x827c(%rip), %rsi      # 0x1f8c6
callq 0x4350
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4200
jmp 0x17563
movq %rax, %rbx
leaq 0x58(%rsp), %r12
jmp 0x17688
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x1a262
jmp 0x17697
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe05a
jmp 0x176a6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xf1d6
jmp 0x176b5
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xf1d6
jmp 0x176c4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x176db
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0
nop