// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_condenseq_hmmsearch.c
// Function: hmmsearch_call_fine_search
static int hmmsearch_call_fine_search(GtStr *table_filename,
                                      char *fine_fasta_filename,
                                      char *hmmsearch_path,
                                      char *hmm_filename,
                                      unsigned int max_threads,
                                      GtLogger *logger,
                                      GtError *err) {
  int had_err = 0;
  GtSafePipe *pipe = NULL;
  char **hmmargs = NULL,
       *hmmenv[] = { NULL };
  const size_t hmmargc = (size_t) 8; /* max # of args + NULL */
  unsigned int idx = 0;
  GtStr *num_threads = gt_str_new();

  hmmargs = gt_calloc(hmmargc, sizeof (*hmmargs));
  hmmargs[idx++] = hmmsearch_path;
  if (table_filename != NULL) {
    hmmargs[idx++] = "--tblout";
    hmmargs[idx++] = gt_str_get(table_filename);
  }
  if (max_threads != GT_UNDEF_UINT) {
    gt_str_append_uint(num_threads, max_threads);
    hmmargs[idx++] = "--cpu";
    hmmargs[idx++] = gt_str_get(num_threads);
  }
  hmmargs[idx++] = hmm_filename;
  hmmargs[idx++] = fine_fasta_filename;
  gt_assert(hmmargs[idx] == NULL);

  gt_logger_log(logger, "calling: %s", hmmsearch_path);

  pipe = gt_safe_popen(hmmsearch_path, hmmargs, hmmenv, err);

  gt_free(hmmargs);

  gt_str_delete(num_threads);

  if (pipe == NULL)
    had_err = -1;

  if (!had_err) {
    GtStr *line = gt_str_new();
    gt_assert(pipe != NULL); /* shut up splint */
    while (gt_str_read_next_line(line, pipe->read_fd) == 0) {
      printf("%s\n", gt_str_get(line));
      gt_str_reset(line);
    }
    gt_str_delete(line);
    (void) gt_safe_pclose(pipe);
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, (%rsp)
movl %r8d, %r15d
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %r13
movq $0x0, 0x10(%rsp)
callq 0x1208f8
movq %rax, %rbx
leaq 0x2afb8d(%rip), %rdx    # 0x3522cc
movl $0x8, %edi
movl $0x8, %esi
movl $0xfa, %ecx
callq 0x1093ef
movq %rax, %r12
movq %r14, (%rax)
testq %r13, %r13
je 0xa277f
leaq 0x2b0061(%rip), %rax    # 0x3527c6
movq %rax, 0x8(%r12)
movq %r13, %rdi
callq 0x120d23
movq %rax, 0x10(%r12)
movl $0x3, %r13d
jmp 0xa2785
movl $0x1, %r13d
cmpl $-0x1, %r15d
je 0xa27b5
movq %rbx, %rdi
movl %r15d, %esi
callq 0x120cd6
movl %r13d, %r15d
leaq 0x2aff17(%rip), %rax    # 0x3526b7
movq %rax, (%r12,%r15,8)
movq %rbx, %rdi
callq 0x120d23
addl $0x2, %r13d
movq %rax, 0x8(%r12,%r15,8)
movl %r13d, %eax
movq 0x8(%rsp), %rcx
movq %rcx, (%r12,%rax,8)
movq %rbp, 0x8(%r12,%rax,8)
cmpq $0x0, 0x10(%r12,%rax,8)
jne 0xa2883
movq 0x50(%rsp), %r15
leaq 0x2afef4(%rip), %rsi    # 0x3526d2
xorl %ebp, %ebp
movq (%rsp), %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10906e
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x1780dc
movq %rax, %r14
leaq 0x2afac1(%rip), %rsi    # 0x3522cc
movq %r12, %rdi
movl $0x10d, %edx            # imm = 0x10D
callq 0x109670
movq %rbx, %rdi
callq 0x121b03
testq %r14, %r14
je 0xa286c
callq 0x1208f8
movq %rax, %rbx
movq (%r14), %rsi
movq %rax, %rdi
callq 0x120e88
testl %eax, %eax
jne 0xa285c
movq %rbx, %rdi
callq 0x120d23
movq %rax, %rdi
callq 0x17bd0
movq %rbx, %rdi
callq 0x120db4
movq (%r14), %rsi
movq %rbx, %rdi
jmp 0xa2833
movq %rbx, %rdi
callq 0x121b03
movq %r14, %rdi
callq 0x178317
cmpq $0x1, %r14
sbbl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x19698