// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/blast_process_call.c
// Function: gt_blast_process_call_run
FILE *gt_blast_process_call_run(GtBlastProcessCall *call, GtError *err)
{
  int had_err = 0;
#ifndef _WIN32
  int errcode;
#endif
  FILE *blastout = NULL,
       *installcheck = NULL;
  gt_assert(call->query && call->db);

  installcheck = popen(call->version_call, "r");
  if (installcheck == NULL) {
    gt_error_set(err, "Could not open pipe to run %s: %s",
                 call->version_call, strerror(errno));
    had_err = -1;
  }
  /* this assures that we get the output if debugging is set, and also we
     prevent BROKEN_PIPE error if pclose(3) is called before the version call
     exits */
  if (!had_err) {
    char *newline = NULL;
    char line[BUFSIZ + 1];
    line[BUFSIZ] = '\0';
    while (fgets(line, (int) BUFSIZ, installcheck) != NULL) {
      if ((newline = strrchr(line, '\n')) != NULL) {
        *newline = '\0';
        newline = NULL;
      }
      gt_log_log("%.*s", BUFSIZ, line);
    }
  }
  if (!had_err) {
#ifndef _WIN32
    errcode = pclose(installcheck);
    if ((call->all && WEXITSTATUS(errcode) != 1) ||
        errcode != 0) {
      if (errno == ECHILD)
        gt_error_set(err, "Error calling %s.", call->version_call);
      else if (WEXITSTATUS(errcode) == 127)
        gt_error_set(err, "shell returned 127, BLAST not installed?");
      else
        gt_error_set(err, "%s error, returned %d",
                     call->version_call, WEXITSTATUS(errcode));
      had_err = -1;
    }
#endif
  }
  if (!had_err) {
    blastout = popen(gt_str_get(call->str), "r");
    if (blastout == NULL) {
      gt_error_set(err, "Could not open pipe to run BLAST process: %s",
                   strerror(errno));
    }
  }
  return blastout;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
cmpb $0x1, 0x19(%rdi)
jne 0xbd84d
movq %rdi, %r14
cmpb $0x0, 0x11(%rdi)
je 0xbd84d
movq %rsi, %r12
movq 0x8(%r14), %rdi
leaq 0x23d73b(%rip), %rsi    # 0x2fae2d
callq 0x171f0
testq %rax, %rax
je 0xbd7b6
movq %rax, %r15
movq %r12, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movb $0x0, 0x2000(%r12)
pushq $0xa
popq %rbp
leaq 0x2ba741(%rip), %r13    # 0x377e61
movq %r12, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r15, %rdx
callq 0x17bc0
testq %rax, %rax
je 0xbd75b
movq %r12, %rdi
movl %ebp, %esi
callq 0x17830
testq %rax, %rax
je 0xbd747
movb $0x0, (%rax)
movq %r13, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r12, %rdx
xorl %eax, %eax
callq 0x92a82
jmp 0xbd720
movq %r15, %rdi
callq 0x17a10
movl %eax, %ebx
testl %eax, %eax
jne 0xbd7e2
cmpb $0x0, 0x10(%r14)
jne 0xbd7e2
movq (%r14), %rdi
callq 0xad1fa
leaq 0x23d6ae(%rip), %rsi    # 0x2fae2d
movq %rax, %rdi
callq 0x171f0
movq %rax, %r14
testq %rax, %rax
movq 0x8(%rsp), %rbx
jne 0xbd838
callq 0x17060
movl (%rax), %edi
callq 0x17220
leaq 0x25ab44(%rip), %rsi    # 0x3182ef
xorl %r14d, %r14d
movq %rbx, %rdi
movq %rax, %rdx
jmp 0xbd7ff
movq 0x8(%r14), %rbx
callq 0x17060
movl (%rax), %edi
callq 0x17220
leaq 0x25aaaf(%rip), %rsi    # 0x31827c
xorl %r14d, %r14d
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x89dbb
jmp 0xbd838
callq 0x17060
cmpl $0xa, (%rax)
movq 0x8(%rsp), %rdi
jne 0xbd808
movq 0x8(%r14), %rdx
leaq 0x25aaa2(%rip), %rsi    # 0x31829e
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x89dbb
jmp 0xbd838
movzbl %bh, %ecx
cmpl $0x7f, %ecx
jne 0xbd823
leaq 0x25aa99(%rip), %rsi    # 0x3182b0
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x89dbb
jmp 0xbd838
movq 0x8(%r14), %rdx
leaq 0x25aaab(%rip), %rsi    # 0x3182d9
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x89dbb
movq %r14, %rax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x37a714(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2277b5(%rip), %rsi    # 0x2e5013
leaq 0x25a9e5(%rip), %rdx    # 0x31824a
leaq 0x25a9f6(%rip), %rcx    # 0x318262
leaq 0x25a6c1(%rip), %r8     # 0x317f34
movl $0x111, %r9d            # imm = 0x111
xorl %eax, %eax
callq 0x17a50
callq 0x17390