// File: /workspace/github_cpp_makefile_star2_O3/epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::loadModelForInference(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void FastText::loadModelForInference(std::istream& in,
                                     const std::string& filename,
                                     const int timeout_sec) {
  std::string shmem_name = "s2v_" + basename(filename) + "_input_matrix";

  args_ = std::make_shared<Args>();
  args_->load(in);

  dict_ = std::make_shared<Dictionary>(args_);
  dict_->load(in);

  in.read((char*) &quant_, sizeof(bool));

  input_ = ShmemMatrix::load(in, shmem_name, timeout_sec);

  in.read((char*) &args_->qout, sizeof(bool));

  output_ = std::make_shared<Matrix>();
  in.read((char*) &(output_->m_), sizeof(int64_t));
  in.read((char*) &(output_->n_), sizeof(int64_t));

  model_ = std::make_shared<Model>(input_, output_, args_, 0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rsi
leaq 0x48(%rsp), %r12
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %r12, -0x10(%r12)
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0xa910
leaq 0xc734(%rip), %rsi      # 0x1fa06
movl $0x2, %ecx
movq %r15, %rdi
movq $-0x1, %rdx
callq 0x4680
cmpq $-0x1, %rax
je 0x132fe
incq %rax
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x40a0
leaq 0x38(%rsp), %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x4660
cmpq $-0x1, %rax
je 0x13336
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
jb 0x1366d
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movb $0x0, (%rcx,%rax)
leaq 0xc4a8(%rip), %rcx      # 0x1f7e5
leaq 0x38(%rsp), %rdi
movl $0x4, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x4340
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x13378
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x1337f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc448(%rip), %rsi      # 0x1f7ea
callq 0x4620
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x133ce
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x133d6
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x13405
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x1341c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x1a31a
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x13465
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13465
callq 0xa8a0
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x6064
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rcx
callq 0x1a488
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x18(%rbx), %rdi
movups %xmm0, 0x10(%rbx)
testq %rdi, %rdi
je 0x134bd
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x134bd
callq 0xa8a0
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x89e6
leaq 0x80(%rbx), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x43b0
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
movl %ebp, %ecx
callq 0xe704
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x28(%rbx), %rdi
movups %xmm0, 0x20(%rbx)
testq %rdi, %rdi
je 0x1351f
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1351f
callq 0xa8a0
movl $0x12c, %esi            # imm = 0x12C
addq (%rbx), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x43b0
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %r15
movq %r15, %rdx
callq 0x1a64a
leaq 0x30(%rbx), %r12
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x38(%rbx), %rdi
movups %xmm0, 0x30(%rbx)
testq %rdi, %rdi
je 0x13585
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13585
callq 0xa8a0
movq (%r12), %rsi
addq $0x8, %rsi
movl $0x8, %edx
movq %r14, %rdi
callq 0x43b0
movq (%r12), %rsi
addq $0x10, %rsi
movl $0x8, %edx
movq %r14, %rdi
callq 0x43b0
leaq 0x20(%rbx), %rcx
movl $0x0, 0x38(%rsp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %r15, (%rsp)
leaq 0x10(%rsp), %rsi
leaq 0x37(%rsp), %rdx
movq %r12, %r8
movq %rbx, %r9
callq 0x1a7e2
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x68(%rbx), %rdi
movups %xmm0, 0x60(%rbx)
testq %rdi, %rdi
je 0x1360f
callq 0xa8a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1360f
callq 0xa8a0
movq 0x60(%rbx), %r14
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x7b4a
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x108c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13647
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x1365e
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4300
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc3a9(%rip), %rdi      # 0x1fa1d
leaq 0xc38e(%rip), %rsi      # 0x1fa09
movq %rax, %rdx
xorl %eax, %eax
callq 0x4490
jmp 0x136cd
jmp 0x136cd
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x136e4
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
jmp 0x136e4
jmp 0x136e1
jmp 0x136e1
jmp 0x136e1
jmp 0x136e1
jmp 0x136e1
jmp 0x136e1
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x136d0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x136d0
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x136fb
movq 0x48(%rsp), %rsi
jmp 0x136f3
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x136fb
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0
nop