// File: epfml[P]sent2vec/src/fasttext.cc
// Function: fasttext::FastText::saveVectors()
void FastText::saveVectors() {
  std::ofstream ofs(args_->output + ".vec");
  if (!ofs.is_open()) {
    std::cerr << "Error opening file for saving vectors." << std::endl;
    exit(EXIT_FAILURE);
  }
  ofs << dict_->nwords() << " " << args_->dim << std::endl;
  Vector vec(args_->dim);
  for (int32_t i = 0; i < dict_->nwords(); i++) {
    std::string word = dict_->getWord(i);
    getVector(vec, word);
    ofs << word << " " << vec << std::endl;
  }
  ofs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0xea70
movq %rax, %rsi
addq $0x40, %rsi
leaq 0x1b337(%rip), %rdx     # 0x43724
leaq -0x228(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x1f120
movq -0x278(%rbp), %rsi
leaq -0x208(%rbp), %rdi
movl $0x10, %edx
callq 0x5860
jmp 0x2841a
leaq -0x228(%rbp), %rdi
callq 0x58d8
leaq -0x208(%rbp), %rdi
callq 0x5350
movb %al, -0x281(%rbp)
jmp 0x2843a
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x284bb
jmp 0x28446
movq 0x36ba3(%rip), %rdi     # 0x5eff0
leaq 0x1b2d5(%rip), %rsi     # 0x43729
callq 0x5420
movq %rax, -0x290(%rbp)
jmp 0x28462
movq -0x290(%rbp), %rdi
movq 0x36b20(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x28477
movl $0x1, %edi
callq 0x54f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x58d8
jmp 0x28700
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x286f4
movq -0x280(%rbp), %rdi
addq $0x10, %rdi
callq 0x33af0
movq %rax, %rdi
callq 0x8540
movl %eax, -0x294(%rbp)
jmp 0x284db
movl -0x294(%rbp), %esi
leaq -0x208(%rbp), %rdi
callq 0x5770
movq %rax, -0x2a0(%rbp)
jmp 0x284f6
movq -0x2a0(%rbp), %rdi
leaq 0x1a6ad(%rip), %rsi     # 0x42bb1
callq 0x5420
movq %rax, -0x2a8(%rbp)
jmp 0x28512
movq -0x280(%rbp), %rdi
callq 0xea70
movq -0x2a8(%rbp), %rdi
movl 0x94(%rax), %esi
callq 0x5770
movq %rax, -0x2b0(%rbp)
jmp 0x28539
movq -0x2b0(%rbp), %rdi
movq 0x36a49(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x2854e
movq -0x280(%rbp), %rdi
callq 0xea70
movslq 0x94(%rax), %rsi
leaq -0x248(%rbp), %rdi
callq 0x20f90
jmp 0x2856f
movl $0x0, -0x24c(%rbp)
movq -0x280(%rbp), %rdi
movl -0x24c(%rbp), %eax
movl %eax, -0x2b8(%rbp)
addq $0x10, %rdi
callq 0x33af0
movq %rax, %rdi
callq 0x8540
movl %eax, -0x2b4(%rbp)
jmp 0x285a5
movl -0x2b8(%rbp), %eax
movl -0x2b4(%rbp), %ecx
cmpl %ecx, %eax
jge 0x286b9
movq -0x280(%rbp), %rdi
addq $0x10, %rdi
callq 0x33af0
movq %rax, %rsi
movl -0x24c(%rbp), %edx
leaq -0x270(%rbp), %rdi
callq 0x90b0
jmp 0x285e0
movq -0x280(%rbp), %rdi
leaq -0x248(%rbp), %rsi
leaq -0x270(%rbp), %rdx
callq 0x28260
jmp 0x285fc
leaq -0x208(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x53e0
movq %rax, -0x2c0(%rbp)
jmp 0x28618
movq -0x2c0(%rbp), %rdi
leaq 0x1a58b(%rip), %rsi     # 0x42bb1
callq 0x5420
movq %rax, -0x2c8(%rbp)
jmp 0x28634
movq -0x2c8(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x217d0
movq %rax, -0x2d0(%rbp)
jmp 0x28650
movq -0x2d0(%rbp), %rdi
movq 0x36932(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x28665
leaq -0x270(%rbp), %rdi
callq 0x58d8
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x28579
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x286e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x58d8
jmp 0x286e8
leaq -0x208(%rbp), %rdi
callq 0x5620
jmp 0x286c7
leaq -0x248(%rbp), %rdi
callq 0x20ff0
leaq -0x208(%rbp), %rdi
callq 0x5660
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
leaq -0x248(%rbp), %rdi
callq 0x20ff0
leaq -0x208(%rbp), %rdi
callq 0x5660
movq -0x230(%rbp), %rdi
callq 0x57a0
nopl (%rax)