// File: /workspace/github_cpp_makefile_star2_O1/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 0xef90
movq (%r14), %rax
movslq 0x94(%rax), %rsi
leaq 0x10(%rsp), %rdi
callq 0xef90
movq 0x10(%r14), %rdi
callq 0x6550
movslq %eax, %rsi
movq (%r14), %rax
movslq 0x94(%rax), %rdx
leaq 0x30(%rsp), %rdi
callq 0xdd04
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x166d8
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 0x12bb5(%rip), %rdi     # 0x29ff0
leaq 0x8474(%rip), %rsi      # 0x1f8b6
movl $0x1b, %edx
callq 0x4350
movq 0x12b9d(%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 0x1b9e2
movq %r13, %rdi
callq 0xefcc
movq 0x12b52(%rip), %rdi     # 0x29fd8
movq %rbx, %rsi
callq 0x43d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba10
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11c28
movq %r13, %rdi
movq %rbp, %rsi
movss 0x7cbb(%rip), %xmm0     # 0x1f170
callq 0xf092
movq 0x12b17(%rip), %rdi     # 0x29fd8
movq %rbx, %rsi
callq 0x43d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba10
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11c28
movq %r13, %rdi
movq %rbp, %rsi
movss 0x8220(%rip), %xmm0     # 0x1f710
callq 0xf092
movq 0x12adc(%rip), %rdi     # 0x29fd8
movq %rbx, %rsi
callq 0x43d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba10
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11c28
movq %r13, %rdi
movq %rbp, %rsi
movss 0x7c45(%rip), %xmm0     # 0x1f170
callq 0xf092
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %r13, %rdx
movl 0xc(%rsp), %ecx
movq %r12, %r8
callq 0x16a72
movl $0x1b, %edx
movq %r15, %rdi
leaq 0x8360(%rip), %rsi      # 0x1f8b6
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 0x1746f
movq %rax, %rbx
leaq 0x58(%rsp), %r12
jmp 0x17594
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x1a1ba
jmp 0x175a3
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xdde0
jmp 0x175b2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xefba
jmp 0x175c1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xefba
jmp 0x175d0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x175e7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0
nop