// File: /workspace/github_cpp_makefile_star2_O2/epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::loadModel(std::istream&)
void FastText::loadModel(std::istream& in) {
  args_ = std::make_shared<Args>();
  dict_ = std::make_shared<Dictionary>(args_);
  input_ = std::make_shared<Matrix>();
  output_ = std::make_shared<Matrix>();
  qinput_ = std::make_shared<QMatrix>();
  qoutput_ = std::make_shared<QMatrix>();
  args_->load(in);

  dict_->load(in);

  bool quant_input;
  in.read((char*) &quant_input, sizeof(bool));
  if (quant_input) {
    quant_ = true;
    qinput_->load(in);
  } else {
    input_->load(in);
  }

  in.read((char*) &args_->qout, sizeof(bool));
  if (quant_ && args_->qout) {
    qoutput_->load(in);
  } else {
    output_->load(in);
  }

  model_ = std::make_shared<Model>(input_, output_, args_, 0);
  model_->quant_ = quant_;
  model_->setQuantizePointer(qinput_, qoutput_, args_->qout);

  model_->setTargetCounts(dict_->getCounts(entry_type::word));

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x15b8c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x160b4
leaq 0x10(%rsp), %rdi
callq 0x8b66
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15ba7
leaq 0x10(%r14), %rdi
movq %rdi, 0x20(%rsp)
movq %rbx, %rsi
callq 0x162fc
leaq 0x10(%rsp), %rdi
callq 0x8b66
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x15bc5
leaq 0x20(%r14), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1648e
leaq 0x10(%rsp), %rdi
callq 0x8b66
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x15bc5
leaq 0x30(%r14), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1648e
leaq 0x10(%rsp), %rdi
callq 0x8b66
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x15be0
leaq 0x40(%r14), %rdi
movq %rdi, 0x28(%rsp)
movq %rbx, %rsi
callq 0x16620
leaq 0x10(%rsp), %rdi
callq 0x8b66
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x15be0
leaq 0x50(%r14), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x16620
leaq 0x10(%rsp), %rdi
callq 0x8b66
movq (%r14), %rdi
movq %r15, %rsi
callq 0x5a62
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x7836
leaq 0x7(%rsp), %r13
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x43e0
cmpb $0x1, (%r13)
jne 0x10ace
movb $0x1, 0x80(%r14)
movq 0x40(%r14), %rdi
movq %r15, %rsi
callq 0xce90
jmp 0x10ada
movq (%r12), %rdi
movq %r15, %rsi
callq 0xc384
movl $0x12c, %esi            # imm = 0x12C
addq (%r14), %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
callq 0x43e0
cmpb $0x1, 0x80(%r14)
jne 0x10b10
movq (%r14), %rax
cmpb $0x1, 0x12c(%rax)
jne 0x10b10
movq (%rbx), %rdi
movq %r15, %rsi
callq 0xce90
jmp 0x10b1c
movq (%rbp), %rdi
movq %r15, %rsi
callq 0xc384
leaq 0x34(%rsp), %r8
andl $0x0, (%r8)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x15bfb
leaq 0x60(%r14), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x168a8
leaq 0x10(%rsp), %rdi
callq 0x8b66
movb 0x80(%r14), %al
movq 0x60(%r14), %r12
movb %al, 0x118(%r12)
leaq 0x48(%rsp), %r13
movq %r13, %rdi
movq 0x28(%rsp), %rsi
callq 0x15e56
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x15e56
movq (%r14), %rax
movzbl 0x12c(%rax), %ecx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0xd856
leaq 0x40(%rsp), %rdi
callq 0x8b66
leaq 0x50(%rsp), %rdi
callq 0x8b66
movq (%r15), %rbx
movq 0x20(%rsp), %rax
movq (%rax), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x6dfe
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe4ca
leaq 0x8(%rsp), %rdi
callq 0x9a28
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9a28
jmp 0x10c19
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8b66
leaq 0x50(%rsp), %rdi
callq 0x8b66
movq %rbx, %rdi
callq 0x45d0
nop