// File: epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::saveVectors(int)
void FastText::saveVectors(int32_t checkpoint) {
  std::ofstream ofs(args_->output + "_Chk" + std::to_string(checkpoint) + ".ckpt.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_ckpt(vec, i);
    ofs << word << " " << vec << std::endl;
  }
  ofs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0xe6e0
movq %rax, %rsi
addq $0x40, %rsi
leaq 0x1b2cb(%rip), %rdx     # 0x436db
leaq -0x270(%rbp), %rdi
callq 0x1ed90
movl -0xc(%rbp), %esi
leaq -0x290(%rbp), %rdi
callq 0x34190
jmp 0x2842d
leaq -0x250(%rbp), %rdi
leaq -0x270(%rbp), %rsi
leaq -0x290(%rbp), %rdx
callq 0x340c0
jmp 0x28449
leaq 0x1b290(%rip), %rdx     # 0x436e0
leaq -0x230(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x34070
jmp 0x28465
leaq -0x210(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movl $0x10, %edx
callq 0x5860
jmp 0x2847f
leaq -0x230(%rbp), %rdi
callq 0x58d8
leaq -0x250(%rbp), %rdi
callq 0x58d8
leaq -0x290(%rbp), %rdi
callq 0x58d8
leaq -0x270(%rbp), %rdi
callq 0x58d8
leaq -0x210(%rbp), %rdi
callq 0x5350
movb %al, -0x2e1(%rbp)
jmp 0x284c3
movb -0x2e1(%rbp), %al
testb $0x1, %al
jne 0x285a8
jmp 0x284d3
movq 0x36b16(%rip), %rdi     # 0x5eff0
leaq 0x1b1d3(%rip), %rsi     # 0x436b4
callq 0x5420
movq %rax, -0x2f0(%rbp)
jmp 0x284ef
movq -0x2f0(%rbp), %rdi
movq 0x36a93(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x28504
movl $0x1, %edi
callq 0x54f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
jmp 0x28580
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
jmp 0x28574
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
jmp 0x28568
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x58d8
leaq -0x250(%rbp), %rdi
callq 0x58d8
leaq -0x290(%rbp), %rdi
callq 0x58d8
leaq -0x270(%rbp), %rdi
callq 0x58d8
jmp 0x287ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
jmp 0x287e0
movq -0x2e0(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq %rax, %rdi
callq 0x8340
movl %eax, -0x2f4(%rbp)
jmp 0x285c8
movl -0x2f4(%rbp), %esi
leaq -0x210(%rbp), %rdi
callq 0x5770
movq %rax, -0x300(%rbp)
jmp 0x285e3
movq -0x300(%rbp), %rdi
leaq 0x1a550(%rip), %rsi     # 0x42b41
callq 0x5420
movq %rax, -0x308(%rbp)
jmp 0x285ff
movq -0x2e0(%rbp), %rdi
callq 0xe6e0
movq -0x308(%rbp), %rdi
movl 0x94(%rax), %esi
callq 0x5770
movq %rax, -0x310(%rbp)
jmp 0x28626
movq -0x310(%rbp), %rdi
movq 0x3695c(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x2863b
movq -0x2e0(%rbp), %rdi
callq 0xe6e0
movslq 0x94(%rax), %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x20c00
jmp 0x2865c
movl $0x0, -0x2b4(%rbp)
movq -0x2e0(%rbp), %rdi
movl -0x2b4(%rbp), %eax
movl %eax, -0x318(%rbp)
addq $0x10, %rdi
callq 0x34050
movq %rax, %rdi
callq 0x8340
movl %eax, -0x314(%rbp)
jmp 0x28692
movl -0x318(%rbp), %eax
movl -0x314(%rbp), %ecx
cmpl %ecx, %eax
jge 0x287a5
movq -0x2e0(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq %rax, %rsi
movl -0x2b4(%rbp), %edx
leaq -0x2d8(%rbp), %rdi
callq 0x8de0
jmp 0x286cd
movq -0x2e0(%rbp), %rdi
movl -0x2b4(%rbp), %edx
leaq -0x2b0(%rbp), %rsi
callq 0x28370
jmp 0x286e8
leaq -0x210(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x53e0
movq %rax, -0x320(%rbp)
jmp 0x28704
movq -0x320(%rbp), %rdi
leaq 0x1a42f(%rip), %rsi     # 0x42b41
callq 0x5420
movq %rax, -0x328(%rbp)
jmp 0x28720
movq -0x328(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x21440
movq %rax, -0x330(%rbp)
jmp 0x2873c
movq -0x330(%rbp), %rdi
movq 0x36846(%rip), %rsi     # 0x5ef90
callq 0x5460
jmp 0x28751
leaq -0x2d8(%rbp), %rdi
callq 0x58d8
movl -0x2b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b4(%rbp)
jmp 0x28666
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
jmp 0x287d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x58d8
jmp 0x287d4
leaq -0x210(%rbp), %rdi
callq 0x5620
jmp 0x287b3
leaq -0x2b0(%rbp), %rdi
callq 0x20c60
leaq -0x210(%rbp), %rdi
callq 0x5660
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
leaq -0x2b0(%rbp), %rdi
callq 0x20c60
leaq -0x210(%rbp), %rdi
callq 0x5660
movq -0x298(%rbp), %rdi
callq 0x57a0
nopl (%rax,%rax)