// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a272
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x13702
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13711
callq 0xa86c
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x1a3e6
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x18(%rbx), %rdi
movups %xmm0, 0x10(%rbx)
testq %rdi, %rdi
je 0x13750
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1375f
callq 0xa86c
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
callq 0x1a5ae
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x28(%rbx), %rdi
movups %xmm0, 0x20(%rbx)
testq %rdi, %rdi
je 0x1379b
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x137aa
callq 0xa86c
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
callq 0x1a5ae
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x38(%rbx), %rdi
movups %xmm0, 0x30(%rbx)
testq %rdi, %rdi
je 0x137e6
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x137f5
callq 0xa86c
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movq %r15, %rsi
callq 0x1a680
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x48(%rbx), %rdi
movups %xmm0, 0x40(%rbx)
testq %rdi, %rdi
je 0x13831
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13840
callq 0xa86c
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x1a680
movaps (%r12), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r12)
movq 0x58(%rbx), %rdi
movups %xmm0, 0x50(%rbx)
testq %rdi, %rdi
je 0x13881
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13890
callq 0xa86c
leaq 0x20(%rbx), %r12
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x6062
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x89c4
leaq 0x2e(%rsp), %r13
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x43b0
cmpb $0x1, (%r13)
jne 0x138dc
movb $0x1, 0x80(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0xedde
jmp 0x138e8
movq (%r12), %rdi
movq %r14, %rsi
callq 0xe316
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 0x13924
movq (%rbx), %rax
cmpb $0x1, 0x12c(%rax)
jne 0x13924
movq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0xedde
jmp 0x13930
movq (%r13), %rdi
movq %r14, %rsi
callq 0xe316
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 0x1a752
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x68(%rbx), %rdi
movups %xmm0, 0x60(%rbx)
testq %rdi, %rdi
je 0x13981
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13990
callq 0xa86c
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 0x139cc
movq 0x165fa(%rip), %rcx     # 0x29fb8
cmpb $0x0, (%rcx)
je 0x139c8
incl 0x8(%rax)
jmp 0x139cc
lock
incl 0x8(%rax)
movq 0x50(%rbx), %rax
movq %rax, 0x30(%rsp)
movq 0x58(%rbx), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x139f8
movq 0x165ce(%rip), %rcx     # 0x29fb8
cmpb $0x0, (%rcx)
je 0x139f4
incl 0x8(%rax)
jmp 0x139f8
lock
incl 0x8(%rax)
movq (%rbx), %rax
movzbl 0x12c(%rax), %ecx
leaq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xf840
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x13a20
callq 0xa86c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x13a2f
callq 0xa86c
movq 0x60(%rbx), %r14
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7afe
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10888
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13a68
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 0x13ab3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
jmp 0x13ab3
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x13aa4
callq 0xa86c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x13ab3
callq 0xa86c
movq %rbx, %rdi
callq 0x45b0
nop