// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x2058, %rsp           # imm = 0x2058
movq %rdi, 0x2050(%rsp)
movq %rsi, 0x2048(%rsp)
movl $0x0, 0x2044(%rsp)
movq $0x0, 0x2038(%rsp)
movq $0x0, 0x2030(%rsp)
movq 0x2050(%rsp), %rax
testb $0x1, 0x19(%rax)
je 0x137a06
movq 0x2050(%rsp), %rax
testb $0x1, 0x11(%rax)
jne 0x137a3e
movq 0x504593(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3de5fc(%rip), %rsi    # 0x516013
leaq 0x4127e0(%rip), %rdx    # 0x54a1fe
leaq 0x4127f1(%rip), %rcx    # 0x54a216
leaq 0x4124bc(%rip), %r8     # 0x549ee8
movl $0x111, %r9d            # imm = 0x111
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x137a40
movq 0x2050(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x3f4587(%rip), %rsi    # 0x52bfda
callq 0x191d0
movq %rax, 0x2030(%rsp)
cmpq $0x0, 0x2030(%rsp)
jne 0x137abb
movq 0x2048(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x2050(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x19060
movl (%rax), %edi
callq 0x19200
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
leaq 0x412787(%rip), %rsi    # 0x54a230
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x2044(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x2044(%rsp)
jne 0x137b4a
movq $0x0, 0x2028(%rsp)
movb $0x0, 0x2020(%rsp)
leaq 0x20(%rsp), %rdi
movq 0x2030(%rsp), %rdx
movl $0x2000, %esi           # imm = 0x2000
callq 0x19b60
cmpq $0x0, %rax
je 0x137b48
leaq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x197d0
movq %rax, 0x2028(%rsp)
cmpq $0x0, %rax
je 0x137b2e
movq 0x2028(%rsp), %rax
movb $0x0, (%rax)
movq $0x0, 0x2028(%rsp)
leaq 0x20(%rsp), %rdx
leaq 0x4753a1(%rip), %rdi    # 0x5acedb
movl $0x2000, %esi           # imm = 0x2000
movb $0x0, %al
callq 0xe7740
jmp 0x137add
jmp 0x137b4a
cmpl $0x0, 0x2044(%rsp)
jne 0x137c37
movq 0x2030(%rsp), %rdi
callq 0x199b0
movl %eax, 0x2040(%rsp)
movq 0x2050(%rsp), %rax
testb $0x1, 0x10(%rax)
je 0x137b8e
movl 0x2040(%rsp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
cmpl $0x1, %eax
jne 0x137b9c
cmpl $0x0, 0x2040(%rsp)
je 0x137c35
callq 0x19060
cmpl $0xa, (%rax)
jne 0x137bca
movq 0x2048(%rsp), %rdi
movq 0x2050(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x412691(%rip), %rsi    # 0x54a252
movb $0x0, %al
callq 0xd88c0
jmp 0x137c2a
movl 0x2040(%rsp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
cmpl $0x7f, %eax
jne 0x137bf6
movq 0x2048(%rsp), %rdi
leaq 0x412677(%rip), %rsi    # 0x54a264
movb $0x0, %al
callq 0xd88c0
jmp 0x137c28
movq 0x2048(%rsp), %rdi
movq 0x2050(%rsp), %rax
movq 0x8(%rax), %rdx
movl 0x2040(%rsp), %ecx
andl $0xff00, %ecx           # imm = 0xFF00
sarl $0x8, %ecx
leaq 0x41266c(%rip), %rsi    # 0x54a28d
movb $0x0, %al
callq 0xd88c0
jmp 0x137c2a
movl $0xffffffff, 0x2044(%rsp) # imm = 0xFFFFFFFF
jmp 0x137c37
cmpl $0x0, 0x2044(%rsp)
jne 0x137ca4
movq 0x2050(%rsp), %rax
movq (%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
leaq 0x3f437f(%rip), %rsi    # 0x52bfda
callq 0x191d0
movq %rax, 0x2038(%rsp)
cmpq $0x0, 0x2038(%rsp)
jne 0x137ca2
movq 0x2048(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x19060
movl (%rax), %edi
callq 0x19200
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x412608(%rip), %rsi    # 0x54a2a3
movb $0x0, %al
callq 0xd88c0
jmp 0x137ca4
movq 0x2038(%rsp), %rax
addq $0x2058, %rsp           # imm = 0x2058
retq
nopw %cs:(%rax,%rax)