// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0xa8dc
leaq 0xc774(%rip), %rsi      # 0x1f9f6
movl $0x2, %ecx
movq %r15, %rdi
movq $-0x1, %rdx
callq 0x4680
cmpq $-0x1, %rax
je 0x132ae
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 0x132e6
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
jb 0x1361d
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movb $0x0, (%rcx,%rax)
leaq 0xc4e8(%rip), %rcx      # 0x1f7d5
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 0x13328
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x1332f
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 0xc488(%rip), %rsi      # 0x1f7da
callq 0x4620
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1337e
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x13386
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 0x133b5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x133cc
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 0x1a272
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x13406
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13415
callq 0xa86c
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x6062
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rcx
callq 0x1a3e6
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x18(%rbx), %rdi
movups %xmm0, 0x10(%rbx)
testq %rdi, %rdi
je 0x1345e
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1346d
callq 0xa86c
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x89c4
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 0xe494
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x28(%rbx), %rdi
movups %xmm0, 0x20(%rbx)
testq %rdi, %rdi
je 0x134c0
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x134cf
callq 0xa86c
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 0x1a5ae
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x38(%rbx), %rdi
movups %xmm0, 0x30(%rbx)
testq %rdi, %rdi
je 0x13522
callq 0xa86c
leaq 0x30(%rbx), %r12
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13535
callq 0xa86c
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 0x1a752
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x68(%rbx), %rdi
movups %xmm0, 0x60(%rbx)
testq %rdi, %rdi
je 0x135b0
callq 0xa86c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x135bf
callq 0xa86c
movq 0x60(%rbx), %r14
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x7afe
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x10888
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x135f7
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x1360e
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 0xc3e9(%rip), %rdi      # 0x1fa0d
leaq 0xc3ce(%rip), %rsi      # 0x1f9f9
movq %rax, %rdx
xorl %eax, %eax
callq 0x4490
jmp 0x1367d
jmp 0x1367d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13694
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
jmp 0x13694
jmp 0x13691
jmp 0x13691
jmp 0x13691
jmp 0x13691
jmp 0x13691
jmp 0x13691
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x13680
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x13680
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x136ab
movq 0x48(%rsp), %rsi
jmp 0x136a3
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x136ab
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0
nop