// File: epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::saveOutput()
void FastText::saveOutput() {
  std::ofstream ofs(args_->output + ".output");
  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);
    vec.zero();
    vec.addRow(*output_, i);
    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 0xe6e0
movq %rax, %rsi
addq $0x40, %rsi
leaq 0x1aebd(%rip), %rdx     # 0x436ea
leaq -0x228(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x1ed90
movq -0x278(%rbp), %rsi
leaq -0x208(%rbp), %rdi
movl $0x10, %edx
callq 0x5860
jmp 0x2885a
leaq -0x228(%rbp), %rdi
callq 0x58d8
leaq -0x208(%rbp), %rdi
callq 0x5350
movb %al, -0x281(%rbp)
jmp 0x2887a
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x288fb
jmp 0x28886
movq 0x36763(%rip), %rdi     # 0x5eff0
leaq 0x1ae20(%rip), %rsi     # 0x436b4
callq 0x5420
movq %rax, -0x290(%rbp)
jmp 0x288a2
movq -0x290(%rbp), %rdi
movq 0x366e0(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x288b7
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 0x28b5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x28b4e
movq -0x280(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq %rax, %rdi
callq 0x8340
movl %eax, -0x294(%rbp)
jmp 0x2891b
movl -0x294(%rbp), %esi
leaq -0x208(%rbp), %rdi
callq 0x5770
movq %rax, -0x2a0(%rbp)
jmp 0x28936
movq -0x2a0(%rbp), %rdi
leaq 0x1a1fd(%rip), %rsi     # 0x42b41
callq 0x5420
movq %rax, -0x2a8(%rbp)
jmp 0x28952
movq -0x280(%rbp), %rdi
callq 0xe6e0
movq -0x2a8(%rbp), %rdi
movl 0x94(%rax), %esi
callq 0x5770
movq %rax, -0x2b0(%rbp)
jmp 0x28979
movq -0x2b0(%rbp), %rdi
movq 0x36609(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x2898e
movq -0x280(%rbp), %rdi
callq 0xe6e0
movslq 0x94(%rax), %rsi
leaq -0x248(%rbp), %rdi
callq 0x20c00
jmp 0x289af
movl $0x0, -0x24c(%rbp)
movq -0x280(%rbp), %rdi
movl -0x24c(%rbp), %eax
movl %eax, -0x2b8(%rbp)
addq $0x10, %rdi
callq 0x34050
movq %rax, %rdi
callq 0x8340
movl %eax, -0x2b4(%rbp)
jmp 0x289e5
movl -0x2b8(%rbp), %eax
movl -0x2b4(%rbp), %ecx
cmpl %ecx, %eax
jge 0x28b13
movq -0x280(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq %rax, %rsi
movl -0x24c(%rbp), %edx
leaq -0x270(%rbp), %rdi
callq 0x8de0
jmp 0x28a20
leaq -0x248(%rbp), %rdi
callq 0x20cb0
jmp 0x28a2e
movq -0x280(%rbp), %rdi
addq $0x30, %rdi
callq 0x23880
movq %rax, %rsi
movslq -0x24c(%rbp), %rdx
leaq -0x248(%rbp), %rdi
callq 0x20f30
jmp 0x28a56
leaq -0x208(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x53e0
movq %rax, -0x2c0(%rbp)
jmp 0x28a72
movq -0x2c0(%rbp), %rdi
leaq 0x1a0c1(%rip), %rsi     # 0x42b41
callq 0x5420
movq %rax, -0x2c8(%rbp)
jmp 0x28a8e
movq -0x2c8(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x21440
movq %rax, -0x2d0(%rbp)
jmp 0x28aaa
movq -0x2d0(%rbp), %rdi
movq 0x364d8(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x28abf
leaq -0x270(%rbp), %rdi
callq 0x58d8
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x289b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x28b42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x58d8
jmp 0x28b42
leaq -0x208(%rbp), %rdi
callq 0x5620
jmp 0x28b21
leaq -0x248(%rbp), %rdi
callq 0x20c60
leaq -0x208(%rbp), %rdi
callq 0x5660
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
leaq -0x248(%rbp), %rdi
callq 0x20c60
leaq -0x208(%rbp), %rdi
callq 0x5660
movq -0x230(%rbp), %rdi
callq 0x57a0
nopw %cs:(%rax,%rax)