// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c786
callq 0x1bf40
movl $0x1, %edi
callq 0x4380
movq %rsi, %r14
movl $0x1, %ebx
cmpl $0x5, %edi
jb 0x1c79e
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 0x617c
leaq 0x3f3b(%rip), %rsi      # 0x206f9
movq %r15, %rdi
callq 0x40e0
movl %eax, %ebp
movq (%r15), %rdi
leaq 0xc0(%rsp), %r15
cmpq %r15, %rdi
je 0x1c7e8
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x28(%rsp), %rdi
callq 0x11c14
movq 0x10(%r14), %rsi
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x617c
leaq 0x28(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x131ae
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c83e
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x18(%r14), %rsi
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x617c
leaq 0x316d(%rip), %rsi      # 0x1f9c8
leaq 0x8(%rsp), %rdi
callq 0x40e0
testl %eax, %eax
jne 0x1c88a
xorl %ecx, %ecx
testl %ebp, %ebp
sete %cl
movq 0xd761(%rip), %rsi      # 0x29fd8
leaq 0x28(%rsp), %rdi
movl %ebx, %edx
callq 0x155e0
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 0x1c8e9
xorl %ecx, %ecx
testl %ebp, %ebp
sete %cl
leaq 0x28(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl %ebx, %edx
callq 0x155e0
leaq 0xb0(%rsp), %rdi
callq 0x4090
leaq 0xb0(%rsp), %rdi
callq 0x40c0
jmp 0x1c883
movq 0xd700(%rip), %rdi      # 0x29ff0
leaq 0x30f2(%rip), %rsi      # 0x1f9e9
movl $0x1c, %edx
callq 0x4350
movq 0xd6e8(%rip), %rdi      # 0x29ff0
callq 0x4170
jmp 0x1c77c
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x40c0
jmp 0x1c929
jmp 0x1c926
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c965
movq 0x18(%rsp), %rsi
jmp 0x1c958
jmp 0x1c962
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c965
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x1c965
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x1c977
callq 0xa8a0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1c989
callq 0xa8a0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1c998
callq 0xa8a0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1c9a7
callq 0xa8a0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1c9b6
callq 0xa8a0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1c9c5
callq 0xa8a0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1c9d4
callq 0xa8a0
movq %rbx, %rdi
callq 0x45b0