// File: /workspace/github_cpp_makefile_star2_O1/epfml[P]Bi-Sent2Vec/src/main.cc
// Function: predict(int, char**)
void predict(int argc, char** argv) {
  if (argc < 4 || argc > 5) {
    printPredictUsage();
    exit(EXIT_FAILURE);
  }
  int32_t k = 1;
  if (argc >= 5) {
    k = atoi(argv[4]);
  }

  bool print_prob = std::string(argv[1]) == "predict-prob";
  FastText fasttext;
  fasttext.loadModel(std::string(argv[2]));

  std::string infile(argv[3]);
  if (infile == "-") {
    fasttext.predict(std::cin, k, print_prob);
  } else {
    std::ifstream ifs(infile);
    if (!ifs.is_open()) {
      std::cerr << "Input file cannot be opened!" << std::endl;
      exit(EXIT_FAILURE);
    }
    fasttext.predict(ifs, k, print_prob);
    ifs.close();
  }

  exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
leal -0x6(%rdi), %eax
cmpl $-0x3, %eax
ja 0x1c732
callq 0x1beec
movl $0x1, %edi
callq 0x4380
movq %rsi, %r14
movl $0x1, %ebx
cmpl $0x5, %edi
jl 0x1c74a
movq 0x20(%r14), %rdi
callq 0x44c0
movl %eax, %ebx
movq 0x8(%r14), %rsi
leaq 0xb0(%rsp), %r15
leaq 0x28(%rsp), %rdx
movq %r15, %rdi
callq 0x617a
leaq 0x3f7f(%rip), %rsi      # 0x206e9
movq %r15, %rdi
callq 0x40e0
movl %eax, %ebp
movq (%r15), %rdi
leaq 0xc0(%rsp), %r15
cmpq %r15, %rdi
je 0x1c794
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x28(%rsp), %rdi
callq 0x11bdc
movq 0x10(%r14), %rsi
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x617a
leaq 0x28(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x1315e
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c7ea
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x18(%r14), %rsi
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x617a
leaq 0x31b1(%rip), %rsi      # 0x1f9b8
leaq 0x8(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x1c836
xorl %ecx, %ecx
testl %ebp, %ebp
sete %cl
movq 0xd7b5(%rip), %rsi      # 0x29fd8
leaq 0x28(%rsp), %rdi
movl %ebx, %edx
callq 0x154c8
xorl %edi, %edi
callq 0x4380
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x44f0
leaq 0x128(%rsp), %rdi
callq 0x40b0
testb %al, %al
je 0x1c895
xorl %ecx, %ecx
testl %ebp, %ebp
sete %cl
leaq 0x28(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl %ebx, %edx
callq 0x154c8
leaq 0xb0(%rsp), %rdi
callq 0x4090
leaq 0xb0(%rsp), %rdi
callq 0x40c0
jmp 0x1c82f
movq 0xd754(%rip), %rdi      # 0x29ff0
leaq 0x3136(%rip), %rsi      # 0x1f9d9
movl $0x1c, %edx
callq 0x4350
movq 0xd73c(%rip), %rdi      # 0x29ff0
callq 0x4170
jmp 0x1c728
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x40c0
jmp 0x1c8d5
jmp 0x1c8d2
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c911
movq 0x18(%rsp), %rsi
jmp 0x1c904
jmp 0x1c90e
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c911
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x1c911
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x1c923
callq 0xa86c
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1c935
callq 0xa86c
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1c944
callq 0xa86c
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1c953
callq 0xa86c
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1c962
callq 0xa86c
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1c971
callq 0xa86c
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1c980
callq 0xa86c
movq %rbx, %rdi
callq 0x45b0