// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
callq 0x1a31a
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x13761
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13761
callq 0xa8a0
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x1a488
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x18(%rbx), %rdi
movups %xmm0, 0x10(%rbx)
testq %rdi, %rdi
je 0x137af
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x137af
callq 0xa8a0
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
callq 0x1a64a
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x28(%rbx), %rdi
movups %xmm0, 0x20(%rbx)
testq %rdi, %rdi
je 0x137fa
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x137fa
callq 0xa8a0
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
callq 0x1a64a
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x38(%rbx), %rdi
movups %xmm0, 0x30(%rbx)
testq %rdi, %rdi
je 0x13845
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13845
callq 0xa8a0
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
callq 0x1a716
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x48(%rbx), %rdi
movups %xmm0, 0x40(%rbx)
testq %rdi, %rdi
je 0x13890
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13890
callq 0xa8a0
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x1a716
movaps (%r12), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r12)
movq 0x58(%rbx), %rdi
movups %xmm0, 0x50(%rbx)
testq %rdi, %rdi
je 0x138e0
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x138e0
callq 0xa8a0
leaq 0x20(%rbx), %r12
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x6064
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x89e6
leaq 0x2e(%rsp), %r13
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x43b0
cmpb $0x1, (%r13)
jne 0x1392c
movb $0x1, 0x80(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0xf010
jmp 0x13938
movq (%r12), %rdi
movq %r14, %rsi
callq 0xe588
leaq 0x30(%rbx), %r13
movl $0x12c, %esi            # imm = 0x12C
addq (%rbx), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x43b0
cmpb $0x1, 0x80(%rbx)
jne 0x13974
movq (%rbx), %rax
cmpb $0x1, 0x12c(%rax)
jne 0x13974
movq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0xf010
jmp 0x13980
movq (%r13), %rdi
movq %r14, %rsi
callq 0xe588
movl $0x0, 0xc(%rsp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %r15, (%rsp)
leaq 0x10(%rsp), %r14
leaq 0x2f(%rsp), %rdx
movq %r14, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %rbx, %r9
callq 0x1a7e2
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x68(%rbx), %rdi
movups %xmm0, 0x60(%rbx)
testq %rdi, %rdi
je 0x139e0
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x139e0
callq 0xa8a0
movb 0x80(%rbx), %al
movq 0x60(%rbx), %rdi
movb %al, 0x118(%rdi)
movq 0x40(%rbx), %rax
movq %rax, 0x40(%rsp)
movq 0x48(%rbx), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x13a1c
movq 0x165aa(%rip), %rcx     # 0x29fb8
cmpb $0x0, (%rcx)
je 0x13a18
incl 0x8(%rax)
jmp 0x13a1c
lock
incl 0x8(%rax)
movq 0x50(%rbx), %rax
movq %rax, 0x30(%rsp)
movq 0x58(%rbx), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x13a48
movq 0x1657e(%rip), %rcx     # 0x29fb8
cmpb $0x0, (%rcx)
je 0x13a44
incl 0x8(%rax)
jmp 0x13a48
lock
incl 0x8(%rax)
movq (%rbx), %rax
movzbl 0x12c(%rax), %ecx
leaq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xfa5c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x13a70
callq 0xa8a0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x13a7f
callq 0xa8a0
movq 0x60(%rbx), %r14
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7b4a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x108c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13ab8
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13b03
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
jmp 0x13b03
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x13af4
callq 0xa8a0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x13b03
callq 0xa8a0
movq %rbx, %rdi
callq 0x45b0
nop